Eclipse J2ME
Hi all,
Im about to download Elcipse J2ME for the first time, and im a bit lost with the lingo on the site. I belive the link below is the correct package to download, do you agree? Also will i need a J2ME plugin for this package?
http://www.eclipse.org/downloads/moreinfo/classic.php
Cheers Elvis
Hi Syed,
do the following
go to Window -> preferences
left hand side you find tree menu
explore J2ME and select device management
righ hand side you have the option (button) to import emulators
click on Import button, where new window will be appear
browse to C:\WTK25 directory
click on Refresh button
The list of emulators will be appear
check which you want and select Finish
best luck
Alpesh
Similar Messages
-
Free guide to Siptech J2ME Plugin for Eclipse.
I wrote this for Siptech because I found their original instructions hard to follow!
Hope it's some use to my fellow Eclipse J2ME developers....
There follows a guide for creating J2ME projects with the SIPTech plug-in, using the newest version of Sun's WTK (v2.1). This document assumes you have already installed the plug-in - if you need more help with that, see the User and Design View on the J2ME plugin download page.
Creating a new MIDP project with Siptech plugin for Eclipse
==============================================
1.From the File menu, select New > Project
2.In the dialogue box*, highlight �Java� in the left hand pane, and �J2ME Project�
on the right hand pane. Click �next�.
3.Enter the project name in the text box.
4.Un-check the �Use Default� switch, and click �Browse...�
5.Navigate to your Wireless Toolkit (WTK) root directory (probably something like
C:\WTK21), and into its �apps� subdirectory. This is where the WTK stores the
working folders for its projects. Click �Make New Folder...� and enter the
project name to create a new working folder for your project. Click �Ok� to
confirm the path.
6.This will take you back to the main �Java Settings� dialogue box, where you
should click �Next>� to move on to the source and output path screen.
7.The WTK normally looks for source code in the �src� subdirectory of the working
folder, so we need to set this up for our project. In the �Source Path� pane,
select the project folder (blue folder with the project name), and
click �Edit...�. Select the radio button �Folder as source folder� and type �src�
into the text box. Click �OK�.
8.In a similar way, the WTK normally outputs bytecode to the �classes�
subdirectory of the working folder, and we want to do the same. Back in the main
dialogue, select the�Default output folder� text box and append the
string �/classes� to the existing value, which will just be the project folder
name.
9.Now our build paths are setup, but we still need to include the JAR files which
specify the J2ME classes. In the main �Java Settings� dialogue box, select
the �Libraries� tab. Click �Add External Jars...�. Use the file dialogue to
navigate to your WTK's �lib� subdirectory (for example C:\WTK21\lib), and select
the JAR files needed for your project. Note � depending on whether you are
writing for MIDP1.0 or MIDP2.0, you must include only cldcapi10.jar and
midpapi10.jar, or cldcapi20.jar and midpapi20.jar, respectively. Remove the ones
you don't need � else the build will fail.
10.Click "Finish". You will now be asked to enter the MIDlet class name, so that
the plugin can generate a template file. Enter the class name, without the .java
extension, and click �OK�.
11.Right click the project folder in the resource perspective and select �refresh�
to show the generated source, class and jar files.Oh dear! The little � characters should be quotes.
And in step 2, the dialogue box in question is the main Java settings dialogue box!
Sorry about that ;) -
J2ME Eclipse, midp.zip
The Eclipse J2ME plug-in installation requires the file midp.zip from the J2ME Wireless Toolkit, but the file does not exist. How can I get this file (for MIDP2.0) ???
thank youWell I downloaded it and tried to install it into Eclipse 3 M6, but Eclipse crashes after copying the pluginfiles:
Problem during startup. Check ".log" file in the ".metadata" directory of your workspace.
This log file doesn't hold something meaningfull to me:
!SESSION ----------------------------------------------------------------------
!ENTRY org.eclipse.core.launcher 4 0 Jan 26, 2004 16:16:30.580
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.NullPointerException
at org.eclipse.ui.internal.registry.RegistryReader$1.compare(RegistryReader.java:102)
at java.util.Arrays.mergeSort(Unknown Source)
at java.util.Arrays.sort(Unknown Source)
at java.util.Collections.sort(Unknown Source)
at org.eclipse.ui.internal.registry.RegistryReader.orderExtensions(RegistryReader.java:107)
at org.eclipse.ui.internal.registry.RegistryReader.readRegistry(RegistryReader.java:158)
at org.eclipse.ui.internal.registry.WizardsRegistryReader.readWizards(WizardsRegistryReader.java:156)
at org.eclipse.ui.internal.registry.NewWizardsRegistryReader.readWizards(NewWizardsRegistryReader.java:350)
at org.eclipse.ui.internal.registry.NewWizardsRegistryReader.getWizardElements(NewWizardsRegistryReader.java:371)
at org.eclipse.ui.actions.NewWizardMenu.hasExamples(NewWizardMenu.java:212)
at org.eclipse.ui.actions.NewWizardMenu.fillMenu(NewWizardMenu.java:119)
at org.eclipse.ui.actions.NewWizardMenu.fill(NewWizardMenu.java:196)
at org.eclipse.jface.action.MenuManager.update(MenuManager.java:573)
at org.eclipse.jface.action.MenuManager.update(MenuManager.java:462)
at org.eclipse.jface.action.MenuManager.fill(MenuManager.java:210)
at org.eclipse.jface.action.MenuManager.update(MenuManager.java:573)
at org.eclipse.jface.action.MenuManager.update(MenuManager.java:462)
at org.eclipse.jface.action.MenuManager.fill(MenuManager.java:210)
at org.eclipse.jface.action.MenuManager.update(MenuManager.java:573)
at org.eclipse.jface.action.MenuManager.update(MenuManager.java:462)
at org.eclipse.jface.action.MenuManager.createMenuBar(MenuManager.java:147)
at org.eclipse.jface.window.ApplicationWindow.configureShell(ApplicationWindow.java:294)
at org.eclipse.ui.internal.WorkbenchWindow.configureShell(WorkbenchWindow.java:714)
at org.eclipse.jface.window.Window.createShell(Window.java:353)
at org.eclipse.jface.window.Window.create(Window.java:304)
at org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbench.java:1136)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:875)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1459)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:246)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:47)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:279)
at org.eclipse.core.launcher.Main.run(Main.java:742)
at org.eclipse.core.launcher.Main.main(Main.java:581)
Any ideas, what went wrong? I have to delete the plugin directory, the workspace directory and .config in order to make eclipse to start again, deleting the plugin only won't help. -
How to create CAP file based on a J2ME project ?
Hi all,
Recently I need to install a midlet application into the sim card with an applet loader.
And it requires a java card cap file.
I already installed:
1> JAVA Card Kit 2.2.2
2> JDK 1.6.0_01
3> J2ME Wireless Toolkit 2.2
4> Eclipse 3.2
But I don't know how to generate a cap file from the Eclipse J2ME midlet project.
Any tips?
Thank you in advance.You cannot install a midlet on a sim card. If it's a Java Card, the format is defined to .cap file. Check out the Java Card VM specification for details. For .cap file creation/installation you can use Sun's Java Card development kit.
http://java.sun.com/products/javacard/dev_kit.html -
Cannot find the class file for javax.microedition.io.ContentConnection
I've downloaded and configured eclipse j2me plugin and am having no difficulty
creating Midlets according to the eclipse documentation
http://eclipseme.org/docs/createProject.html
(Also I have sun java wireless toolkit 2.5.2)
(I have imported wtk252 in window/preferences/j2me/dev mgmt
and added the search directory where wtk252 resides.)
However, after importing a ready-developed project into the same workspace
one of the pieces of code continuously gives a class not found error for
javax.microedition.io.ContentConnection
It's clear that one project understands how to resolve paths in
javax.microedition
and the other one doesn't, but I'm not sure how to configure the build path
using
QuickFix
ie I don't know physically what the name of the jar file with
javax.microedition.io.ContentConnection in it is called.Er, thanks, (I think!)
Wouldn't it be easier for folks if you told them to look for packages using the CLDC Generic Connection Framework which is already inside javax.microedition.io?
By the time they've got GCF (which is used quite a lot,) they've got javax.microedition.io and they've therefore solved the problem!
I'd imagine that you could spend ages looking for "JSR 37 / 139" and get nowhere. -
DiscoveryAgent.startInquiry wont find devices
The following class is supposed to find remoteDevices by using discoveryAgent.startInquiry.
Unfortunately deployed to my Mobile (Nokia) it always returns 0, so no devices are found.
Although there are devices in range. I can find them with the bluetooth pre-installed on my mobile.
What am i missng ?
Is there a way to emulate bluetooth usage ?
Eclipse 3.2, Eclipse j2me 1.5.5, wtk 2.2
package de.sulay.blue.scanner;
import java.io.IOException;
import java.util.Vector;
import javax.bluetooth.BluetoothStateException;
import javax.bluetooth.DeviceClass;
import javax.bluetooth.DiscoveryAgent;
import javax.bluetooth.DiscoveryListener;
import javax.bluetooth.LocalDevice;
import javax.bluetooth.RemoteDevice;
import javax.bluetooth.ServiceRecord;
import javax.bluetooth.UUID;
public class Scanner {
private Vector remotedevices = new Vector();
private Vector serviceRecords = new Vector();
private DiscoveryAgent discoveryAgent;
private String friendlyNameHost;
public static final UUID RFCOMM_UUID = new UUID(0x0003);
public void scan() {
try {
LocalDevice localDevice = LocalDevice.getLocalDevice();
friendlyNameHost = localDevice.getFriendlyName();
System.out.println("Host Bluetooth Adress: " + localDevice.getBluetoothAddress() + " (" + friendlyNameHost + ")");
//get a Discovery Agent
discoveryAgent = localDevice.getDiscoveryAgent();
//Start the search for Remote Devices
discoveryAgent.startInquiry(DiscoveryAgent.GIAC, new DiscoveryListener(){
* Remote Device was discovered
public void deviceDiscovered(RemoteDevice remoteDevice, DeviceClass deviceClass) {
printDeviceInfo(remoteDevice);
remotedevices.addElement(remoteDevice);
String friendlyNameRemoteDevice = null;
try {
friendlyNameRemoteDevice = remoteDevice.getFriendlyName(true);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
public void inquiryCompleted(int discType) {
System.out.println("inquiryCompleted");
System.out.println("Gefundene RemoteDevices: " + remotedevices.size());
public void serviceSearchCompleted(int pTransId, int pRespCode) {
System.out.println("************************************************ serviceSearchCompleted");
// System.out.println("transId / respCode: " + pTransId + " / " + pRespCode);
System.out.println("Gefundene Services: " + serviceRecords.size());
public void servicesDiscovered(int pTransId, ServiceRecord[] pServiceRecords) {
private void printDeviceInfo(RemoteDevice remoteDevice) {
System.out.println("************************************************ deviceDiscovered");
try {
System.out.println("FriendlyName: " + remoteDevice.getFriendlyName(true) + " (" + remoteDevice.getBluetoothAddress() + ")");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (BluetoothStateException e) {
e.printStackTrace();
public Vector getRemotedevices() {
return remotedevices;Please check if you could put it to factory default & delete all paired devices.
Knowledge not shared is knowledge wasted!
If you find it helpfull, it's not hard to click the STAR.. -
J2ME/Eclipse Pulsar/Polish UI - problem with Eclipse integration of JPolish
Hi guys,
I have J2ME SDK 3.0 here with Eclipse Pulsar (with mobile tools for java) and I want to use the J2ME Polish libraries.
I install J2ME Polish 2.1.2 and set the eclipse home directory and the "Integrate mepose with eclipse" tick or something like that.
Anyway, when I restart everything after the installation I can't see the plugin view in my eclipse.
I also can't manage to manually download the plugin from Help>Install new Software>add url : ww.j2mepolish.org/mepose
Any ideas ? I'm new to J2ME at all.
Thank you in advanceLikewize .. the Polish UI dont show in prefs. Tried with both win/mac but same result.
Its seems like j2mepolish-2.1.2 and pulsar dont want to play ,(
Why?
cheers/k. -
Can anyone show me how to load a j2me project in eclipse, for example load a demo project in WLK folder? It seems to me that I am just able to load projects created by eclipse.
Thanks in advance!I suggest that you use netbeans. Can you create a new J2ME project in eclipse?
To run J2ME, you may need J2ME Toolkits too. -
J2ME: jar created using Eclipse won't install..
hi
i am using following code to create this J2ME : jar package but, it doesnt gives installation error in my mobile.. :(
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
public class Login extends MIDlet implements CommandListener
private Display display;
private TextField userName,password;
public Form form;
private Command loginCommand, exitCommand;
private Image img;
public Login() {
form = new Form("Login Screen");
userName = new TextField("LoginID:", "", 30, TextField.ANY);
password = new TextField("Password:", "", 30, TextField.PASSWORD);
exitCommand = new Command("Exit", Command.EXIT, 0);
loginCommand = new Command("Login", Command.OK, 2);
try
img = Image.createImage("/loginscreen.jpg");
catch(Exception e)
System.out.println(e.getMessage());
public void startApp()
display = Display.getDisplay(this);
try{
form.append(img);
catch(Exception e)
form.append(userName);
form.append(password);
form.addCommand(exitCommand);
form.addCommand(loginCommand);
form.setCommandListener(this);
display.setCurrent(form);
public void pauseApp()
public void destroyApp(boolean unconditional)
notifyDestroyed();
public void validateUser(String name, String password)
if (name.equals("default") && password.equals("default"))
showMsg();
else
tryAgain();
public void showMsg()
Alert success = new Alert("Login Successfully", "Your Login Process is completed!", img, AlertType.INFO);
success.setImage(img);
userName.setString("");
password.setString("");
display.setCurrent(success, form);
public void tryAgain()
Alert error = new Alert("Login Incorrect", "Please try again", img, AlertType.ERROR);
error.setTimeout(900);
error.setImage(img);
userName.setString("");
password.setString("");
display.setCurrent(error, form);
public void commandAction(Command c, Displayable d)
String label = c.getLabel();
if(label.equals("Exit"))
destroyApp(true);
else if(label.equals("Login"))
validateUser(userName.getString(), password.getString());
}hello world sort J2ME applications are still working..
how to get this jar package to work?? have i made any mistake while coding it??hello Darryl.Burke
as soon as my WTK started to emulate applications i was able to see an exception in it something like ClassNotDefined.. i understood that i named file under src as well as class in caps which was the problem .. (java is a case-sensitive language)
anyways thanks alot for all help i got from yourside..
regards
Anshul Bhatnagar -
J2me and java card, need help to communicate
we are trying to put together a reader to read smartcards using j2me and we figure that it would be easiest if we could develop it to work with java cards rather than standard smart cards, the problem is we get garbage when we communicate to it, the chip sends us crap, any suggestions what might be wrong, any calls we might be missing, has anyone worked with j2me and java cards or smart cards, any help would be appreciated.
einar.... reader app and the ME behind it .... smells like mobile ....
First of all - if you want to have one mobile application running on this just make sure that whatever is written in ME can use drivers from the reader chip ....
Workin on the PC is something completely different. There was one good example how to develop one host application in Java provided with the JCOP tools long ago ... I don't know if this is now in the new Eclipse tools.
But - there was a small API provided that can give you good hints what to do - and - once you have it on the reader side - you can easily integrate ME methods with this ... -
How to make a WORKING J2ME Web Services client?
Hi everyone,
I'm trying to make my first J2ME client for web services (well, I need it for my degree thesis, so I'm a little bit DESPERATE) but I've got a lot of problem that I don't understand, even with samples downloaded from web tutorials and from xmethods.net.
The problem is with the generation of Stub classes:
if I try to make the Java Wireless TollKit 2.2 to generate them and then I run the midlet in the JWTK emulator there's no problem, but when I try to do the same thing with the Nokia Developer's Suite 3.0 I've got a lot of problems, first of all the java code generated for the stub is very different from the first one, it seem like a C# or J# code (and obviously Eclipse says that it's full of errors), so when I try to make the jar and jad files it doesn't work (because is not a right java code), so I made the stub classes using the JWTK2.2 Stub Generator and then I used the Nokia Dev's Suite 3.0 to build and package the midlet, but it says that it's not able to find the "class or resource javax/xml/rpc/Stub" even if the resource is present and used exactly as all the other packages, and it creates a jar file with just some of the classes but not all. At the end I tryed to run in the nokia emulators the midlet created by the JWTK 2.2, but it doesn't start, so I put the midlet on two diffent Nokia phones (6600 and 6630, because I need to make my client work on the 6630) but it seems to make the virtual machine to crash. I erased all the code lines invoking the stub classes and added them again one by one, until the midlet stoped again to work, and I understand that the problem seems to be with the invocation of the costructor of the stub class, but it doesen't make no sense, because the same code works properly on not-Nokia phones and emulators. I used many different wsdl files to create the stub classes for different web services, but there's always the same problems.
Help me please.You will find some working code at :
http://ksoap.objectweb.org/software/downloads/index.html
It's code that use kSOAP and kXML implementations ....
If you will also find some useful information here :
http://developers.sun.com/techtopics/mobility/apis/articles/wsa/
http://www-106.ibm.com/developerworks/wireless/library/wi-jsr/
http://www-106.ibm.com/developerworks/wireless/library/wi-xmlparse/
Regards. -
How to install plugin in the eclipse?
Hi all,
I made a download the KXML plugin (http://prdownloads.sourceforge.net/kxml/kxml2-min-2.2.2.jar?download), but I can't to install and use this plugin for to read XML files. For example: I need to import org.kxml2.io.KXmlParser. I put the downloaded file in the folder plugins of eclipse and I use the eclipse for develop with J2ME.
I read one article that it teaches to read XML files using the KXML API, see below:
XML File example:
<?xml version="1.0" encoding="UTF-8"?>
<list>
<person>
<name>Person 1</name>
<phone>Number 1</phone>
</person>
<person>
<name>Person 2</name>
<phone>Number 2</phone>
</person>
</list>
Source code of MIDlet
import �
import org.kxml2.io.KXmlParser;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
public class XMLParserMidlet extends MIDlet {
Form form = new Form("Persons");
protected void startApp() throws MIDletStateChangeException {
InputStream in = getClass().getResourceAsStream("person.xml");
try {
Display.getDisplay(this).setCurrent(form);
parser(in);
} catch (Exception e) {
e.printStackTrace();
private void parser(InputStream in) throws Exception {
//begin the XMLParser
KXmlParser parser = new KXmlParser();
parser.setInput(new InputStreamReader(in));
parser.nextTag();
//it locates in the tag <list>
parser.require(XmlPullParser.START_TAG, null, "list");
//while is different END_TAG
while (parser.nextTag () != XmlPullParser.END_TAG) {
//put in the tag <person>
parser.require(XmlPullParser.START_TAG, null, "person");
parserPerson(parser);
form.append("\n");
parser.require(XmlPullParser.END_TAG, null, "person");
parser.require(XmlPullParser.END_TAG, null, "list");
parser.next();
parser.require(XmlPullParser.END_DOCUMENT, null, null);
private void parserPeerson(KXmlParser parser) throws Exception {
//While is different of </person>
while (parser.nextTag() != XmlPullParser.END_TAG) {
//put in one tag "START". Ex: <name> ou <phone>
parser.require(XmlPullParser.START_TAG, null, null);
String name = parser.getName();
String text = parser.nextText();
System.out.println("Tag: " + name + " -> " + text);
//add the text in the Form
form.append(text);
//put in the and of tag </name> or </phone>
parser.require(XmlPullParser.END_TAG, null, name);
//the other classes that is necessary
pauseApp�
destroyApp�
thanks!Really? You downloaded exactly the same jar as the OP? And you read exactly the same tutorial and have a question about exactly the same code?
I don't think so.
The OP didn't get an answer because the question has absolutely nothing to do with the topic of this forum. It's going to be the same for you. So find an Eclipse forum where you can ask questions about Eclipse.
Hidden Brains, indeed. -
Hi
I am new to J2me technology. i downloaded cldc and midp. i have jdk already installed at c:\program files\java\jdk.
when i try to compile i got error saying not able to find javax.microedition.midlet.* package
please tell me how to install cldc and midp to run my first programHello
I would suggest using an IDE for writing the code (like eclipse maybe) and testing it on Sun's Wireless Toolkit which comes already with all the needed libraries.
Of course you can find all this information by searching google..
Mihai -
How to get missing classes from J2SE to J2ME?
Hello,
I am currently developing a J2ME project. As IDE I use Eclipse with the plugin EclipseME. It works great.
Now I have the following problem: I need some classes which are present in J2ME (e.g. sorting of Strings, date functions). So I downloaded the source code for the JDK. Now I want to compile the missing classes (the ones that are not in the libs coming with the WTK) from JDK source into my project, so I can use these functions which are missing in standard J2ME. Importing the whole JDK tree is problematic, because then all classes will be compiled from source. This will cause errors with the JVM on the target device.
Is there a possibility to import the JDK sources and only let compile the classes that are missing in J2ME libs? What is the best way to do this? Or do I have to add the source of each class (and it's dependencies) i need manually? Can I in this case use the original tree of packages and classes (e.g. java.util.ClassName) or do I have to create and new subtree (project.ClassName) in my project and import from there?
Greetz
schneidexeGenerally, this is not possible. The classes have far to many references to other classes, and there are far to many incompatibilities to make it work.
Best solution is to make your own J2me substitution, or find some j2me api that already does what you want. -
Problem integrating WTK in Eclipse
I have integrated J2ME Wireless Toolkit in Eclipse following the guide on the Eclipse site http://eclipseme.org/docs/installEclipseME.html
Everything works fine except for when I try to run the created Midlet on my phone (Nokia 6230) - I get the error message "invalid file"
If I set up the excact same project using the KToolbar the Midlet runs fine on my phone. I have made sure that the MIDP profile and the CLDC is the same in both cases.
Does anyone have any suggestions?
/larsThis is not the right forum for this question. You might have better luck at one of the Eclipse newsgroups:
http://www.eclipse.org/newsgroups/index_all.php
Maybe you are looking for
-
Why can't I install mountain lion on my macbook pro?
It still works. I bought it in 2007. What will I have to give up?
-
How can I make google search links open in the same tab in mobile safari?
I have iphone 5 with ios 7.0.4 and my wife has the same one. In my iphone, when I open one link of the google search result page, mobile safari always lauch a new tab and load the linke into the new tab. But I want to make it open in the same tab and
-
Quicktime has messed up my podcasts visuals
Since installing Quicktime 7.1.6 the visuals ( still photographs) on my .mac webpage will no longer play. I get a picture of the Quicktme logo and the mesage "this enhanced podcast requires Quicktime 7.0.2 or later". Everything seemed to work fine un
-
i have the new ipad 16gb it was working fine till i went to download the new itunes and the apple mobile device recovery mode my windows pc cant find the software to download it i need help because my ipad wont work i only see the itunes and usb symb
-
Hi, I'm not sure but I may have found a bug in the new iOS using iPhone 5. I've done a search for the scenario which I'll explain. But I can't seem to see anyone replicating this. I have a pin set for both the unlocking of the phone and for the sim a