In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to build and run the J2ME development environment, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's learn about it!
Build J2ME development environment
1. You should download the relevant software from the address below.
J2SDK1.4.2x03WTK2.1: http://java.sun.com
Eclipse3.0RC2 http://www.eclipse.org
EclipseME0.4.1 http://sourceforge.net
two。 I won't say any more about installing J2SDK1.4.2_03, WTK2.1, Eclipse3.0RC2, and EclipseME0.4.1 sequentially, and setting environment variables such as classpath, path, and JAVA_HOME after installing j2sdk. After setting up, you can write a test program HelloWorld.java to test. Enter javacHelloWorld.java at the command line to get the class file, and then enter javaHelloworld to output HelloWorld on the screen, which means that j2SDK is installed correctly.
PublicclassHelloWorld {publicstaticvoidmain (String [] args) {System.out.println ("Helloworld");}}
The next step is to install WTK2.1, just like a normal application installation. After installation, you can run some Demo that comes with WTK2.1 from KToolBar. If it runs normally, it means that WTK is installed correctly. Next, we need to build the development environment of Eclipse. The installation of Eclipse is very simple. You can decompress Eclipse3.0RC2 directly to c:\ eclipse. Run Eclipse.exe directly so you can see the running interface of Eclipse. If you haven't used Eclipse, you can take a look at the help documentation and run a small java project yourself. Next we are going to install the plug-in for EclipseME.0.4.1, close Eclipse and extract EclipseME0.4.1 to c:\ eclipse\ plugin, restart Eclipse, and select windows- > preferences to configure the J2ME development environment.
Select PlatformComponents- > WirelessToolkits, then right-click addWirelessToolkit and the following interface will appear
Select the installation path of your WTK and select OK so that you have set up the development platform for J2ME. Because CLDC/MIDP is flexibly configured, you can also create other platforms to use other simulators, please refer to the help documentation in EclipseME.
After the 3.J2ME development environment is built, let's create a new small project to explain how to use it to develop J2ME projects. Select file- > new- > others- > J2ME-> J2MEMIDletsuite, then fill in the name of the project, such as helloworld, and select the next step * * to complete, so we have created a new J2ME project.
Next, select the project helloworld from PackageExplorer and create a new J2MEMIDlet named HelloMIDlet.
Then it is time to edit the code, which is as follows:
Packagecom.paulsjavabooks.instantj2me.Chapter1; importjavax.microedition.midlet.*; importjavax.microedition.lcdui.*; publicclassHelloextendsMIDlet {privateDisplaydisplay; publicHello () {display=Display.getDisplay (this);} publicvoidstartApp () {TextBoxt=newTextBox ("HelloMIDlet", "HelloMIDP!", 256); display.setCurrent (t);} publicvoidpauseApp () {} publicvoiddestroyApp (booleanunconditional) {}}
Select Run- > run from the menu and refer to the figure below to configure the running J2ME development environment.
After setting up, click run, if not unexpected, the program will run normally and will display the following interface.
These are all the contents of the article "how to build and run the J2ME Development Environment". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.