Setting to many jars in classpath
Hi,
I am having a tough Q ahead me. Suppose my application uses some 50 jar found in c:\jars folder. now in classpath i have to set all the jars one by one e.g. c:\jars\1.jar;c:\jars\2.jar;c:\jars\3.jar ...etc. Now adding 50 jars and again accessing all those jars from Classpath from a java file gives classpath too long error. is there any way to resolve it?
[373 byte] By [
tapan_195a] at [2007-10-2 17:15:23]

Using Class-Path manifest entry is one way to deal with this problem. Do the following:
vi manifest
It should contain the following:
Class-Path: 1.jar 2.jar 3.jar ...
jar cvf cvfm all_jars.jar manifest
Copy this all_jars.jar to c:\jars dir.
Now you can run your app using only c:\jars\all_jars.jar in classpath.
For more info on this, refer to http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Main%20Attributes
and
http://java.sun.com/j2se/1.5.0/docs/guide/extensions/extensions.html#download
Thanks,
Sahoo
sahooa at 2007-7-13 18:30:52 >
