• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can compile whole package in one time

 
Jack Deng
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got a source code package, but there are plenty of .java files. compile them one by one will waste my time, can anyone tell me how to compile the whole package in one time
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

or
or use ant, which is a build-tool for java.

javac without arguments shows compile-options.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I second Ant.

You might have luck by simply moving all of the source files out of their sub-directories into a common directory, and then running the following command.

javac -d . *.java
 
Jack Deng
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there are some sub folders within the package, can I complie the .java files of the sub folders at the same time?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest removing everything from any sub folders, putting all souce code files in a single folder, then trying the command I posted above.

Did it work?
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic