-
November 1st, 2010, 06:52 PM
#1
NetBeans IDE 6.9.1 jar creation
Hi guys!
I've got a big problem. I made a program in NetBeans IDE 6.9.1 and I wanted to create a jar file from it. Everything went smoothly, but jar wont just open. When I try to execute it from command line it gives me error. I think error is about being unable to find Icon for JFrame (but I can be wrong). The icon image was in project folder and was running in NetBeans normally. Is it possible that NetBeans didnt pack my files (e.g. images) to .jar?
Project name: opt3 with FirstFrame (extends JFrame) class
Error Message in cmd:
Exception in thread "main" java.lang.NullPointerException
at javax.swing.ImageIcon.<init><Unkown Source>
at opt3.FirstFrame.init><FirstFrame.java:24>
at.opt3.Main.main<Main.java:18>
-
November 2nd, 2010, 04:34 AM
#2
Re: NetBeans IDE 6.9.1 jar creation
Is it possible that NetBeans didnt pack my files (e.g. images) to .jar?
Yes that is possible.
The thing to do is to look in the jar and see what is in it. A Jar file is basically a zip file so any unzip program will be able to open it. If you don't have access to an unzip program rename the .jar file to .zip and (assuming you are a Windows machine) you will be able to open it as a compressed folder.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|