Results 1 to 7 of 7
Thread: Jar problem
- 07-14-2009, 02:53 PM #1
Senior Member
- Join Date
- Nov 2007
- Posts
- 160
- Rep Power
- 6
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...
- 07-15-2009, 06:00 AM #2
perhaps you are using explicit paths instead of relative paths to your icons?
- 07-15-2009, 09:35 AM #3
Senior Member
- Join Date
- Nov 2007
- Posts
- 160
- Rep Power
- 6
No it's all relative. ;-) but the jar won't run at all anyway...
Last edited by carderne; 07-16-2009 at 04:48 PM.
- 07-16-2009, 04:50 PM #4
Senior Member
- Join Date
- Nov 2007
- Posts
- 160
- Rep Power
- 6
Bumpity bump.
- 07-20-2009, 08:17 AM #5
Senior Member
- Join Date
- Nov 2007
- Posts
- 160
- Rep Power
- 6
Bumpity bump.
- 07-20-2009, 07:15 PM #6
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
- 07-20-2009, 08:22 PM #7
Senior Member
- Join Date
- Nov 2007
- Posts
- 160
- Rep Power
- 6
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.


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks