开发者

java process creation fails when creating from shell script

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜