Generate projects, packages, and files in netbeans on Ubuntu

Source: Internet
Author: User
Tags netbeans
Compiling in IDE is very simple. After you have correctly set the compilation class path of the project, you only need to select the project, package, or file to be compiled, and then select the corresponding "generate" or "compile" command. Next, IDE will compile these files.

To compile a project, package, or file in IDE, select it in the project window and perform the following operations:

* In the main menu, select "generate"> "generate main project" (F11) to generate the main project. Alternatively, you can click Generate In the toolbar.
* In the main menu, choose generate> clean and generate main project (Shift-F11) to clean and generate the main project. Alternatively, you can click the "clean and generate" button in the toolbar.
* In the "project" window, right-click the project node and select "generate project" to generate the project.
* In the "project" window, right-click the project and select "Clean up project" to clean up the project.
* In the "project" window, right-click the package and select "compile package" (F9) to compile the package.
* In the "project" window, right-click the file and select "compile file" (F9) to compile the file. Alternatively, select "generate"> "compile file" (F9 ). Note that if you are using a free-format project, this command is disabled by default. You must compile the ant target used to compile the selected file in the IDE and map it to the "compile file" command.

Every time you call a compilation command, IDE displays the output (including any compilation errors encountered) in the "output" window, as described in the following section.

If you expand the standard project directory node in the file window, you will notice that the IDE will compile the class to the build folder. In addition, IDE automatically generates jar files for Java projects from the project source code. The jar file is generated in the DIST directory of the project folder. In a free-format project, the ant script controls the creation of output files.

After F11, a message is displayed.
Init:
Deps-clean:
Deleting directory/home/Vanessa/experence/about/dbinout/build
Deleting directory/home/Vanessa/experence/about/dbinout/Dist
Clean:
Init:
Deps-jar:
Created dir:/home/Vanessa/experence/about/dbinout/build/classes
Compiling 4 source files to/home/Vanessa/experence/about/dbinout/build/classes
Copying 23 files to/home/Vanessa/experence/about/dbinout/build/classes
Compile:
Created dir:/home/Vanessa/experence/about/dbinout/Dist
Building jar:/home/Vanessa/experence/about/dbinout/Dist/dbinout. Jar
Copy libraries to/home/Vanessa/experence/about/dbinout/Dist/lib.
To run this application from the command line without ant, try:
Java-jar "/home/Vanessa/experence/about/dbinout/Dist/dbinout. Jar"
Jar:
Build successful (total time: 2 seconds)
You only need to open the command window
"Java-jar"/home/Vanessa/experence/about/dbinout/Dist/dbinout. Jar "is OK...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.