Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

J2ME/Eclipse problem

Thread view: 
Rhino - 21 Feb 2006 23:40 GMT
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.

Signature

Rhino

JScoobyCed - 22 Feb 2006 01:39 GMT
> I need some help getting J2ME and Eclipse 3.1.1 to work together.
>
[quoted text clipped - 6 lines]
> 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

Signature

JSC

paul@atom.sbrk.co.uk - 22 Feb 2006 07:38 GMT
> 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
Darryl L. Pierce - 22 Feb 2006 13:59 GMT
<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.

Signature

Darryl L. Pierce <mcpierce@gmail.com>
Homepage: http://mcpierce.multiply.com/
"McVeigh's lawyer got him the death penalty, which, quite frankly,
I could have done." - Jon Stewart



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.