Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile a java program from directory?

I'm learning java and I would like to know how to compile a java program from other directory.

For example, my compiler is in my drive c:\ and I want to compile my java program from drive e:\

How should I do that? I'm getting this error, what does it mean? alt text

like image 773
yonan2236 Avatar asked Jul 19 '26 01:07

yonan2236


1 Answers

The current directory should be in the default CLASSPATH, but maybe it's not. Try java -cp . Assignment

like image 197
Todd Avatar answered Jul 21 '26 13:07

Todd