Forums Register Login

Classpath and Javac .......

+Pie Number of slices to send: Send
Given a directory tree like this:

test
.|-src
....|-project.java

when I run [javac -classpath .\src project.java] in the dir of test, it returned [error: cannot read: project.java 1 error]

Why can't javac find the project.java file??? Anyone can help??
[ August 05, 2006: Message edited by: Jon Lee ]
+Pie Number of slices to send: Send
Is this project.java in some package?

Naseem
[ August 05, 2006: Message edited by: Naseem Khan ]
+Pie Number of slices to send: Send
No, there is no package definition in project.java.

Even if there is, it is not a concern of javac.

The problem here is that javac can not find the project.java file. It seems the classpath option has no effect....dont know why...
+Pie Number of slices to send: Send
 

No, there is no package definition in project.java.

Even if there is, it is not a concern of javac.




project.java is in src, so compile it from src directory.

Naseem
[ August 05, 2006: Message edited by: Naseem Khan ]
+Pie Number of slices to send: Send
Now I know why.

classpath option is for searching the .class files, not the .java file...

Thnx for your comments, mate...
Talk sense to a fool and he calls you foolish. -Euripides A foolish tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 673 times.
Similar Threads
Ant - Cannot find webwork ActionSupport
Modifying JBOSS twiddle code
Juint task in Ant
Classpath Error on Apache ANT
getting errors when building c3p0 from source
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:12:13.