Results 1 to 5 of 5
  1. #1
    Chasingxsuns is offline Member
    Join Date
    Jul 2009
    Posts
    56
    Rep Power
    0

    Default Compiling Multiple Files

    I have multiple .java files in a folder. I try to compile them separately from the command line, but it gives me errors saying it can't find objects of the other classes. So do I compile the folder as a whole? If so, how do I go about that?

  2. #2
    FlyNn is offline Senior Member
    Join Date
    Feb 2010
    Posts
    128
    Rep Power
    0

    Default

    try using jCreator or something like that...then you put all files in a project and compile the project.
    Measuring programming progress by lines of code is like measuring aircraft building progress by weight.

  3. #3
    Chasingxsuns is offline Member
    Join Date
    Jul 2009
    Posts
    56
    Rep Power
    0

    Default

    Well I'd like to know how to compile it specifically from the command line. Because in the IDE, they build successfully, but when I use the javac <path>.java command, I get the errors about not recognizing other classes...which confuses me.

  4. #4
    FlyNn is offline Senior Member
    Join Date
    Feb 2010
    Posts
    128
    Rep Power
    0

    Default

    Hmmmm...interesting. what about telling the compiler to use all .java files.

    do cd<path> whern you are in the folder try:

    javac *.java

    I assume this should look for all .java files, stack them and compile...
    Measuring programming progress by lines of code is like measuring aircraft building progress by weight.

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,006
    Rep Power
    20

Similar Threads

  1. Project containing multiple source files
    By mr smiley in forum Eclipse
    Replies: 0
    Last Post: 04-25-2009, 10:31 PM
  2. grep on multiple files using Runtime.getRuntime().exec()
    By cprash.aggarwal in forum Advanced Java
    Replies: 3
    Last Post: 02-11-2009, 06:55 AM
  3. Behaving text files like binary files
    By Farzaneh in forum New To Java
    Replies: 2
    Last Post: 08-27-2008, 03:20 PM
  4. multiple class files
    By nemesys571 in forum Eclipse
    Replies: 0
    Last Post: 06-26-2008, 01:58 AM
  5. Opeing multiple pdf files in different acrobat reader windows
    By shweta.ahuja in forum Web Frameworks
    Replies: 2
    Last Post: 05-07-2008, 12:33 PM

Posting Permissions

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