aspose file tools*
The moose likes Beginning Java and the fly likes Jar question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Jar question" Watch "Jar question" New topic
Author

Jar question

Rus Corina
Ranch Hand

Joined: Jul 08, 2011
Posts: 90
Hello. I have a question. I currently have a project that contains some buttons, to which i added some icons. The problem appears when i make a jar out of my project. The jar file does not take the icons. Does anyonje know what should I do in order to have the icons in the jar?
(I saved the icons in the folder of my project)
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Have you look at the Java tutorials Jar section?


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Rus Corina
Ranch Hand

Joined: Jul 08, 2011
Posts: 90
I know this will sount very stupid, but, here it goes: yes, i've seen it, but i have absolutely no idea where to run this command:
jar cvf TicTacToe.jar TicTacToe.class audio images
or any other commands like this. So if you could help me, i would be really grateful. I only know how to make a jar in netbeans or eclipse.
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

On windows: press windowskey + r, type cmd, ok. Now a black screen will open. This is a console. With the command "cd <dirname>" you can go into a directory, with cd .. you can move up a directory. With the command "dir" you can view the directory content.

Now browse to your project location and then you can use the jar command. If you get the notification that the jar command is unknown then you'll need to add the locationWhereYouInstalledJava/bin to your PATH environment variable.
Rus Corina
Ranch Hand

Joined: Jul 08, 2011
Posts: 90
@Wouter Oet
Thank you very much
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jar question
 
Similar Threads
Loading images in executable jar
WSAD and the Jars (sounds like a good band)
jar runs on desktop but not laptop
Where are the java (standard) icons
problems with runme.jar referencing resources