This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes javac problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "javac problem" Watch "javac problem" New topic
Author

javac problem

Hendra Kurniawan
Ranch Hand

Joined: Jan 31, 2011
Posts: 239
x
Hendra Kurniawan
Ranch Hand

Joined: Jan 31, 2011
Posts: 239
x
Jesper de Jong
Java Cowboy
Bartender

Joined: Aug 16, 2005
Posts: 12953
    
    3

Instead of going to C:\java\project\com\test, go to C:\java\project. Then, make sure your classpath is correct and it contains the base directory where the *.class files can be found for the package that you are importing. For example (if you want your compiled classes in C:\java\result):


cd \java\project
javac -cp \java\result;C:\mylib\lib\*.jar com\test\utility\file2.java -d \java\result
javac -cp \java\result;C:\mylib\lib\*.jar com\test\source\*.java -d \java\result


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Hendra Kurniawan
Ranch Hand

Joined: Jan 31, 2011
Posts: 239
Great. it worked like a charm. Thanks boss.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: javac problem