It's not a secret anymore!*
The moose likes General Computing and the fly likes java -cp windows and linux differences Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "java -cp windows and linux differences" Watch "java -cp windows and linux differences" New topic
Author

java -cp windows and linux differences

Sergio Marcello
Ranch Hand

Joined: Jun 20, 2008
Posts: 36
All,
may be useful: classpath definitions in command line differs if you use windows o.s. or linux:

windows: java -cp "/myJarDirectoryFullPath/theJarfileToInclude.jar;." myCompiledJavaProgram

linux: java -cp "/myJarDirectoryFullPath/theJarfileToInclude.jar:." myCompiledJavaProgram

note the ; in windows and the : in linux.

It can save lots of time, I say you

Regards,
Sergio.
Philip Grove
Ranch Hand

Joined: Aug 18, 2009
Posts: 68

It has nothing to do with Java, but is a platform related issue. It does demonstrate that setting the classpath on the command line is not platform independent as the byte code is.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java -cp windows and linux differences