Results 1 to 6 of 6
- 05-20-2012, 10:03 PM #1
Member
- Join Date
- May 2012
- Posts
- 3
- Rep Power
- 0
javaw -jar works but javaw doesn't
Hello everyone,
In the command-line javaw -jar [something.jar] launches, but javaw [something.jar] does not launch.
I am try to diagnose why my file association of javaw with .jar files resists execution. It works on my home pc, but not on my laptop.
Both are running windows 7 and are using the most up to date Java7 development and runtime environments.
If anyone knows a way to fix this, it would be much appreciated. If I can't fix this, I'll end up making .exe files out of my java applications, which isn't the way I'd want to go.
Thanks,
DCurro
- 05-20-2012, 10:51 PM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,545
- Rep Power
- 11
Re: javaw -jar works but javaw doesn't
javaw.exe is fairly silent about errors: there could be a missing class or something and you wouldn't know about it. Make sure the program runs using java before trying javaw and also make sure that it runs from the command line before associating the corresponding command with the file type.
javaw (without -jar) should be given the name of a class to run, not the name of a jar file.
- 05-21-2012, 01:38 AM #3
Member
- Join Date
- May 2012
- Posts
- 3
- Rep Power
- 0
Re: javaw -jar works but javaw doesn't
java -jar runs my jar file from the commandline
javaw -jar runs my jar file from the commandline
javaw doesn't run my jar file from the commandline (this works on my other computer)
javaw is set as associated with the .jar type but double clicking doesn't execute anything.
- 05-21-2012, 01:50 AM #4
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,545
- Rep Power
- 11
Re: javaw -jar works but javaw doesn't
As noted above, I wouldn't expect it to. javaw.exe (and java.exe) used without -jar expect the name of a class, not a jar file. (See the "Synopsis" at the top of the man page.)javaw doesn't run my jar file from the commandline
- 05-21-2012, 05:25 PM #5
Member
- Join Date
- May 2012
- Posts
- 3
- Rep Power
- 0
Re: javaw -jar works but javaw doesn't
Understood, but my concern isn't with the command line. I'm looking to have my .jar applications launch upon a double click.
I retested the same .jar files between my home computer and my laptop, and the results are that the home computer launches .jar files with the file association of javaw, whereas my laptop refuses to run .jar files with the association javaw.
These two computers have the same operating system and java was set up on both computers on the same day.
- 11-29-2012, 08:47 PM #6
Member
- Join Date
- Nov 2012
- Posts
- 1
- Rep Power
- 0
Re: javaw -jar works but javaw doesn't
Hi DCurro, did you happen to get this issue resolved? I am seeing the same symptoms. I can start my program from the command prompt with "java - jar my.jar" but double clicking, which I understand runs javaw, doesn't start my program. I built my Jar with NetBeans if that is any indication.
Similar Threads
-
Why is javaw.exe Randomly Disappearing
By Land Of Java in forum JavaFXReplies: 0Last Post: 10-05-2011, 08:43 PM -
javaw.exe Keeps encountering a problem, please help?
By MattRussell in forum Java 2DReplies: 17Last Post: 08-22-2011, 12:22 AM -
javaw cpu
By trishtren in forum New To JavaReplies: 1Last Post: 04-18-2011, 02:13 PM -
javaw.exe problem in Task Manager
By sarwar1234 in forum New To JavaReplies: 5Last Post: 09-30-2010, 01:47 AM -
javaw.exe running jbroker.exe?????
By fxRichard in forum Advanced JavaReplies: 3Last Post: 05-11-2009, 11:09 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks