Reputation: 181
I am relatively new to Netbeans and Java, when I compile a project in Netbeans is there a way to view the equivalent javac commands, ie what I would have to run command line to produce the same result?
Upvotes: 0
Views: 1694
Reputation: 1824
As David pointed, Netbeans uses Ant as its build tool, this means it uses a tool to parse a script that describes how to build each part of your project.
If you consider a simple Java program that is made of a single class this may not be significant and you could probably build it manually in the command line. However, any significant project (anything that does any interesting work) will need to compile many files, build the archive structure and every other task related to packing your application.
So, for a short answer you would have to consider the context: 1 - a simple class - yes you can compile manualy reading the output from the console 2 - for a simple project (that means, many classes) - yes, but starts to gets complicated 3 - for a real project (that means, many classes and resources) - no, it is not viable (and this means reasonable and confortable) to do it manualy.
For more info on compiling Java programs (which I think is your real interest) you should check the Javac page for a start (find it here).
Upvotes: 0
Reputation: 66
On your computer go to C:\Program Files\Java\jdk(the version you use)\jre\bin. In bin you will find the commands you can use at the Command Prompt.
Upvotes: 0
Reputation: 220
I use Netbeans 7.3.1 and you can see the building/compiling process in the output windows when you're building the program. Netbeans (my version) uses ANT to build program, so it produces a .jar.
If you want to know more about the details of how they compile a project, you can take a look at ANT http://ant.apache.org/, it's an useful build tool.
Upvotes: 1