I have seen questions and (limited)examples on various places on the web but I am yet to see an example that shows how to create a manifest file that includes a main class file and a number of others(including inner classes),gif or jpeg images and or sounds. i would love to create an application that only requires double clicking an icon to start it. please give me a detailed example of creating jar files. thanx
For the bat file open up notepad and save as "***.bat", that is a bat file. Now here is what I put in mine: cd c:\ c:\jdk1.3.1_02\bin\java dmsi.campaignbuilder.CampaignBuilder Note: I have not set my classpath and I am running a application in a jar file. To see how I was able to jar this application, there is a thread under the beginners forum from about 1-2 days ago. Hope this helps. Dean
.bat and .sh files are scripting files for windows and linux/unix (respectively). they are just text files that contain a list of commands to be run. try this: open up notepad, type in "echo hello world!" then save as "hello.bat". go to command prompt (start, run, type in "command" if you are on win9x, or "cmd" if you are on win2k) then change to the directory where the hello.bat file is. type in "hello.bat" and press enter. it will print out "hello world". for more info, do a search for "batch file tutorial" on your favorite search engine.
use the [CODE] tags - it makes it much easier for people to help you.
Joined: Sep 29, 2000
For a simple case where there is no jar file no other jar files to consider (and the jdk is in c:\dir\jre\bin - but you can change that) you have 3 commands. 1 Get to the correct directory. 2 - Set the path. 3 Call java (or javaw) with a classpath parameter (most likely) and name the class to execute. In file Appl.bat you put: cd \dir path = .;C:\dir;C:\dir\jre\bin; "c:\dir\jre\bin\javaw" -classpath .;"c:\dir" Appl
For a complicated example that has the runtime stuff embedded in the HUGE classpath statement, and is expecting a properties file in- something like this (still 3 commands): cd \dir path = .;C:\dir;C:\dir\jre\bin; "c:\dir\jre\bin\javaw" -classpath .;"c:\dir";"c:\dir\Appl.jar";"c:\dir\deploy.jar";"c:\dir\jre\lib\rt.jar";"c:\dir\jre\lib\jaws.jar";"c:\dir\jre\lib\i18n.jar";"c:\dir\classes12.jar";"c:\dir\images" Appl.someSubDirectory.Appl "c:\dir\APPl.properties"