import Football.StadiumWorker;
import Football.FootballMatch;
import Football.Menu;
import java.util.LinkedList;
public class Main
{
...
}
Then in the same place where is Main.java file i have folder Football with four files in it:
FootballStadium.java:
package Football;
import java.util.LinkedList;
class FootballStadium
{
...
}
StadiumWorker.java:
public package Football;
import java.util.LinkedList;
public class StadiumWorker
{
...
}
FootballMatch.java:
package Football;
import java.util.Random;
public class FootballMatch
{
...
}
Menu.java:
package Football;
import java.util.LinkedList;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.lang.NumberFormatException;
public class Menu
{
...
}
I try to compile that on linux using command javac Main.java, but get sucg erros:
./Football/StadiumWorker.java:1: class, interface, or enum expected
public package Football;
^
Main.java:1: cannot access Football.StadiumWorker
bad class file: ./Football/StadiumWorker.java
file does not contain class Football.StadiumWorker
Please remove or make sure it appears in the correct subdirectory of the classpath.
import Football.StadiumWorker;
By the way when i work on windows xp in eclipse IDE, it compiles my program well. Any help?
Edited by ZekeDragon, 05 October 2010 - 05:16 PM.
Please use [code] tags when posting code.


Sign In
Create Account


Back to top









