This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes compile problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "compile problem" Watch "compile problem" New topic
Author

compile problem

Anand Divakaran
Greenhorn

Joined: Jul 20, 2007
Posts: 11
Assume i have a package tv, consisting of an interface and two classes class1 and class2 ,all the three stored in separate files within tv
class2 implements the interface and extends class 1

i successfully compiled the interface file and class1.
HOW DO I COMPILE CLASS 2...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41598
    
  55
By doing a "javac tv\Class2.java" while you are at the root of the package hierarchy (which means one level up from Class2).

Alternatively, you can compile all of them together by "javac *.java" or "javac tv\*.java", depending on the directory you're in.


Ping & DNS - my free Android networking tools app
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: compile problem