I have a project that currently has 2 packages associated with it. I have been using Eclipse to compile and run the project, but now I need to take the same project and run it on a *nix machine. I have a current folder structure that looks like: /home/username/test/src/package1 where package1 holds the Main java class and other accompanying classes. Inside that package1 folder, I have a package2 folder that holds other java files that are used by the program, but are not a main part of it. So I have 2 packages in the following locations:
I have tried to compile just the Main.java class, but the compiler throws out errors saying it cant find the other java classes in the package1 folder. I'm hoping it is some option that I am not declaring. Any help is appreciated.
Once you compile in Eclipse, the .class files should be in the bin directory tree. Just copy the contents of that tree to the other box.
Set the classpath to wherever you put the directory tree and run the application.