Reputation: 16646
I have a problem, that whenever i try to create java process from shell script, it is unable to create a process with the classpath i need to add. When i do not add the classpath the java process is created properly without any exception or problem.
Actually, i have somewhere around 300 external jars, i need to use and need to add all of them.
Can the large number of jars file, or this much long classpath, create this issue. Because, i have faced similar issue with weblogic, as when I added a long classpath in the weblogic startup file, weblogic failed to start.
Thanks.
Upvotes: 0
Views: 146
Reputation: 533530
With Java 6 you can use a class path which contains a wild card.
So if you have many jars, but just a few directories, the class path need not be very long.
http://download.oracle.com/javase/6/docs/technotes/tools/windows/classpath.html
For example, if the directory foo contains a.jar, b.jar, and c.jar, then the class path foo/* is expanded into foo/a.jar;foo/b.jar;foo/c.jar, and that string would be the value of the system property java.class.path.
Upvotes: 2