Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help with java -classpath

 
Matthew Snow
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Matthew Snow
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, maybe because when running cygwin in side a Windows environment, the java man says ; separated. In a linux environment it says : separated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic