Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-29-2004, 08:19 PM
|
#1
|
LQ Newbie
Registered: Apr 2004
Posts: 28
Rep:
|
shell script to compile java
Hi, I need a shell script to do this.
in some directory, ls *.java
then, go loop to compile each java file,
the output look like this
----------- in this directory have 5 java files ------------
java1.java
java2.java
.....
----------- compile -----------------------------
*** compile java1.java ****
*** finish it *****
*** compile java2.java *****
*** finish it ******
---------------------
Thanks
|
|
|
04-29-2004, 11:17 PM
|
#2
|
Senior Member
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821
Rep:
|
I would suggest using ant.
http://ant.apache.org/
|
|
|
04-30-2004, 08:20 AM
|
#3
|
Member
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895
Rep:
|
How about:
javac *.java
Also, typically if you compile 1 java file, and it makes use of other java files that aren't compiled yet, it will compile those as well.
|
|
|
04-30-2004, 09:24 AM
|
#4
|
Member
Registered: Aug 2003
Location: Omaha, NE, USA
Distribution: PCLinuxOS 2007
Posts: 808
Rep:
|
deiussum's suggestion is good, but for myself, I am an ant addict. Ant gives you a much finer, scripted control over exactly what is going on.
|
|
|
04-30-2004, 09:42 AM
|
#5
|
Member
Registered: Dec 2003
Location: Johannesburg, South Africa
Distribution: Mandrake
Posts: 48
Rep:
|
just download eclipse... you can script ant builds in it if you really want, but the files compile automatically anyway so you can just set and output dir and your classes will always be there
|
|
|
All times are GMT -5. The time now is 11:18 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|