This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Package Compilation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Package Compilation" Watch "Package Compilation" New topic
Author

Package Compilation

Chris Linde
Greenhorn

Joined: Oct 15, 2001
Posts: 10
I have two classes:
File 1:
package MyPackage;
class Balance{
String name;
int bal;
Balance(String n, int b){
name = n;
bal = b;
}
void show(){
if(bal>0)
System.out.println("--> " + name + " " + bal);
}
}
File 2:
package MyPackage;
class AccountBalance{
public static void main(String args[]){
Balance current= new Balance("Me", 0);

}
}
These seperate files both include the package statements, and are both physically located inside the MyPackage directory. The directory structure is:
C:\Exam\MyPackage
I have fooled around with various import statements, tried moving to the above directory, mumbulled incantions to several fire-gods, but I can't get these to compile. What should I do!?!?
frank davis
Ranch Hand

Joined: Feb 12, 2001
Posts: 1479
First of all, fire gods are for run time errors, not compile errors. Secondly, mortals need to know the error message you are getting.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Package Compilation
 
Similar Threads
how to compile packages
package problem
package importing problem
Simple Package Problem.....
Why am I not able to this code in eclipse?