J2ME/Eclipse problem

R

Rhino

I need some help getting J2ME and Eclipse 3.1.1 to work together.

I was starting to get serious about J2ME about 15 months ago and, for a
couple of months, put some serious effort into writing J2ME code in Eclipse
3.0.1. Then, I got sidetracked into some other projects and had to put all
of that aside for a while.

Now, I'm trying to get back to it and I'm having some problems. A couple of
months ago, I upgraded to Eclipse 3.1.1 and ugraded my plugins too,
including the J2ME stuff. (Actually, I did a fresh install of Eclipse in a
separate directory from my 3.0.1 stuff and then grabbed the newest versions
of various plugins, including eclipseme.) However, I've obviously missed a
step or done something incorrectly because all of my Midlets have red error
flags on them and refuse to run.

Here are the symptoms.

1. Every midlet project has a red flag on it; when I right-click on
properties, and select J2ME from the tree, the J2ME Platform Definition says
"Unspecified Platform". After that, no matter what I click in the tree, I
get a dialog that says "Could Not Accept Changes. The currently displayed
page contains invalid values."

2. _Some_ of the classes in _some_ of the midlets, have this compile error
on the "package common.j2me;" statement: "The type java.lang.Object cannot
be resolved. It is indirectly referenced from required .class files."

I have a strong feeling that the cure is something fairly obvious but it's
been so long that I've thought about midlets that I can't think of what the
problem might be.
 
J

JScoobyCed

Rhino said:
I need some help getting J2ME and Eclipse 3.1.1 to work together.

[...]
Here are the symptoms.

1. Every midlet project has a red flag on it; when I right-click on
properties, and select J2ME from the tree, the J2ME Platform Definition says
"Unspecified Platform". After that, no matter what I click in the tree, I
get a dialog that says "Could Not Accept Changes. The currently displayed
page contains invalid values."

I don't know much about EclipseMe for J2ME Midlets. But I like to try as
soon as an Eclipse release comes the new stuff. Your description of the
problem sounds similar to something I got with upgrading Eclipse 3.1.1
to Eclipse 3.2M4 with a Web Tools Platform project. It didn't accept
well my WTP project. The cure? Simple (at least it worked for me):
1. Right click on a Project and select Delete
2. On the prompt popup, select (of course :) ) "Do not delete content of
the folder" so you keep your stuff in the disk
3. Open the folder from your OS folder browser
4. Delete the .metadata and all the other .xxxx folder and files
(.classpath, .project, ...)
5. In Eclipse, create a new project pointing in that folder again (you
might check the properties of this project from Eclipse 3.0.1 before
deleting the .metadata, .project and .classpath in order to recreate it
in 3.1.1)
6. (Optional) Project > Clean > Clean All Projects
2. _Some_ of the classes in _some_ of the midlets, have this compile error
on the "package common.j2me;" statement: "The type java.lang.Object cannot
be resolved. It is indirectly referenced from required .class files."

This is typically what I got when checking out a project from CVS (still
for a Web project, not J2ME). What I did:
1. from Eclipse open "Windows > Preferences > Java > Installed JREs"
2. delete the JRE entry
3. recreate it (with same parameters)
4. (Optional) Project > Clean > Clean All Projects
I have a strong feeling that the cure is something fairly obvious but it's
been so long that I've thought about midlets that I can't think of what the
problem might be.

No, Eclipse is great stuff, but each plugin is adding customized
settings that are sometimes redondant. One last tips for Eclipse upgrades:
check all of the properties related to your plugins and see if there is
classpath or "Libraries" settings. Your description of the problem
sounds like the build classpath is confused. Delete all entries related
to classpath (except the one created by Eclipse for the JRE) and
re-create them. It can be a great help updating the configuration
(*.XML) of Eclipse and plugins.

Good luck
 
P

paul

I need some help getting J2ME and Eclipse 3.1.1 to work together.
1. Every midlet project has a red flag on it; when I right-click on
properties, and select J2ME from the tree, the J2ME Platform Definition says
"Unspecified Platform".

Window->prefernces->J2ME->Platform Components->Wireless Toolkits
right click, add wireless toolkit.

Paul
 
D

Darryl L. Pierce

Rhino wrote:
<snip>

Did you install the Wireless Toolkit and did you tell EclipseME where the
WTK is located? These are all problems relating to how you have EclipseME
configured.

--
Darryl L. Pierce <[email protected]>
Homepage: http://mcpierce.multiply.com/
"McVeigh's lawyer got him the death penalty, which, quite frankly,
I could have done." - Jon Stewart
*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top