Marriage Made in Heaven
http://www.youtube.com/user/RohitWaliaWedsSonia
Sandra Bachan wrote:
I navigage to myProject and type in the following:
-classpath ../classes/com/wickedlysmart
I get the error:
bash: -classpath: command not found
Marriage Made in Heaven
http://www.youtube.com/user/RohitWaliaWedsSonia
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Tom Reilly wrote:Your CLASSPATH environment variable holds a relative path so it's important that you run "javac Another.java" from the correct directory. From which directory did you run it?
Marriage Made in Heaven
http://www.youtube.com/user/RohitWaliaWedsSonia
Ankit Garg wrote:As Henry said, don't use relative path in your classpath. If Another.java is in the myProject directory, you can compile it by navigating to myProject directory from shell prompt and issue the command
javac -classpath .:classes Another.java
This command should compile Another.java successfully. The thing to note here is that we include classes directory into the classpath not classes/com/wickedlysmart as com/wickedlysmart is a part of the package name of MyClass...
Marriage Made in Heaven
http://www.youtube.com/user/RohitWaliaWedsSonia
Sandra Bachan wrote:I was finally able to set the classpath. Now when type in:
echo $CLASSPATH
I get:
../classes/com/wickedlysmart
Marriage Made in Heaven
http://www.youtube.com/user/RohitWaliaWedsSonia
There is no beard big enough to make me comfortable enough with my masculinity to wear pink. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|