Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » DSDP - Mobile Tools for Java (MTJ) » CLDC 1.1 not recognized
CLDC 1.1 not recognized [message #482267] Tue, 25 August 2009 22:27 Go to next message
Eclipse UserFriend
Originally posted by: graffitici.yahoo.com

Hi everyone,

I am trying to run a simple J2ME program that I found online. I loaded it
as a project, but still could not get it to compile. There are quite a few
preverifier errors, but I think I have diagnosed the main source of the
problem (which, I believe, will fix the preverifier errors too). It should
be a simple configuration issue, but I need your help in order to find
what's going on!

At some point in the code, there is a reference to Math.abs(float).
Eclipse marks this as an error, saying that "abs(int) is not applicable to
abs(float)." Looking at the documentation below, I noticed that the
overloaded version was introduced in CLDC 1.1:

http://www.j2ee.me/javame/reference/apis/jsr118/java/lang/Ma th.html#abs(float)

It seemed that the reason why Eclipse was complaining is because it was
using CLDC 1.0 and not 1.1. When I expand the "Java ME Library" under the
project explorer, I can see that both cldc_1.0.jar and cldc_1.1.jar are
there. When I look at the project properties, the current active
configuration ("DefaultCldcMsaPhone2") does support CLDC1.1.

I have no idea what is happening, and would appreciate any help!

Thanks,
Berk
Re: CLDC 1.1 not recognized [message #482284 is a reply to message #482267] Wed, 26 August 2009 05:42 Go to previous messageGo to next message
David Lucena is currently offline David LucenaFriend
Messages: 74
Registered: August 2009
Member
This happened to me also, but not in the same case, but in the case o a String method.

The problem you have is that both CLDC 1.0 and CLDC 1.1 libraries are configured in your device. Also you may notice that both MIDP 2.0 and MIDP 2.1 also are.

I don't know why, but by default eclipse, or MTJ, uses de default one. In the definitions of the device, you will see they have CLDC 1.1 available, but not in the Device Management Grid under Java ME tree.

In order to change this. Go to preferences, Java ME, select the device. Click on edit. Go to Libraries tab, and remove CLDC 1.0. Then save it, close Eclipse and run it again.

This should work. At least it worked for me.

Please, tell me if this helped.
Re: CLDC 1.1 not recognized [message #482299 is a reply to message #482284] Wed, 26 August 2009 07:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: graffitici.yahoo.com

Thank you for your help David, this really did fix the problem! This is a
very annoying and hard to fix bug though. I don't think I would could ever
have found it out without your help. Is this filed as a bug somewhere? I
have a pretty standard Windows XP setup, and I don't think I did anything
unusual during the installation process.

If there is anything I can do to help report this, please let me know!

Thanks again,
Berk
Re: CLDC 1.1 not recognized [message #482303 is a reply to message #482299] Wed, 26 August 2009 07:52 Go to previous messageGo to next message
David Lucena is currently offline David LucenaFriend
Messages: 74
Registered: August 2009
Member
In fact I don't know if it is reported. As I have only seen this happen to the pretty new Java ME SDK 3.0, probably will not. I should have uploaded a bug report myself, but as you offer, I really would appreciate you file it.

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=MTJ

That was the link where I reported my first bug of MTJ. Do as well as you can. When the bug arrives to the listeners of the bug list, they will modify the rest of data accordingly.

I'm realy very glad I helped you.
Re: CLDC 1.1 not recognized [message #482373 is a reply to message #482303] Wed, 26 August 2009 11:46 Go to previous messageGo to next message
Diego Madruga Sandin is currently offline Diego Madruga SandinFriend
Messages: 116
Registered: July 2009
Senior Member
The problem with wtk 3 was fixed on 1.0.1RC1 release.

[fiximprove][SDK]: Device importing. WTK 3.0.0 devices have incorrect Configuration and Profile values upon import.

Re: CLDC 1.1 not recognized [message #482395 is a reply to message #482373] Wed, 26 August 2009 12:49 Go to previous messageGo to next message
David Lucena is currently offline David LucenaFriend
Messages: 74
Registered: August 2009
Member
Thanks Diego. I saw the release this morning, but had no time to see all the bug fixes and what is worse, still have no time to test the new RC.
Re: CLDC 1.1 not recognized [message #576593 is a reply to message #482267] Wed, 26 August 2009 05:42 Go to previous messageGo to next message
David Lucena is currently offline David LucenaFriend
Messages: 74
Registered: August 2009
Member
This happened to me also, but not in the same case, but in the case o a String method.

The problem you have is that both CLDC 1.0 and CLDC 1.1 libraries are configured in your device. Also you may notice that both MIDP 2.0 and MIDP 2.1 also are.

I don't know why, but by default eclipse, or MTJ, uses de default one. In the definitions of the device, you will see they have CLDC 1.1 available, but not in the Device Management Grid under Java ME tree.

In order to change this. Go to preferences, Java ME, select the device. Click on edit. Go to Libraries tab, and remove CLDC 1.0. Then save it, close Eclipse and run it again.

This should work. At least it worked for me.

Please, tell me if this helped.
Re: CLDC 1.1 not recognized [message #576684 is a reply to message #576593] Wed, 26 August 2009 07:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: graffitici.yahoo.com

Thank you for your help David, this really did fix the problem! This is a
very annoying and hard to fix bug though. I don't think I would could ever
have found it out without your help. Is this filed as a bug somewhere? I
have a pretty standard Windows XP setup, and I don't think I did anything
unusual during the installation process.

If there is anything I can do to help report this, please let me know!

Thanks again,
Berk
Re: CLDC 1.1 not recognized [message #576698 is a reply to message #482299] Wed, 26 August 2009 07:52 Go to previous messageGo to next message
David Lucena is currently offline David LucenaFriend
Messages: 74
Registered: August 2009
Member
In fact I don't know if it is reported. As I have only seen this happen to the pretty new Java ME SDK 3.0, probably will not. I should have uploaded a bug report myself, but as you offer, I really would appreciate you file it.

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=MTJ

That was the link where I reported my first bug of MTJ. Do as well as you can. When the bug arrives to the listeners of the bug list, they will modify the rest of data accordingly.

I'm realy very glad I helped you.
Re: CLDC 1.1 not recognized [message #576746 is a reply to message #576698] Wed, 26 August 2009 11:46 Go to previous messageGo to next message
Diego Madruga Sandin is currently offline Diego Madruga SandinFriend
Messages: 116
Registered: July 2009
Senior Member
The problem with wtk 3 was fixed on 1.0.1RC1 release.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=284768
Re: CLDC 1.1 not recognized [message #576840 is a reply to message #576746] Wed, 26 August 2009 12:49 Go to previous message
David Lucena is currently offline David LucenaFriend
Messages: 74
Registered: August 2009
Member
Thanks Diego. I saw the release this morning, but had no time to see all the bug fixes and what is worse, still have no time to test the new RC.
Previous Topic:Re: Preprocessor question: defined value substitution
Next Topic:MTJ 1.0.1 RC1 Available
Goto Forum:
  


Current Time: Fri Apr 19 23:15:59 GMT 2024

Powered by FUDForum. Page generated in 0.03741 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top