|
Re: MTJ and Java SDK 3: bullshit [message #542254 is a reply to message #541499] |
Thu, 24 June 2010 11:22 |
Eclipse User |
|
|
|
Originally posted by: news.s237965939.online.de
Am 21.06.2010 13:38, schrieb bastard_troll:
> -Now you don't have CLDC 1.1. (Don't bother setting it, will be ignored)
> -Jar file is corrupted
> -Problems connecting to device emulator, etc.
Same problems here. I used some classes/methods from CLDC 1.1 without
knowing, and some floating point too, but the Motorola test device only
had CLDC 1.0. Eclipse/MTJ was set up to CLDC 1.0 but the errors remained
undiscoverd. That was the cause of most other problems I described in my
earlier postings. How did I find that out? I ported the project to
NetBeans, which found the errors right away. Nuff' said.
Hans
|
|
|
|
Re: MTJ and Java SDK 3: bullshit [message #543778 is a reply to message #543596] |
Wed, 30 June 2010 14:29 |
Eclipse User |
|
|
|
Originally posted by: news.s237965939.online.de
Am 30.06.2010 01:36, schrieb Gorkem Ercan:
> There is a problem with the WTK 3.0 integration. WTK seems to be sending
> information that it is not supposed to and that is confusing MTJ. You
> can follow up on the fix
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=315209.
> I would still like to check that your trouble with the CLDC 1.0 setting
> getting ignored is related to same problem. Can you tell where did you
> set the CLCD 1.0 ?
I tried many SDKs, different versions (Sun, Motorola, Sony Ericsson,...)
with all the same effect. No error message related to the CLDC 1.0
setting, the jar just didn't run on the real device. That made me so
angry that I deleted everything that sounded like eclipse and switched
to Netbeans. To answer your question I downloaded and installed it
again. BTW, it's still the same with the latest version of Pulsar (Helios).
The setting CLDC 1.0 was done in the 'Application Descriptor'. Try it,
insert the following code, but do something with the variable, otherwise
the line will be optimized away. 'sum' and 'cnt' are of the type int, too.
int z = (int)(15.0 - ((double) sum / (double) cnt));
It will compile with no errors, no warnings. But when you download the
..jar to a CLDC 1.0 phone, like my Motorola V3, it will crash.
Hans
|
|
|
|
Re: MTJ and Java SDK 3: bullshit [message #543842 is a reply to message #543820] |
Wed, 30 June 2010 17:57 |
Eclipse User |
|
|
|
Originally posted by: news.s237965939.online.de
Am 30.06.2010 18:33, schrieb Gorkem Ercan:
>
> Thanks for this information. This was really helpful.
> The problem seems like the changes made to the Application Descriptor
> are not reflected on the buildpath for some reason. Opened up
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=318500 to follow up.
You're welcome. With Netbeans I also had to change this code
InputStream isLeft =
Object.class.getResourceAsStream("/arrow_left.png");
InputStream isRight =
Object.class.getResourceAsStream("/arrow_right.png");
try {
arrowLeft = Image.createImage(isLeft);
arrowRight = Image.createImage(isRight);
} catch (Exception e) {
// Do Something();
}
to this one to get rid of error messages. When CLDC was set to 1.1 the
version above compiled too, but not with 1.0. With MTJ it compiled in
both cases.
try {
Class c = Class.forName("java.lang.Object");
InputStream isLeft = c.getResourceAsStream("/arrow_left.png");
InputStream isRight = c.getResourceAsStream("/arrow_right.png");
arrowLeft = Image.createImage(isLeft);
arrowRight = Image.createImage(isRight);
} catch (ClassNotFoundException cnf) {
// Do Something();
} catch (Exception ex) {
// DoSomething();
}
Hans
|
|
|
|
|
|
Re: MTJ and Java SDK 3: bullshit [message #581062 is a reply to message #581005] |
Wed, 30 June 2010 14:29 |
Eclipse User |
|
|
|
Originally posted by: news.s237965939.online.de
Am 30.06.2010 01:36, schrieb Gorkem Ercan:
> There is a problem with the WTK 3.0 integration. WTK seems to be sending
> information that it is not supposed to and that is confusing MTJ. You
> can follow up on the fix
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=315209.
> I would still like to check that your trouble with the CLDC 1.0 setting
> getting ignored is related to same problem. Can you tell where did you
> set the CLCD 1.0 ?
I tried many SDKs, different versions (Sun, Motorola, Sony Ericsson,...)
with all the same effect. No error message related to the CLDC 1.0
setting, the jar just didn't run on the real device. That made me so
angry that I deleted everything that sounded like eclipse and switched
to Netbeans. To answer your question I downloaded and installed it
again. BTW, it's still the same with the latest version of Pulsar (Helios).
The setting CLDC 1.0 was done in the 'Application Descriptor'. Try it,
insert the following code, but do something with the variable, otherwise
the line will be optimized away. 'sum' and 'cnt' are of the type int, too.
int z = (int)(15.0 - ((double) sum / (double) cnt));
It will compile with no errors, no warnings. But when you download the
..jar to a CLDC 1.0 phone, like my Motorola V3, it will crash.
Hans
|
|
|
|
Re: MTJ and Java SDK 3: bullshit [message #581098 is a reply to message #543820] |
Wed, 30 June 2010 17:57 |
Eclipse User |
|
|
|
Originally posted by: news.s237965939.online.de
Am 30.06.2010 18:33, schrieb Gorkem Ercan:
>
> Thanks for this information. This was really helpful.
> The problem seems like the changes made to the Application Descriptor
> are not reflected on the buildpath for some reason. Opened up
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=318500 to follow up.
You're welcome. With Netbeans I also had to change this code
InputStream isLeft =
Object.class.getResourceAsStream("/arrow_left.png");
InputStream isRight =
Object.class.getResourceAsStream("/arrow_right.png");
try {
arrowLeft = Image.createImage(isLeft);
arrowRight = Image.createImage(isRight);
} catch (Exception e) {
// Do Something();
}
to this one to get rid of error messages. When CLDC was set to 1.1 the
version above compiled too, but not with 1.0. With MTJ it compiled in
both cases.
try {
Class c = Class.forName("java.lang.Object");
InputStream isLeft = c.getResourceAsStream("/arrow_left.png");
InputStream isRight = c.getResourceAsStream("/arrow_right.png");
arrowLeft = Image.createImage(isLeft);
arrowRight = Image.createImage(isRight);
} catch (ClassNotFoundException cnf) {
// Do Something();
} catch (Exception ex) {
// DoSomething();
}
Hans
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05046 seconds