Hello Friends I have created a java application which I now need to jar up and make the client run usign command prompt. Now these classes inorder for them to compile correctly they need loads of other IBM Jars. And to run they need other set of jars what is the best way to create my application jar. I do not want to have any third party jars inside my application jar as it would be inflexible. What is the general procedure regarding creating application jars and third party jars Any help will be much appreciated.. Regards Farouk
First club your custom application in a jar file. And put other required jars (IBM’s jars and jars required by IBM’s jars) to JAVA_HOME\jre\lib\ext folder.
Whatever jars you put in JAVA_HOME\jre\lib\ext folder is automatically available runtime. No need to include them in classpath.
My blood is tested +ve for Java.
Joined: Jun 08, 2005
Thanks for your help So for run time jars I am sorted what about compiled classes as my applicaiton requires certain jars from IBM to even compile. So if I jar my class files only without IBM Jars which I used to compile will it work
Joined: Aug 10, 2005
>will it work Try it and see. Often faster and usually you get the correct answer.
Originally posted by Chetan Parekh: Whatever jars you put in JAVA_HOME\jre\lib\ext folder is automatically available runtime. No need to include them in classpath.
That is seriously flawed advice. Let's assume you overcome the practical problems in updating a user's JRE folder. Those jars can run unrestricted regardless of any security settings. The extension folder is for bona fide Java extensions. Use -classpath setting of java and javac and the Class-Path setting in you manifiest for jar files that need to designate dependent jars.