Jump to content


Photo
- - - - -

Issues Executing .jar Files Under Windows


  • Please log in to reply
47 replies to this topic

#1 Simon

Simon

    Administrator

  • Administrators
  • 12,495 posts

Posted 03 August 2014 - 06:50 AM

It seems that there are some rather nasty updates to either Windows itself or Java running under Windows that is removing the file association for .jar files for a number of users.  It is not clear at this time why this is happening, but it is preventing people from running HD by double-clicking on the HD6.jar file (or any shortcut they've created).

 

I'll use this thread for troubleshooting this issue with folks -- the fix information in this post will be edited as needed to help out.

 

 

The following is the most direct way to check and/or set the file association for .jar files under Windows:

 

1.  Open a command prompt (Start -> Run... -> cmd)

 

2.  To check the file association for jar files, enter the following (please post the output of this command in this thread if you are still having problems):

ftype | find "jarfile"

3.  To reset the file association for jar files, you would enter the following, replacing the path to javaw.exe with the absolute path to the file on your system :

ftype jarfile="C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %*

  • bluesguy and lou_tennant like this

I am but mad north by northwest.  When the wind is southerly, I know a hawk from a handsaw.


#2 lou_tennant

lou_tennant

    Incompetent Normal

  • HERO Member
  • 165 posts

Posted 04 August 2014 - 10:03 AM

I suspect it is a Java update specifically. I have an outstanding update for that, but recently updated W7 and my HD is still working.


---

The end may be closer than you think, best enjoy and make the most of it while it lasts.


#3 gwydion2

gwydion2

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 30 August 2014 - 06:48 AM

Ok. I downloaded the zip to the hero system directory I created and extracted the files.

The HD6.jar file doesn't launch the software

 

I ran the command prompt as you suggest above, without any success

 

 

Microsoft Windows [Version 6.1.7601]
Copyright © 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Will Vallance>
C:\Users\Will Vallance>ftype | find "jarfile"

C:\Users\Will Vallance>find "jarfile"
"jarfile"
"jarfile"
find "jarfile"
find "jarfile"
ftype | find "jarfile"
ftype | find "jarfile"
ftype jarfile="C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %*
ftype jarfile="C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %*



#4 gwydion2

gwydion2

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 30 August 2014 - 08:25 AM

I have run it fine on my very old computer (running windows xp) but it won't run on my newer computer with windows 7 pro



#5 Simon

Simon

    Administrator

  • Administrators
  • 12,495 posts

Posted 30 August 2014 - 08:55 AM

ftype | find "jarfile"

That command simply looks up the association with jarfiles on your system.  It looks like it didn't return anything, which would be the problem -- your system does not have Java properly configured (a common problem under Windows of late)

ftype jarfile="C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %*

You need to execute this command.  


I am but mad north by northwest.  When the wind is southerly, I know a hawk from a handsaw.


#6 gwydion2

gwydion2

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 31 August 2014 - 01:44 AM

Ok. Still not getting anywhere. I don't use command prompt very often so if I'm missing something obvious, please spell it out.

 

 

Microsoft Windows [Version 6.1.7601]
Copyright © 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Will Vallance>
C:\Users\Will Vallance>ftype jarfile="C:\Program Files\Java\jre7\bin\javaw.exe"
-jar "%1" %*
File type 'jarfile' not found or no open command associated with it.

C:\Users\Will Vallance>



#7 Simon

Simon

    Administrator

  • Administrators
  • 12,495 posts

Posted 31 August 2014 - 06:04 AM

1. Have you installed Java on your system?
 

2. Assuming yes, where is it installed? (i.e. does the file "C:\Program Files\Java\jre7\bin\javaw.exe" actually exist?)

 

3. What is the output when you run the following at the command line:

java -version

I am but mad north by northwest.  When the wind is southerly, I know a hawk from a handsaw.


#8 gwydion2

gwydion2

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 31 August 2014 - 11:58 AM

Oops! Sorry, I didn't have Java. So used to having it on my old computer that it didn't occur to me it wasn't on the new one.

 

All sorted now. Thanks.



#9 defy

defy

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 01 March 2015 - 10:05 PM

What is a command prompt? I opened the start menu but can't see "Run" or "CMD" anywhere? (clearly I am not a computer person)



#10 Simon

Simon

    Administrator

  • Administrators
  • 12,495 posts

Posted 02 March 2015 - 07:08 AM

Open the Start menu and type "cmd" into the text field at the bottom (typically labeled "Search programs and files")


I am but mad north by northwest.  When the wind is southerly, I know a hawk from a handsaw.


#11 tomd1969

tomd1969

    Me? A Narcissist? Never!

  • HERO Member
  • 722 posts

Posted 22 March 2015 - 01:54 AM

I had this problem a couple of weeks ago and was banging my head on my keyboard trying to figure it out.  I eventually uninstalled Java, re-downloaded a fresh version, and installed that.  It worked fine after that.

 

Alternatively, I could have come here and perhaps have saved myself some hassle.  :/


  • Tasha and bluesguy like this

------
Thomas Davidson
tomd1969@gmail.com

Visit my Tumblr:
http://www.ridingtoh...ahandbasket.com

Wordpress:
http://ridingtohelli...t.wordpress.com

 

My Personal Blog:

http://blog.ridingto...ahandbasket.com

You're just jealous because the voices aren't talking to *you*. :)

Proud member of the Hermetic Order of the Emerald Hexagon. :hex:


#12 CaptD

CaptD

    Competent Normal

  • HERO Member
  • 126 posts

Posted 19 November 2015 - 12:15 PM

I haven't made any progress with this:

 

C:\Users\Nick>ftype | find "jarfile"

jarfile="C:\Program Files\Java\jdk1.8.0_65\bin\javaw.exe" -jar "%1" %*

 

C:\Users\Nick>java -version

'java' is not recognized as an internal or external command,
operable program or batch file
 
C:\Program Files\Java\jdk1.8.0_65\bin>java -version
java version "1.8.0_65"
ava™ SE Runtime Environment (build 1.8.0_65-b17)
ava HotSpot™ 64-Bit Server VM (build 25.65-b01, mixed mode)

 

 

When I try start the jar file it looks like a cmd prompt window flashes and then nothing hapens


I saw Captain America Having Coffee With Elvis!!

#13 Simon

Simon

    Administrator

  • Administrators
  • 12,495 posts

Posted 19 November 2015 - 12:41 PM

Well, first you're going to want to get Java fully installed on your system -- it's not part of the system path settings (which is why just typing "java" at the command line gave you that error message).  Easiest way is to uninstall all copies of Java from your system and reinstall from http://www.java.com

 

Once you've done that, try just double-clicking on HD6.jar -- the reinstall may fix the issue you're having.

 

If you're still having problems, repeat the above steps to ensure that java is in your path and then enter the following from a command prompt after cd-ing to the directory that you unpacked HD into (the directory that has HD6.jar):

javaw -jar HD6.jar

I am but mad north by northwest.  When the wind is southerly, I know a hawk from a handsaw.


#14 CaptD

CaptD

    Competent Normal

  • HERO Member
  • 126 posts

Posted 19 November 2015 - 10:20 PM

that worked .... do i have to make a batch file that cds and puts in that command or what should i do next


I saw Captain America Having Coffee With Elvis!!

#15 Simon

Simon

    Administrator

  • Administrators
  • 12,495 posts

Posted 20 November 2015 - 07:39 AM

If you like, sure - a batch file will essentially do the same thing as the file association.  If you want to avoid the batch file route (for whatever reason), you'll need to figure out what's wrong with the permissions on your system that are preventing the file association from firing (or causing it to error out)


I am but mad north by northwest.  When the wind is southerly, I know a hawk from a handsaw.


#16 GamersGamer

GamersGamer

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 20 November 2015 - 09:31 PM

I have the problem with HD6.jar not executing on my Windows 7 Professional system. I have tried the absolute path solution in this posting and have tried reinstalling Java from a clean reinstall. Java seems to install correctly, and runs under my browsers. It also, shows that the HD6.jar file is an executable jar file and asks me if I want to associate the file with java. But when I try to open the file nothing happens. I can extract the contents of the file to a folder, with 7zip, but no executable is found. I don't know what the problem is. My computer is running in 64 bit, windows 7 mode.

 

Thank You!!!



#17 Simon

Simon

    Administrator

  • Administrators
  • 12,495 posts

Posted 21 November 2015 - 09:36 AM

Do NOT extract HD6.jar.  This is explained in the download instructions and elsewhere.  HD6.jar is the executable for HD. You are going to want to delete everything and start from scratch if you unpacked HD6.jar.

If you want help, you're going to need to provide information specified in this thread.  Specifically:

1. The output of

java -version

2. The output of 

ftype | find "jarfile"

3. The directory that you have unpacked HeroDesigner.zip into (the directory that contains HD6.jar).  


I am but mad north by northwest.  When the wind is southerly, I know a hawk from a handsaw.


#18 donaby

donaby

    New Member

  • Members
  • Pip
  • 2 posts

Posted 28 December 2015 - 03:15 AM

windows 10

 

 

 
C:\>ftype | find "jarfile"
jarfile="C:\Program Files (x86)\Java\jre1.8.0_66\bin\javaw.exe" -jar "%1" %*
 
C:\>ftype jarfile="C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %*
jarfile="C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %*
 
C:\>


#19 Simon

Simon

    Administrator

  • Administrators
  • 12,495 posts

Posted 28 December 2015 - 08:23 AM

Not entirely sure what you're posting...looks like you had a valid file association in the first command (ftype | find "jarfile") which you then changed in the second command...likely to an invalid path on your system.

If you're looking for help, you may want to start by stating what the problem is and NOT blindly executing commands on your system without paying attention to the instructions included with them.


I am but mad north by northwest.  When the wind is southerly, I know a hawk from a handsaw.


#20 donaby

donaby

    New Member

  • Members
  • Pip
  • 2 posts

Posted 28 December 2015 - 02:08 PM

Not entirely sure what you're posting...looks like you had a valid file association in the first command (ftype | find "jarfile") which you then changed in the second command...likely to an invalid path on your system.

If you're looking for help, you may want to start by stating what the problem is and NOT blindly executing commands on your system without paying attention to the instructions included with the

 

I had the previous version of HD and it would start but not save. I purchased the latest version and when I attempt to start it I get the loading image where it gets stuck. 

 

your instructions make almost no sense to me at all. I try to not ever use the command line as I am to much a novus to not mess it up.