Results 1 to 4 of 4
  1. #1
    angrylolrus is offline Member
    Join Date
    Nov 2012
    Posts
    12
    Rep Power
    0

    Default 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!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,250
    Rep Power
    19

    Default 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).

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    angrylolrus is offline Member
    Join Date
    Nov 2012
    Posts
    12
    Rep Power
    0

    Default Re: Executing a executable .jar file

    SO then how would I tell it to launch the jar with java instead of javaw everytime?

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. create windows executable using executable jar file
    By sarwar1234 in forum New To Java
    Replies: 2
    Last Post: 02-07-2011, 08:29 PM
  2. Create Executable Jar file
    By sarwar1234 in forum New To Java
    Replies: 11
    Last Post: 10-28-2010, 12:26 PM
  3. Executable jar file
    By franklyn@bellsouth.net in forum New To Java
    Replies: 12
    Last Post: 08-26-2010, 01:03 PM
  4. Executable File.
    By BeeGee in forum Advanced Java
    Replies: 13
    Last Post: 05-25-2010, 12:35 PM
  5. Replies: 0
    Last Post: 04-28-2010, 03:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •