Chapter 2 Section 6 eclipse alternatives

Source: Internet
Author: User
Section 6 eclipse alternatives

Returned directory

 

Do you think IDE is for cainiao, and Real programmers are using Emacs or VI? Or do you prefer intellij idea instead of another ied? Maybe you don't have a penny, no hard disk space, just a little bit of memory, or you plan to do all the development on Windows notepad; you may have never left visual slickedit or codewright. So is SWT suitable for you?

The answer is yes. Although eclipse is built on top of SWT and cannot be run without it, the opposite is not true: SWT can run well outside of Eclipse. You can develop, generate, and configure SWT programs without using eclipse-as long as the SWT library is enough.

Obtain the SWT Library

Eclipse provides separate SWT downloads on the website. This download contains all the required files-jar files and local libraries-essential tools for building SWT programs. Jar files must be in classpath and native library must be in library path before your program can work. Note that the local database has a version number that changes with the SWT upgrade, so try to use the JAR file packaged with the local database as much as possible. How do I install these libraries on your platform? See the "load SWT library" section before this chapter.

Get jface Library

The jface mentioned in the last part of this chapter is not an independent library-although the eclipse community has been clamoring for it. Currently, the only way to obtain jface is to download and install eclipse. These libraries are included in Java class files, which can be found in the eclipse \ plugins directory. They are:

Org. Eclipse. jface _ <version_number> \ jface. Jar

Org. Eclipse. jface. Text _ <version_number> \ jfacetext. Jar

Org. Eclipse. osgi_3.0.0 _ <version number> \ osgi. Jar

Org. Eclipse. Text _ <version number> \ Text. Jar

Org. Eclipse. Core. runtime _ <version_number> \ runtime. Jar

These files must be in classpath. Because jface is built on SWT, it requires that the SWT. jar file must be in classpath, And the SWT local library (native Library) is in the library path.

Once eclipse is downloaded and installed, you can copy the above files to other locations and delete eclipse. Remember to use the new location when defining classpath.

Use a text editor or other ide

Users who are reluctant to abandon their familiar IDE (netbeans, JBuilder, idea, and others) will not have any problems in developing SWT and jface programs. The following are two key settings:

Adding SWT. jar to classpath

○ Add the local library to the library path

For example, in netbeans 3.5, add SWT. in jar, right-click the file system, select archive file, and find SWT. jar and select it; the method for adding native library is as follows:

1. Select Tools> options from the main menu ).

2. Choose run and debug> RUN type> debugging and executing> execution types> external execution ).

3. Select the external process and choose sort SES.

4. Add the parameter (djava. Library. Path = <path containing the native library>) before {classname ).

There are minor differences in configuring other ides, but the steps are the same: First add SWT. jar to classpath and then add native library to library path.

This method also applies to text editors. If your text editor supports setting classpath and using Java VM parameters to start a program, you can edit, generate, and test SWT and jface programs in the editor. For more information about how to set classpath and library path, see the editor documentation.

If you do not want to bother the text editor, or your editor does not support these settings, you must add parameters to the command line when compiling and running the program. Compile blackwindow. Java from the command line and enter:

Javac-classpath <full path of SWT. Jar> blankwindow. Java

Run this program and enter:

Java-classpath <full path of SWT. Jar>-djava. Library. Path = <full path containing native library> blankwindow

You can compile and run SWT and jface programs regardless of Eclipse, IDE, or text editor.

Tip:For visual slickedit users who want to use eclipse and do not want to discard their favorite editors, visual slickedit can be used as Eclipse plug-ins. Please visit the web page of slickedit (Http://www.slickedit.com/) To obtain more detailed information. It can work under eclipse 2.x, and the company guarantees that it will still be compatible when eclipse 3.0 is released. If you want to use the VI shortcut key, visit the viplugin webpage.Http://www.satokar.com/viplugin/index.php.

 

Returned directory

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.