Reputation: 558
I need to run a java class in cmd line. How would I run a java class without changing directories, but instead specify a relative path? I have tried the following, but to no avail:
java -cp ./lib/*; ./bin/javaclass
Upvotes: 1
Views: 2001
Reputation: 62573
you need to set classpath till the bin folder.
java -cp ./lib/*;./bin com.foo.MyJavaClass
Upvotes: 3