Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6684993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:00:21+00:00 2026-05-26T05:00:21+00:00

I have a directory tree with several java files. Example: top |– src1 |

  • 0

I have a directory tree with several java files. Example:

top
 |-- src1
 |    |--- folder A
 |    |--- folder B
 |-- src2
 |    |--- folder A
 |    |--- folder B
...

I want to compile all the files in those folders and move the compiled files to folder A-binor folder B-bin accordingly in the respective src folder. I have read that I can do this with the xargs utility, but I can’t make heads or tails from the manual entry.

Can some one point me a way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:00:22+00:00Added an answer on May 26, 2026 at 5:00 am

    Are you obliged to use xargs to compile these?

    Why not take a look at java Makefiles?
    They will make your life easier when building a project.

    Also, one more advice, i recommend that you take look into Apache Maven. Easy to use, and very handful when your java project get bigger in time.
    Here is a quick guide to Maven.

    Basic Makefile:

    JC=javac
    JR=java
    
    build: ref.java
            $(JC) ref.java
    
    run: ref.class
            $(JR) ref
    
    clean:
            rm -f *.class
    

    Another example: (taken from the guide above)

    JFLAGS = -g
    JC = javac
    .SUFFIXES: .java .class
    .java.class:
            $(JC) $(JFLAGS) $*.java
    
    CLASSES = \
            Foo.java \
            Blah.java \
            Library.java \
            Main.java 
    
    default: classes
    
    classes: $(CLASSES:.java=.class)
    
    clean:
            $(RM) *.class 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have been sent a directory tree of source code that i want to
Situation is you have to develop an application against an Active Directory Tree. Want
I have directory with > 1000 .html files, and would like to check all
Let me explain the tree structure: I have a network directory where several times
I have a directory tree with sub-directories, and I want to add it to
I have a large directory tree of files, and am using the following script
I have some files in a directory tree which is being served over HTTP.
I have some folders/files in several drive like C:\New Folder C:\a.txt D:\New Folder\New Folder
I have the following directory tree. - app.rb - folder/ - one/ - one.rb
I have a directory tree structure. Each time I click a folder, jQuery.ajax fires

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.