Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Compiling many source files at once

  1. #1
    Member
    Join Date
    Jun 2010
    Posts
    75
    Thanks
    7
    Thanked 1 Time in 1 Post

    Default Compiling many source files at once

    I want to compile many .java files at once but don't want to have to enter the file names into the command line one by one. (At this point it is a long and rather irrelevant but nonetheless sordid story why I am not using an IDE.) I have done some cursory googling (not as fun as it sounds) and would like to confirm that if I set the sourcepath to the directory that contains all of the source files, javac will compile all the Java source files in the directory.

    Am I correct?


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Compiling many source files at once

    My advice would be to try what you suggest. Despite the resistance you may have to using an IDE, they are built to handle things such as this, and then some.

  3. #3
    Member
    Join Date
    Jun 2010
    Posts
    75
    Thanks
    7
    Thanked 1 Time in 1 Post

    Default Re: Compiling many source files at once

    Quote Originally Posted by copeg View Post
    My advice would be to try what you suggest. Despite the resistance you may have to using an IDE, they are built to handle things such as this, and then some.
    Oh, I'm not resistant to using an IDE. I've just had two computers fail on me recently and I have been so busy that I haven't really thought about downloading Eclipse again.

  4. #4
    Junior Member
    Join Date
    May 2011
    Posts
    5
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Compiling many source files at once

    Here's what will save you:

    javac -help

Similar Threads

  1. Seraching through files in a folder for a pattern match inside the files.
    By dazzabiggs in forum What's Wrong With My Code?
    Replies: 4
    Last Post: May 2nd, 2011, 08:35 AM
  2. Replies: 1
    Last Post: March 22nd, 2011, 06:59 PM
  3. Help with Compiling
    By w.spidey in forum Object Oriented Programming
    Replies: 10
    Last Post: September 9th, 2010, 01:48 PM
  4. compiling a file
    By jkoracle23 in forum Java Theory & Questions
    Replies: 4
    Last Post: June 19th, 2010, 03:20 PM
  5. Need help compiling java class files
    By peahead in forum What's Wrong With My Code?
    Replies: 5
    Last Post: February 11th, 2010, 09:04 AM