Results 1 to 7 of 7

Thread: Jar problem

  1. #1
    carderne is offline Senior Member
    Join Date
    Nov 2007
    Posts
    160
    Rep Power
    8

    Default Jar problem

    I'm writing my program with Netbeans 6.5. When I run my program from within Netbeans, all the icons are present but if I double click on the .jar file that Netbeans creates, the program runs but all of the icons are missing... I know that the icons are there because if I open the .jar file in WinRAR, I can see them in the '/src/<projectname>/resources/' folder.

    Any idea what's up?

    No wait, now nothing happens when I double click the .jar file... But I have other .jar files that do to when I double click...

  2. #2
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    7

    Default

    perhaps you are using explicit paths instead of relative paths to your icons?

  3. #3
    carderne is offline Senior Member
    Join Date
    Nov 2007
    Posts
    160
    Rep Power
    8

    Default

    No it's all relative. ;-) but the jar won't run at all anyway...
    Last edited by carderne; 07-16-2009 at 05:48 PM.

  4. #4
    carderne is offline Senior Member
    Join Date
    Nov 2007
    Posts
    160
    Rep Power
    8

    Default

    Bumpity bump.

  5. #5
    carderne is offline Senior Member
    Join Date
    Nov 2007
    Posts
    160
    Rep Power
    8

    Default

    Bumpity bump.

  6. #6
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    7

    Default

    I suggest that you run the jar from the command line and see if the jvm is spitting out some output.

    java -jar MyJarApp.jar

  7. #7
    carderne is offline Senior Member
    Join Date
    Nov 2007
    Posts
    160
    Rep Power
    8

    Default

    What I've just realised is that although the JAR file had all the images in it, it wasn't accessing those and wanted the images to actually be in a folder with the JAR file...

    I put the JAR file on another computer and it did run, so there's probably something slightly wrong with the Java installation on my main computer. I'll try the command line and see if that works better. Thanks ter much. SOLVED.

Tags for this Thread

Posting Permissions

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