Eclipse and myeclipse configuration highlights

Source: Internet
Author: User
1. Set the encoding method
If you want to make plug-in development applications have better international support, to maximize support for Chinese output, it is best to make java files use UTF-8 encoding. However, the default character encoding of the eclipse workspace is the default encoding of the operating system, and the simplified Chinese operating system (Windows XP, Windows
2000 Simplified Chinese) the default encoding is gb18030, the project code created in this workspace is gb18030, And the Java file created in the project is gb18030. If you want to make the new build project, java files directly make the UTF-8, you need to do the following:

1. Windows-> preferences... open the "Preferences" dialog box, left navigation tree, navigate to general-> workspace, right text file encoding, select other, change to UTF-8, and then create a new project its properties dialog box in text
File encoding is UTF-8.

2. Windows> preferences... open the "Preferences" dialog box, navigation tree on the left, navigation to General> content types, context types tree on the right, clicking on text, and selecting JAVA Source
File, enter the UTF-8 in the default encoding input box below, and click Update to set the Java file encoding to UTF-8. Other files related to Java application development, such as properties and XML, have been specified by the eclipse default, respectively for the ISO8859-1, UTF-8, such as the development of the need to change the encoding format can be specified here.

3. After the above two steps, the new Java file is UTF-8 encoding, eclipse compilation, running, debugging is no problem, but the RCP application product output, or plug-in output, there is always an error. Either the compilation fails (compile must be re-compiled during output), or the Chinese characters are garbled during the running of the output plug-in. In this case, add a line to the build. Properties of the RCP application or plug-in Plug-in project, javacdefaultencoding ..
= UTF-8. Let the output compile know the UTF-8 encoding for the Java source file. This setting needs to ensure that all Java source files are in UTF-8 encoding format, if not all, see eclipse help (plug-in development environment guide> reference> feature and plug-in build configuration), it is recommended that all Java source files are UTF-8 encoding.


If the plug-in development, RCP application development based on other encoding, such as gb18030, want to convert to UTF-8, first, do the above work; then through the search encoding conversion tool, for example, based on the iconv batch conversion tool, convert the original encoding to UTF-8 encoding, note that only the conversion of Java source files, other types of files may already be more suitable for encoding;
Text file encoding, from the original encoding to the UTF-8.

2. Set the project compilation environment

Right-click the project and choose Properties> compiler.

3. Set the Java compiling environment

On the menu bar, choose windows> preferences> JAVA> compiler> JAVA compliance.

4. Set the installed JRE

Add the self-installed JRE or JDK to Windows> preferences> JAVA> installed jres on the menu bar.

5. Set the Java execution environment

On the menu, choose windows> preferences> JAVA> installed jres> execution environments to configure the execution environment of each object for the application.

6. Set the code prompt

Windows> preferences> JAVA> editor> content assist

7. Set the color of various types of code

Windows> preferences> JAVA> editor> syntax coloring the preceding Java node selects various content in Java and sets its color. The preview effect is shown below.

8. Disable useless plug-ins of myeclipse, disable automatic updates, and speed up startup

(1) Remove unnecessary modules

Windows-> perferences-> General-> startup and shutdown disable useless startup items:

How can we know which startup items are useful? I want to explain the usefulness of the startup items I know. I hope you can reply to them as follows:

WTP: similar to myeclipse, the main difference is that WTP is free of charge. If myeclipse is used, this can be canceled.

Mylyn: A team task management tool, similar to CVS, which manages the project progress in task units and can be canceled if it is useless.

Derby, for example, I only select tomcat to cancel the project configuration file automatically verified by myeclipse at startup.

By default, myeclipse automatically verifies the configuration file of each project at startup. This is a very time-consuming process. You can select myeclipse-validation in sequence in the preferences window, then, only the manual items can be retained in the validator list on the right. If you only need to select the file for verification, right-click and choose myeclipse-run validation.

Windows-> perferences-> myeclipse-> Validation: Click All items except those in manual. Only classpath dependency validator is left in build.

Manual verification method: Right-click the file to be verified and choose myeclipse> RUN validation spelling check, which will cause us a lot of trouble, our method names will all be abbreviations of words, and they will also prompt errors, so it is best to remove them, which is not very useful: windows> perferences> General> Validation> editors> text
Editors-> spelling

It is not good to open the default editor of JSP in myeclipse. In this case, preview windows-> perferences-> General-> editors-> File Associations and change the default editor
Myeclipse JSP Editor

(2) disable automatic updates.

A) 7.x and above

1. Windows> preferences> General> startup and shutdown> automatic Update Scheduler do not select this option

2. For Windows> preferences> myeclipse enterprise workbench> maven4myeclipse, select download on the right.

B) less than 7.x

1. For Windows> preferences> myeclipse> community essen, select search for new features on startup"

(3) Disable myeclipse updating indexes

Myeclipse always keeps updating index. Research has found that update index... Maven is downloading the update, but it affects the speed of myeclipse. The method to disable the update is as follows: Window => preferences => myeclipse enterprise workbench => maven4myeclipse => Maven => uncheck download
Repository index updates on startup


Note: collected on the network



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.