Why is there no java.lang.Number?

53 views
Skip to first unread message

dua3...@gmail.com

unread,
Sep 13, 2013, 6:45:12 PM9/13/13
to codenameone...@googlegroups.com
Hi,

I have an existing codebase that I'd like to use in my cn1 project. But I get compilation errors when using java.lang.Number. I found out that it's missing from cn1's library and cannot imagine any reason why it's not there. java.lang.Float and java.lang.Double inherit from java.lang.number in JDK 5. Why did cn1 chose to do differently?

Axel

dua3...@gmail.com

unread,
Sep 13, 2013, 7:06:21 PM9/13/13
to codenameone...@googlegroups.com
Sorry, it seems java.lang.Number is not CLDC, just as is java.lang.math. I leave the question here in case anybody else might be looking for this.

Shai Almog

unread,
Sep 14, 2013, 12:33:33 AM9/14/13
to codenameone...@googlegroups.com, dua3...@gmail.com
We support most Java 5 features actually but adding java.lang.Number was a bit painful. You can check out the source code of our retro weaver work in SVN and see if there is a way to add java.lang.Number, I would personally love to have it.

adrian...@googlemail.com

unread,
Mar 8, 2015, 10:35:13 AM3/8/15
to codenameone...@googlegroups.com, dua3...@gmail.com
bam - here is the next wall I hit! After removing all dependencies to reflection, I get now the error of missing java_lang_Number.h in the iOS build.

BTW. it is frustrating, that the build spits out only one error. I don't know ,whether I should try to fix this error as well - what will be the next thing that is missing or not working. Why is it not possible to check the code before sending it to the build system, if there are dependencies, which can't be fulfilled. 

Steve Hannah

unread,
Mar 10, 2015, 12:23:54 AM3/10/15
to codenameone...@googlegroups.com

If you compile your java against the ckdc1.0 .jar. Instead of the standard jdk javac will identify all these errors for you.

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/86e69294-b776-4f2a-91b4-0b4c1fbef8da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steve Hannah

unread,
Mar 10, 2015, 12:27:28 AM3/10/15
to codenameone...@googlegroups.com

CLDC1.0.jar

(I'm on my phone... Spell correct)

adrian...@googlemail.com

unread,
Mar 10, 2015, 2:51:06 AM3/10/15
to codenameone...@googlegroups.com
another thanks - I will try this too. Another stupid question then . why does the CN1 template use the standard jdk ? - or is it me, that I have overlooked something in the docs ? 
Adrian.


Am Dienstag, 10. März 2015 05:27:28 UTC+1 schrieb Steve Hannah:

CLDC1.0.jar

(I'm on my phone... Spell correct)

On Mar 9, 2015 9:23 PM, "Steve Hannah" <st...@weblite.ca> wrote:

If you compile your java against the ckdc1.0 .jar. Instead of the standard jdk javac will identify all these errors for you.

On Mar 9, 2015 9:16 PM, <adrian...@googlemail.com> wrote:
bam - here is the next wall I hit! After removing all dependencies to reflection, I get now the error of missing java_lang_Number.h in the iOS build.

BTW. it is frustrating, that the build spits out only one error. I don't know ,whether I should try to fix this error as well - what will be the next thing that is missing or not working. Why is it not possible to check the code before sending it to the build system, if there are dependencies, which can't be fulfilled. 

Am Samstag, 14. September 2013 06:33:33 UTC+2 schrieb Shai Almog:
We support most Java 5 features actually but adding java.lang.Number was a bit painful. You can check out the source code of our retro weaver work in SVN and see if there is a way to add java.lang.Number, I would personally love to have it.

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.

Shai Almog

unread,
Mar 10, 2015, 12:29:07 PM3/10/15
to codenameone...@googlegroups.com, adrian...@googlemail.com
We do. The path isn't something we can completely control in IDE's so the build.xml script compiles the code with our authorized classpath.
I guess you hacked our build.xml and commented that stuff out.
Reply all
Reply to author
Forward
0 new messages