This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
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: 14428
    
  23

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javac problem