Results 1 to 2 of 2
  1. #1
    kaperks is offline Member
    Join Date
    Jan 2009
    Rep Power

    Default Package Compiling

    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 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.

  2. #2
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Rep Power


    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.

Similar Threads

  1. [SOLVED] Compiling Package Class
    By nwboy74 in forum New To Java
    Replies: 3
    Last Post: 11-15-2008, 12:19 AM
  2. note while compiling
    By j2vdk in forum New To Java
    Replies: 3
    Last Post: 09-04-2008, 12:52 AM
  3. Compiling error
    By lawksalih in forum New To Java
    Replies: 6
    Last Post: 01-29-2008, 08:26 PM
  4. Compiling a class in a package from cmd
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-17-2007, 11:27 AM
  5. Importing / compiling and running with .jar package
    By splinter64uk in forum New To Java
    Replies: 1
    Last Post: 12-05-2007, 03:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts