0

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.

3
  • Please past the error you get. Commented Jun 24, 2011 at 9:34
  • 1
    Do you get any error message? If so, please post it in its entirety. Also: since Java 6 you can use somdirectory/* in your classpath to indicate that all .jar files in a directory should be added to the classpath. Maybe that helps. Commented Jun 24, 2011 at 9:34
  • @All : i am not using Java 1.6, instead i am using 1.5, thats the problem. Commented Jun 27, 2011 at 4:52

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.