How eclipse sets up the compiled file. Class Output path

Source: Internet
Author: User

1. First I found out that the-->project-->build automatically in my eclipse was ticked off. All right, get rid of the front hook.

2 after removing I first clean--clean projects selected below---Select project-->ok

3. With the second step, I think this must be done, but when I project-->build all, I still can't find what I need *.class

What can be done about it.

The cause of this problem is often that you import the project directly, and did not import all the project files, resulting in the compilation, though, but in the original directory to store the. class file is not the output path of the new project.

This is how you set it up.

Two methods:

First, set the. class setting output path for the project

Right-click Project > Properties > Java Build Path > Source > Default Output Folder

When you click "Browse", you can select a directory or create a new directory to hold the. class file

This sets the output path of the. class file that is generated after the compilation of the. java file.

After the setup is complete, the. java files in SRC are compiled with a. class file that corresponds to the directory of the package

stored in the classes directory.

Second, set the global. class file Output path

Window > Preferences > Java > Build Path > Source and Output Folder

Such as:

When you create a new project, the. class file is automatically placed in the directory you set, such as:

How eclipse sets up the compiled file. Class Output path

Related Article

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.