ajoe
ajoe

Reputation: 558

cmd java relative path

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

Answers (1)

adarshr
adarshr

Reputation: 62573

you need to set classpath till the bin folder.

java -cp ./lib/*;./bin com.foo.MyJavaClass

Upvotes: 3

Related Questions