Writing and compiling aglet programs with Eclipse

Source: Internet
Author: User
Tags win32 zip

1. Eclipse Installation and configuration

1.1 The version used is Eclipse-java-europa-winter-win32.zip . Can be downloaded at the following official website:

http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/europa/winter/ Eclipse-java-europa-winter-win32.zip

Eclipse Installation Screen

Select the workspace, where you can select the default (when used Project The path can be a select alternative)

1.2 Configuration

Eclipsecan automatically identifyJDK,JREthe current path, so no additional configuration is required. It can be used after the installation is complete. What needs to be explained is thatEclipsecan only be established inJDK1.5the above version ofJava, so you must use a newerJDK, such asJdk-1_5_0_15-windows-i586-p.exe.

2. Write the aglet program under Eclipse

2.1 first in ide < Font face= "Times New Roman" >java helloworld eclipse

2.2 and then create another one . Project , named ASMA .

    becauseTahitiof theAgletStore directory defaults toC:javaagletspublic, we use this directory. The newProjectREDIRECT to this directory, note the following image in theProject Layoutthe preset is very important. This option guarantees that the compiled file is exported to the currentProjectTable of Contents.

Create a new name named ASMA of the Project

2.3for a newly createdASMA Project, we need to importAgletLibrary files for compilation (otherwiseImport COM.IBMwill complain). Method is toProjectname right key point Property, on the left ofJava Build Paththe next selection corresponds to the rightLibrary, and then dotAdd External Library. The following figure

Here we need to note that we should select the path forC:javaagletslibunder theaglets- 2.0.2 . Jar, and not any other path under theAglets-2.0.2.jar!. Only under this path.Aglets-2.0.2.jarcontainsCom.ibm.agletThis bag (can be opened to look under the check). Special attention not with installationAgletplatform is used when theAglets-2.0.2.jarconfusing! After a successful import, you can see theJREmore than one.Aglets-2.0.2.jarlibrary file, and the path matches the above.

2.4In addition, you must check the same dialog boxSourcethe contents of the label. IfSource Folder on Build PathNothing in it has to be manual .ADD Folder, and choose ourProjectdirectory. If so, you do not need to add it again. BecauseEclipseThere is a save that compiles the function, if saveJavafile does not find the same name in the directory afterclassfile, it indicates that this setting is likely to be problematic. BecauseEclipseyou don't know what you need to compile.source Folderwhere.

used for compilation. Source Table of Contents check

2.5Once you've set it up, you can start writing.Agletprogram. This still appliestestagentas a test object (code slightly). Write the code and save it and find it.ProjectThere 's one more in the directory.classfile, DescriptionEclipsecan be normal forAgletof writing, compiling and working. The following figure is the workIDE:

set up a good Eclipse Edit Environment



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.