File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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: 14150
    
  18

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://aspose.com/file-tools
 
subject: javac problem