aspose file tools*
The moose likes Beginning Java and the fly likes javac problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
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
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14346
    
  22

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 8 API documentation
Hendra Kurniawan
Ranch Hand

Joined: Jan 31, 2011
Posts: 239
Great. it worked like a charm. Thanks boss.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: javac problem