Swaminathan Raman

Greenhorn
+ Follow
since Mar 07, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Swaminathan Raman

Submitted assignment 1 !
12 years ago
yes...its kinda makes sense. So what would one do if the main source file is in a different directory?

I understand that it is easy to go to the source file directory in my case. But then there could be circumstances where one might want to compile source files in a different directory.

Is there a way out?
16 years ago
Hi ,
This is my first post!

I am having trouble using the sourcepath and classpath options in javac.

HelloWorld.java is in C:\Java.
If I go to C:\Java and use javac it compiles fine.

I am currently in the D:\Documents and Settings\Administrator directory. If I use
javac -classpath C:\Java HelloWorld.java

i am getting file not found : HelloWorld.java.

the same happens when I try javac -sourcepath C:\Java HelloWorld.java

but things work fine if I use the full path C:\Java\HelloWorld.java.

So, why isnt the classpath option working as it is supposed to?

thanks
Kevin
16 years ago