Is J2ME development still possible with recent versions of Eclipse?
Asked Answered
R

5

5

I tried installing MTJ 1.1.2 from http://www.eclipse.org/mtj/, but after the restart, no new options appeared that would indicate that the plugin is even there. As the latest release is for Helios, I am afraid that the plugin no longer works with Juno and later.

Is it still possible to develop J2ME applications with Eclipse? If so, how? If not, what are the alternatives?

Retral answered 28/8, 2012 at 13:15 Comment(0)
E
3

You don't need a plugin at all, you can point eclipse to the midp and cldc jar files, and write your own ant/antenna script to package a midlet.

Echikson answered 28/8, 2012 at 21:34 Comment(3)
Good idea, but my IDE kung-fu is not strong enough. Is there a tutorial or something similar that would help me do that?Retral
In your project's Java Build Path, remove the JRE System Library, and add the MIDP and CLDC jars that come with your wireless toolkit (and also the jars for any extra JSRs that you plan to use). This will stop you inadvertently using any classes you shouldn't! The build script for a MIDlet will be complex but a bit of trial and error based on the instructions here will get you sorted :: javaranch.com/journal/2004/03/Antenna.htmlEchikson
Regardless, I recommend building production MIDlets from a build script even when using a plug-in. It's far better to be able to build from the command line, and tweak each parameter to your liking, than to rely on IDE black magic. IDE commands are also not so easy to execute from your continuous integration system. (Same goes for android apps, iOS apps, web apps, anything).Echikson
O
4

Eclipse Juno The Oracle Java ME SDK requires the MTJ toolkit, but it is not bundled with Juno and it must be installed manually. Therefore, install MTJ toolkit first.

  • Go to Help > Install New Software.
  • In the "Work with" field, enter this URL: http://download.eclipse.org/releases/indigo
  • Click Add. When the plugins are discovered, open the Mobile and Device Development Tools hierarchy and check Mobile Tools for Java, Mobile Tools for Java SDK, and Mobile Tools for Java Examples. Click Next. On the installation screen select all plugins and click Finish.
  • A Juno plugin named org.eclipse.jetty.server_(version).jar conflicts with the MTJ libraries when the plugin version is higher than 6. If it is you must prevent it from loading by changing its name so the Jar file is not parsed. For example, change it to: org.eclipse.jetty.server.old

see: http://www.oracle.com/technetwork/java/javame/javamobile/download/sdk/index.html

Overtake answered 4/2, 2013 at 9:50 Comment(0)
W
3

The interest in J2ME has waned post advent of iOS and Android. The MTJ project has been inactive for a while and will likely be archived soon. You can see project activity dropping off to nothing...

http://www.eclipse.org/projects/project.php?id=tools.sequoyah.mtj

If you must write for J2ME, you will need to stay on an older version of Eclipse or grab MTJ sources and port it to the newer version of Eclipse yourself.

Wolverhampton answered 28/8, 2012 at 17:37 Comment(0)
E
3

You don't need a plugin at all, you can point eclipse to the midp and cldc jar files, and write your own ant/antenna script to package a midlet.

Echikson answered 28/8, 2012 at 21:34 Comment(3)
Good idea, but my IDE kung-fu is not strong enough. Is there a tutorial or something similar that would help me do that?Retral
In your project's Java Build Path, remove the JRE System Library, and add the MIDP and CLDC jars that come with your wireless toolkit (and also the jars for any extra JSRs that you plan to use). This will stop you inadvertently using any classes you shouldn't! The build script for a MIDlet will be complex but a bit of trial and error based on the instructions here will get you sorted :: javaranch.com/journal/2004/03/Antenna.htmlEchikson
Regardless, I recommend building production MIDlets from a build script even when using a plug-in. It's far better to be able to build from the command line, and tweak each parameter to your liking, than to rely on IDE black magic. IDE commands are also not so easy to execute from your continuous integration system. (Same goes for android apps, iOS apps, web apps, anything).Echikson
C
1

I have faced the same problem as you. What I did was to keep using Eclipse Indigo.

Confectionary answered 28/8, 2012 at 16:55 Comment(0)
L
0

I've found that using the NetBeans IDE is simpler for Java ME development, especially with the new Java ME 8 SDK. All the Oracle examples are NetBeans too.

Lymphosarcoma answered 28/1, 2014 at 7:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.