Results 1 to 4 of 4
Thread: Executing a executable .jar file
- 11-26-2012, 12:32 AM #1
Member
- Join Date
- Nov 2012
- Posts
- 12
- Rep Power
- 0
Executing a executable .jar file
I've been working on a game, and up until now, I was using just a .bat file to launch it outside of my editor (JGrasp). In the interest of making it multi-platform, I've made it into an executable .jar file. Problem is, running the .jar file doesn't do anything. No output, no errors, no windows, nothing. Ordinarily, it puts all its output into a dos window, when I use the .bat file, or when I run it with JGrasp. Even if I use the console to execute the .jar, it doesn't work, it just goes onto the next line.
Is there something I have to do with my code to make it print out into a dos window? I know my .jar file is done properly (with a manifest, with all the classes, and with the other necessary files), I did it first manually (using the command prompt) and later I used the JGrasp jar creator, so I know that it should be working. But, for some reason, it doesn't do anything. Thanks for you help!
- 11-26-2012, 02:49 AM #2
Re: Executing a executable .jar file
You have to execute the .jar with the java executable. Not the javaw executable, which is usually the default, and which doesn't open a command prompt (useful for GUI applications).
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 11-26-2012, 04:06 AM #3
Member
- Join Date
- Nov 2012
- Posts
- 12
- Rep Power
- 0
Re: Executing a executable .jar file
SO then how would I tell it to launch the jar with java instead of javaw everytime?
-
Re: Executing a executable .jar file
What you need to do is to set your OS to launch the jar file with java.
Similar Threads
-
create windows executable using executable jar file
By sarwar1234 in forum New To JavaReplies: 2Last Post: 02-07-2011, 08:29 PM -
Create Executable Jar file
By sarwar1234 in forum New To JavaReplies: 11Last Post: 10-28-2010, 12:26 PM -
Executable jar file
By franklyn@bellsouth.net in forum New To JavaReplies: 12Last Post: 08-26-2010, 01:03 PM -
Executable File.
By BeeGee in forum Advanced JavaReplies: 13Last Post: 05-25-2010, 12:35 PM -
Error while executing the executable jar file using Java webstart (JNLP)
By praveen_has in forum New To JavaReplies: 0Last Post: 04-28-2010, 03:33 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks