aspose file tools
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

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "java -cp windows and linux differences" Watch "java -cp windows and linux differences" New topic

java -cp windows and linux differences

Sergio Marcello
Ranch Hand

Joined: Jun 20, 2008
Posts: 36
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

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.
Don't get me started about those stupid light bulbs.
subject: java -cp windows and linux differences
It's not a secret anymore!