Hi,i have a program and i created into a jar file,but the problem is when i am going to remove the jar file into the directory where my java classes and pictures resides,when i click the jar file the picture of my buttons are gone.can you help me please how can i make my picture visible to the jar file without putting back the jar file into the directory.or how can i generate another jar file that will include pictures.
jemz
-1
Master Poster
Recommended Answers
Jump to PostThis explains how to do it
Jump to PostCan you put the images, etc in the jar file? Then they would always be at the same location.
I use the jar command to add files to a jar file.
Jump to PostFirst read the doc for the jar command.
Then try using it to create a jar file and add files to a jar file.
Here is a batch file I use to create a jar file:REM Make FTPUpLoader.jar file Set JarName=%JAVA_RUN%\FTPUploader.jar %DEV_DRIVE% cd %DEV_HOME%\JavaDevelopment\NormsDev\FTPUpLoader\ jar -cmf …
Jump to Post@James, i read the link,as i understand i need to include the directory of my images?but i did not put the images in the folder.my java class and images are inside in one directory.
You will find that it's easier to update and maintain your application if you …
Jump to PostHere's the procedure on how to include a images on a java file (basic):
1. Create an Manifest file, this contain the Main class of your jar fileManifest-Version: 1.0 Main-Class: Main
where Main is your Main-Class
2. Execute the jar command to create a jar …
All 28 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
NormR1
563
Posting Sage
Team Colleague
jemz
-1
Master Poster
jemz
-1
Master Poster
NormR1
563
Posting Sage
Team Colleague
jemz
-1
Master Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
barramedalb
5
Newbie Poster
jemz
-1
Master Poster
NormR1
563
Posting Sage
Team Colleague
jemz
-1
Master Poster
jemz
-1
Master Poster
NormR1
563
Posting Sage
Team Colleague
jemz
-1
Master Poster
NormR1
563
Posting Sage
Team Colleague
jemz
-1
Master Poster
jemz
-1
Master Poster
NormR1
563
Posting Sage
Team Colleague
jemz
-1
Master Poster
NormR1
563
Posting Sage
Team Colleague
jemz
-1
Master Poster
jemz
-1
Master Poster
NormR1
563
Posting Sage
Team Colleague
jemz
-1
Master Poster
jemz
-1
Master Poster
jemz
-1
Master Poster
jemz
-1
Master Poster
jemz
-1
Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.