In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to use eclipse to build J2ME development environment under Linux. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.
Do you know how to build a J2ME development environment with eclipse under linux? there are four main steps.
The process of building J2ME development environment with eclipse under linux
The first is the operating environment and software version:
1. Operating system: ArchLinux (updated to 20081204)
2.JDK environment: jdk-1_5_0_17-linux-i586.bin
Next address: http://java.sun.com/javase/downloads/index_jdk5.jsp
3.Eclipse environment: eclipse-java-ganymede-SR1-linux-gtk.tar.gz
Download address: http://www.eclipse.org/downloads/
4.J2ME version: J2ME_wireless_toolkit-2_2-linux-i386.bin
J2ME_wireless_toolkit-2_2-update_1-linux.zip
5. Download address: http://java.sun.com/products/sjwtoolkit/download-2_2.html
EclipseME environment: eclipseme.feature_1.7.9_site.zip
Download address: http://eclipseme.org/
Installation and configuration of JDK
Copy the jdk installation file to the homework/, in the current user directory to perform the installation directly.
User@~/homework$shjdk-1_5_0_17-linux-i586.bin
Set the jdk environment variable:
User@~/homework$exportJAVA_HOME=/home/kldscs/homework/jdk1.5.0_17 user@~/homework$exportCLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib user@~/homework$exportPATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
If you want to make the environment variables available after the system restart or the user logs out, you can write the contents of the command you just executed to the .bashrc file under the user's root directory, or the system environment variable control file
/ etc/profile
User@~/homework$vi~/.bashrc
User@~/homework$sudovi/etc/profile
Install Eclipse
Extract the Eclipse package:
~ / homework$tar-xvfeclipse-java-ganymede-SR1-linux-gtk.tar.gz
Double-click eclipse in ~ / homework/eclipse/ after pressurization and run it. If you need to define the jre environment, add your JRE path in Window- > Preferences- > Java- > InstalledJREs- > Add.
Select ~ / homework/workspace as the workspace directory here
Install WTK2.2
The command line goes to the directory where J2ME_wireless_toolkit-2_2-linux-i386.bin is stored
User@~/homework$shJ2ME_wireless_toolkit-2_2-linux-i386.bin Setuphasenoughinformationtostartcopyingtheprogramfiles. CurrentSettings: DestinationDirectory / home/user/homework/WTK2.2/ JVMFolder / home/user/homework/jdk1.5.0_17/bin/
If the installation is complete, the following screen appears
Extractingtheinstallationfiles... DocumentationfortheJ2MEWirelessToolkitversion2.2isinthefile / home/user/homework/WTK2.2/index.html InordertostartusingtheJ2MEWirelessToolkit,pleaserun / home/user/homework/WTK2.2/bin/ktoolbar
Patch WTK and extract J2ME_wireless_toolkit-2_2-update_1-linux.zip to the WTK2.2 installation directory.
User@~/homework$cpJ2ME_wireless_toolkit-2_2-update_1-linux.zip./WTK2.2/ user@~/homework$cdWTK2.2/ user@~/homework/WTK2.2 $unzipJ2ME_wireless_toolkit-2_2-update_1-linux.zip Archive:J2ME_wireless_toolkit-2_2-update_1-linux.zip replacebin/libzayit.so? [y] es, [n] o, [A] ll, [N] one, [r] ename:A
Test whether the installation is successful:
User@~/homework/WTK2.2$ cd./bin/ user@~/homework/WTK2.2/bin$./ktoolbar WTKOTAserverstarted...
If the installation is successful, a GUI window will appear.
Install EclipseME
# first decompress eclipseme.feature_1.7.9_site.zip user@~/homework$mkdireclipseme user@~/homework$cpeclipseme. Feature_1.7.9_site.zipeclipseme/ user@~/homework$cdeclipseme/ user@~/homework/eclipseme$unzipeclipseme. Feature_1.7.9_site.zip
Start Eclipse,Help- > SoftwareUpdates- > AvailableSoftware- > AddSite, fill in "/ home/user/homework/eclipseme" and select "EclipseME"-> Install.
There will be an EclipseME option under the Eclipse,Help menu when the installation restarts successfully.
Configure WTK in Eclipse
Start Eclipse,Window- > Preferences to enter the configuration window.
Select the J2ME menu and fill in the WTK installation directory in WTKRoot
J2ME-> DeviceManagement- > Import, enter / home/user/homework/WTK2.2/bin for directory entries, and refresh button Refresh
Determine the Finsh, and then choose a mobile phone skin that you prefer.
J2ME-> Packaging- > Obfuscation, fill in the WTK installation directory / home/user/homework/WTK2.2.
You can write a simple HelloWorld program to test one:
Importjavax.microedition.lcdui.Display; importjavax.microedition.lcdui.Form; importjavax.microedition.midlet.MIDlet; importjavax.microedition.midlet.MIDletStateChangeException; publicclasshelloextendsMIDlet {Displaydisplay; publichello () {super (); display=Display.getDisplay (this);} protectedvoiddestroyApp (booleanarg0) throwsMIDletStateChangeException {} protectedvoidpauseApp () {} protectedvoidstartApp () throwsMIDletStateChangeException {Formform=newForm ("AnotherHelloWorld"); form.append ("HelloWorld!"); display.setCurrent (form) }} on how to use eclipse to build J2ME development environment under Linux is shared here. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.