Q:

Cannot execute Java Classes on OSX

I'm trying to execute a java build using commandline in OSX 10.10,
The command I'm using:
java -classpath ./bin;./libs/log4j-1.2.17.jar example.hello.Server localhost:80

I've got MAMP up and running on the classPath and java is in the same "classes" directory.
Terminal is showing all options that can be used with java and is not executing the file. The same happends when using -cp.
Thanks

A:

You have a misplaced ; instead of : in your classpath string. Try:
java -classpath ./bin:./libs/log4j-1.2.17.jar example.hello.Server localhost:80

Remember on OSX (or any other Unix flavor system) path separator is : not ; as on Windows/DOS

