Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes Help with java -classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help with java -classpath" Watch "Help with java -classpath" New topic
Author

Help with java -classpath

Matthew Snow
Ranch Hand

Joined: May 02, 2007
Posts: 82
I made a simple Hello World program that uses log4j just so I would have to define a class path. I'm running java 1.6.0_14 in linux and when I run the following command I get the Usage ending with -bash: bin/.: is a directory

java -cp lib/log4j.jar;bin/. testing.Test

If I take out the logging an just have System.out and remove the log4j, it runs just fine. man java says that the class path is supposed to be a ; separated list of directories. How do I do this.


When you break the big rules, you get a lot of little rules.
Matthew Snow
Ranch Hand

Joined: May 02, 2007
Posts: 82
Well, maybe because when running cygwin in side a Windows environment, the java man says ; separated. In a linux environment it says : separated.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help with java -classpath
 
Similar Threads
jdk1.3.0_02 PATH????????????
Why can't run?
PATH Vs. CLASSPATH settings
Taking community college online course in Java 1
Basic help