jQuery in Action, 3rd edition
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 Building Microservices this week in the Design 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.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: java -cp windows and linux differences
It's not a secret anymore!