This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I developed a java programm by useing JBuilder 5.0 and it kept in a package such as 'eis' and other class files remained in classes subdirector of 'eis'. There is a WelcomeFile that I want to come first. Will I need to cut of all classes main method excepting WelcomeFiel? How can I take the WelcomeFile into manifest file? What will be the command for 'jar'?
You need not cut any main method from ur class files. U have to create the jar file with manifest inside. That manifest should specify which class file to be executed(ie,which class's main method). create jar file as jar cmf <name of the jar> manifest.mf <list of class and other files> Manifest file should contain following text Main-Class:WelcomeFiel Run the jar file as java -jar <name of the jar>
After you create the jar file, you can change the manifest file as follows: Create a text file containig only the following line, say you name it change.txt: Main-Class: WelcomeFile Then you can run the following command to modify the manifest file: jar umf yourApp.jar change.txt Now, you can run the application using the following command: java -jar yourApp.jar It would go to the Welcome file's main now. Good luck, Payam.