maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Java for Maemo 5 (https://talk.maemo.org/showthread.php?t=31678)

Architengi 2009-09-15 00:36

Java for Maemo 5
 
There are a lot of applications written in Java. Android developers develop in Java. Big gaming companies develop many games in Java. Java has ported its VM for ARM processors.
If Java embedded runs on N800, is it running on N900?
When will be a full port of Java available on N900? Or there is one available now?

>> Jaffa wrote:
"Full Java" on N900 seems to be somewhat pulled out of the air. Jalimo isn't there yet, and "full Java" nowadays is including things like JavaFX.

>>> Bundyo wrote

http://java.sun.com/javase/downloads/embedded.jsp

This Java headless one works like a charm on my N800, of course takes 100% CPU most of the time, but works nevertheless and is full :)
Probably JavaFX doesn't work but runs web start apps.

EABI, glibc 2.5, Hard Float (VFP), Little Endian

Architengi 2009-09-15 00:43

Re: Java for Maemo 5
 
Java SE at a Glance

Java Platform, Standard Edition (Java SE) lets you develop and deploy Java applications on desktops and servers, as well as today's demanding Embedded and Real-Time environments.

http://java.sun.com/javase/

Sun offers Java SE for Embedded products in both binary and source offerings under an innovative licensing model. Development is free, but royalties are required upon deployment on other than general purpose systems (for details see license). Platforms available for embedded use include not only standard Java SE platforms but also platforms that are exclusive for the embedded market. In all cases, the products offered are fully Java SE compliant -- which enables you to reuse any Java code from other platforms or products without having to go through porting, recoding and test cycles.

Embedded Use home page


--------------------------------------------------------------------------------

Custom embedded platforms - for embedded devices having approximately 32MB or more for Java.

Java SE for Embedded 6
ARMv6 Linux - Headless (Early Access)
EABI, glibc 2.5, Soft Float, Little Endian
EABI, glibc 2.5, Hard Float (VFP), Little Endian
ARMv6 Linux - Headful (Early Access)
EABI, glibc 2.5, Hard Float (VFP), Little Endian

-----------------------

Java Development Kit 7 (JDK 7) is the next major release of the Java SE platform.
http://java.sun.com/features/jdk/7/
Through the OpenJDK project, JDK 7 has been a highly collaborative effort between Sun and volunteers from the Java developer community. Sun extends its gratitude to all who have contributed to this release.
Download the JDK 7 Early Access:
http://java.sun.com/javase/downloads/ea.jsp

Key Features
JDK 7 introduces several key features to improve performance, usability, and security of the Java platform. A detailed list of these features appears on the OpenJDK site.

Based on the feedback from the developer community and Sun's customers, the JDK 7 features primarily focus on the following areas.

Modularization A large-scale effort to refactor, or break up, the Java SE platform into smaller, separate, interdependent modules. Individual modules can then be downloaded as required by the Java virtual machine and/or Java applications. This effectively shrinks the size of the runtime on the user's machine.

One benefit of modularization is that the platform is a smaller download, potentially improving start-up performance. Having a smaller memory footprint also enables significant performance improvements, especially for desktop applications. A smaller platform also means it can now fit on devices with less memory.

You can find more information about modularization on the OpenJDK site, on Mark Reinhold's blog , or on the Project Jigsaw site.

Multi-Language Support Improves compatibility between Java and various dynamic languages, such as Ruby and Python, by providing better-than-native implementations of these languages on top of the Java Runtime Environment (JRE).

Refer to JSR 292a>, also called “InvokeDynamic”. This JSR defines the elements critical for Ruby, Python, and other dynamic languages to be addressed for JDK 7.

You can find more information on the Da Vinci Machine project page
http://openjdk.java.net/projects/mlvm/
or on the Sun wiki site.
http://wikis.sun.com/display/mlvm/Home

Developer Productivity - JDK 7 will also include several features to enhance developer productivity. One of Sun's goals is to make JDK 7, and other versions of the JDK, as developer-friendly as possible. Here are some features in JDK 7 to do just that:
Project Coin: Small language changes
Concurrency and Collections Updates
JSR 308: Type Annotations to improve static program checking
JSR 203: New I/O to define a true filesystem API

Performance Sun understands the need to improve the performance of the Java SE platform, and several features in JDK 7 address just that. Here are two such features slated for JDK 7:
Compressed 64-bit object pointers G1 Garbage Collector
The new Garbage First (G1) Garbage Collector is a low pause, server-style garbage collector that will eventually replace the Concurrent Mark-Sweep (CMS) garbage collector. G1's primary advantage over CMS are incremental compaction, better predictability, and ease of use. You can find more information on the OpenJDK site
http://openjdk.java.net/projects/jdk7/features/
or on Alex Miller's blog.
http://tech.puredanger.com/2008/05/0...bage-collector

solideogloria 2009-09-16 20:13

Re: Java for Maemo 5
 
Can anyone confirm Java applications working on the N900?

shadowjk 2009-09-17 01:12

Re: Java for Maemo 5
 
What are you asking here?

when you buy an n900 and take it out of the box and switch it on, java apps wont work, and there's no app available in maemo select or extras to make them work. That clear enough? No userfriendly way.

ovjo12 2009-10-15 17:20

Java support on N900, the missing thing!!
 
I know there no official support for Java, JavaME/CLDC/MIDP or JavaME/CDC today. This is a mistake from Nokia I believe, every Java developer I talk to say they will move to Android. Perhaps the community could add it? Anyone know anything about it?

allnameswereout 2009-10-15 17:36

Re: Java support on N900, the missing thing!!
 
http://java.sun.com/javase/downloads/embedded.jsp
http://community.java.net/mobile-and-embedded
http://www.microemu.org

Well I haven't tried them yet, but once I have N900 I will. The above links are all you need for now.

fms 2009-10-15 17:40

Re: Java support on N900, the missing thing!!
 
Quote:

Originally Posted by allnameswereout (Post 347455)
go to www.java.net and download, then 'other OS' and then pick 'embedded' then you see Linux/ARMv6 and Linux/ARMv7 Java binaries of IIRC Java 5.0. Some are for headless, some for GUI. Then you have to sign up. In theory these work.

Ahhahahahahahahahha 8)
Eeehhehehehehehehehehehe ;)
Ohhohohohohohohoho :)

thecursedfly 2009-10-15 17:42

Re: Java support on N900, the missing thing!!
 
actually who would be supporting JRE (java runtime environment) on N900 if it was there? Nokia? Sun? is it freeware? open source?

I would love to see it on the N900 too. Not a deal breaker for me, but well, I would be able to access my webmail with it at least. :)

@allnameswereout: you mean here? http://java.sun.com/javase/downloads/embedded.jsp

jaark 2009-10-16 10:00

Re: Java support on N900, the missing thing!!
 
I've just been reading about the intent to create JavaME environment for netbooks, this gives me hope for Java and Java ME on the n900 :-
http://www.theregister.co.uk/2009/10..._for_netbooks/

allnameswereout 2009-10-16 10:07

Re: Java support on N900, the missing thing!!
 
OpenJDK 6 is also ported to ARMEL.

nadavwr 2009-10-16 11:36

Re: Java support on N900, the missing thing!!
 
Both OpenJDK and Sun's embedded JRE work well on N810. I've only tried OpenJDK in chroot, but Sun's embedded JRE works fine on Maemo.
They both include Swing and for the most part software just works.
Performance on N810 is unimpressive (though reasonable so long as the program isn't too memory hungry), but I'm sure on the N900 Java will do just fine.

thecursedfly 2009-10-16 11:46

Re: Java support on N900, the missing thing!!
 
then why is there the "no java" complaining around? and I was told I couldn't surf to my webmail either? (gmx.com has a total java webpage afaik)
and java games applications should work too then?
is the only problem you have to install java yourself?

Rushmore 2009-10-16 11:49

Re: Java support on N900, the missing thing!!
 
Wouldn't java layered on Maeomo be inefficient? It sucks on Android and that is the truth. Nice for some level of portability, but sucky in regards to resource efficiency.

Ironically, the very thing that makes Android so "easy" to program for is what is holding it back. lame ***** java.

Cool on a laptop or computer though.

jaark 2009-10-16 11:57

Re: Java support on N900, the missing thing!!
 
Java is always 'layered' ontop of whatever platform you are running, and will always be slower than the base system.

That is the trade-off for 'compile once, run almost anywhere' for many applications the trade-off pays off, for others it doesn't.

Jaffa 2009-10-16 12:30

Re: Java support on N900, the missing thing!!
 
In addition to the above links there's also Jalimo.

Unfortunately, unless it's possible to right first-class apps with these JREs, they're destined to be niche things rather than mainstream app platforms. Personally, I think it's a shame.

I asked Peter about it at Nokia World; the answer is simple: "Other platforms" [Android, webOS and iPhone] have one development platform. Nokia have two which are strategic - Web Runtime and Qt. That's already more complicated than the other platforms both in terms of introducing developers to the platform and maintenance/support.

quipper8 2009-10-16 12:33

Re: Java support on N900, the missing thing!!
 
F*** Java

I know it won't die, but at least we can stab it

SubCore 2009-10-16 12:35

Re: Java support on N900, the missing thing!!
 
Quote:

Originally Posted by thecursedfly (Post 348246)
then why is there the "no java" complaining around?

the thing is, these Java SE Embedded packages for Linux are not "official" yet. they're evaluation versions valid for only 30 days.

also, sun currently does not permit redistribution of these packages.

thecursedfly 2009-10-16 12:39

Re: Java support on N900, the missing thing!!
 
Quote:

Originally Posted by SubCore (Post 348299)
the thing is, these Java SE Embedded packages for Linux are not "official" yet. they're evaluation versions valid for only 30 days.

also, sun currently does not permit redistribution of these packages.

and what happens after 30 days? it stops working? if so, it equal to me that it doesn't exist.. and it means it's not GPL (I tought java was?).. :/

SubCore 2009-10-16 12:43

Re: Java support on N900, the missing thing!!
 
i don't know what happens after this evalutation period, i don't have a NIT on which to test it on.

and yea, it's not GPL. these are binary packages and have a special licensing scheme (link to it is on the download site for embedded packages).

edit:
i just realized that these packages are evaluation NOT because they're beta versions or under developement, these are evaluation because sun wants to MAKE $$$ FAST on embedded devices :)

see here
Q10 and Q11 are relevant.

Bratag 2009-10-16 13:11

Re: Java support on N900, the missing thing!!
 
Quote:

Originally Posted by SubCore (Post 348305)
i don't know what happens after this evalutation period, i don't have a NIT on which to test it on.

and yea, it's not GPL. these are binary packages and have a special licensing scheme (link to it is on the download site for embedded packages).

edit:
i just realized that these packages are evaluation NOT because they're beta versions or under developement, these are evaluation because sun wants to MAKE $$$ FAST on embedded devices :)

see here
Q10 and Q11 are relevant.

It also states its free for development use. So develop with it. The two follow up Q's I took to mean deployment WITH a device - IE the n900 shipping with it.

SubCore 2009-10-16 13:18

Re: Java support on N900, the missing thing!!
 
i'm quite sure that "Deployment" also includes deploying the embedded runtime after shipping.
nokia has to pay these royalities or we will forever have to cope with the evaluation...

admiral0 2009-10-16 13:53

Re: Java support on N900, the missing thing!!
 
This could be an alternative:

https://wiki.evolvis.org/jalimo/index.php/Main_Page

I use it sometimes on the freerunner.

fms 2009-10-16 14:02

Re: Java support on N900, the missing thing!!
 
All these alternatives etc are pretty useless until you get to install a single package from Extras, click on any .jar or .jad file from the File Manager and get the MIDP program running instantly.

All the above stuff, either from Sun or from Jalimo, is just some cruft for Java geeks. Has been this way for months.

hypest 2009-10-16 14:04

Re: Java support on N900, the missing thing!!
 
I would use Java on the N900 at least for one reason:

Opera Mini

I think nothing beats Mini's efficiency. For the few things Mini does, it does it remarkably well...

TA-t3 2009-10-16 14:19

Re: Java support on N900, the missing thing!!
 
Java by itself is possibly just 'nice to have', but Java applets is a 'must have'. In my country all the banks (and I mean _all_) are changing to a system where not only net banking, but also credit card validation is done through a java applet. Without it, these things can't be done with the tablets (or the N900). Which is a major bummer, in particular when travelling.

Bratag 2009-10-16 14:23

Re: Java support on N900, the missing thing!!
 
Quote:

Originally Posted by TA-t3 (Post 348427)
Java by itself is possibly just 'nice to have', but Java applets is a 'must have'. In my country all the banks (and I mean _all_) are changing to a system where not only net banking, but also credit card validation is done through a java applet. Without it, these things can't be done with the tablets (or the N900). Which is a major bummer, in particular when travelling.

Ewwww really?

Good God thats awful. I thought they had taken Java applets out the back and shot them by now.

Hogwash 2009-10-16 14:24

Re: Java support on N900, the missing thing!!
 
Perhaps it would be OK to port the Java ME specification.....that shouldn't suck too much horsepower.

But a full-blown SE JVM.....F that into a cocked hat.

jaark 2009-10-16 14:27

Re: Java support on N900, the missing thing!!
 
Quote:

Originally Posted by SubCore (Post 348305)
i just realized that these packages are evaluation NOT because they're beta versions or under developement, these are evaluation because sun wants to MAKE $$$ FAST on embedded devices :)

see here
Q10 and Q11 are relevant.

Hmm, other questions imply that the embedded version is designed for embedded, limited/single purpose devices - which isn't what the n900 is about. The page also implies that ARM versions of normal Java SE exist, but I can't find a download - not that I've looked very hard.

admiral0 2009-10-16 14:31

Re: Java support on N900, the missing thing!!
 
Try this:

https://wiki.evolvis.org/jalimo/inde...stall_packages

You're only a click away from a JVM.

I really don't like Java. I prefer true C, C++ apps as they are faster. But open source is made of choices, so why shouldn't there be java for maemo?

SubCore 2009-10-16 14:35

Re: Java support on N900, the missing thing!!
 
Quote:

Originally Posted by jaark (Post 348441)
Hmm, other questions imply that the embedded version is designed for embedded, limited/single purpose devices - which isn't what the n900 is about. The page also implies that ARM versions of normal Java SE exist, but I can't find a download - not that I've looked very hard.

These downloads are in fact the ARM versions of JavaSE.

I believe Sun didn't quite anticipate that powerful devices like the n900 would so soon be able to host a full Java SE. You're right, these downloads are aimed at other, more specialized embedded devices (TV-set top boxes f.ex.), so you as a manufacturer can evaluate the possibilities.

Note that there are no similar evaluation downloads for Java ME!


edit: Hogwash is right though, the SE JVM probably won't perform too well. it's just that these downloads are currently the only way to get sun java on this tablet.
Porting Java ME is a huge licensing issue. If Nokia didn't "buy" it for the N900 already, chances are they are never gonna do so.

jaark 2009-10-16 15:00

Re: Java support on N900, the missing thing!!
 
Quote:

Originally Posted by SubCore (Post 348451)
These downloads are in fact the ARM versions of JavaSE.

They are Java SE Embedded - a slight, but important in licensing terms, difference.

I retract my previous post, after re-reading the FAQ it doesn't imply that a Java SE for ARM exists.

Hogwash 2009-10-16 15:08

Re: Java support on N900, the missing thing!!
 
Plus, you simply don't just compile a JVM for a hardware platform (outside embedded systems)....you also compile for OS. You need an ARM/Maemo JVM.

allnameswereout 2009-10-16 15:38

Re: Java support on N900, the missing thing!!
 
Quote:

Originally Posted by SubCore (Post 348341)
i'm quite sure that "Deployment" also includes deploying the embedded runtime after shipping.
nokia has to pay these royalities or we will forever have to cope with the evaluation...

Unless you get commercial gain I'd say we are rather beta testers.

If you get them from unofficial source here are the sha256 checksums

$ sha256sum ejre-1_6_0_10-ea-b39-linux-armv*
0d3df7ea125a1fb9dbf74cbe2412bcff67362604ed8736d976 9c2335e74528c6 ejre-1_6_0_10-ea-b39-linux-armv5-sflt-eabi-headless-eval-31_jul_2009.tar.gz
ddc017b48ea6a45599e25ea8b3a5af50ccbe60c64865e20970 88dc1242a11c0c ejre-1_6_0_10-ea-b39-linux-armv5-sflt-eabi-min-eval-31_jul_2009.tar.gz
f369777d24636c8805840fb8771dc7390d69a808d29d50104a b96c5e79a18d93 ejre-1_6_0_10-ea-b39-linux-armv6-sflt-eabi-headless-eval-30_jul_2009.tar.gz
b9e78e0c5d204d6ad2e50adfe89f0bfdf6e1bbb64492f53326 caf9df51ae4014 ejre-1_6_0_10-ea-b39-linux-armv6-vfp-eabi-headless-eval-30_jul_2009.tar.gz
5c707c8e38d1ceae039ad3910e5dc7663d28ec582a92bc8a3b 4f5915b096e5da ejre-1_6_0_10-ea-b39-linux-armv6-vfp-eabi-min-eval-30_jul_2009.tar.gz

As you can see the latest snapshot is from 20090730. And, there is no ARMv7 build.

There is no SUN Java SE 6 for Linux/ARM, but there is OpenJRE 6 for ARM(EL)

Hogwash 2009-10-16 15:42

Re: Java support on N900, the missing thing!!
 
Quote:

Originally Posted by allnameswereout (Post 348548)
... but there is OpenJRE 6 for ARM(EL)

That won't help you on Maemo5....I presume this JVM runs naked on the processor.

SubCore 2009-10-16 16:20

Re: Java support on N900, the missing thing!!
 
Quote:

Originally Posted by allnameswereout (Post 348548)
As you can see the latest snapshot is from 20090730. And, there is no ARMv7 build.

Ouch, you're right.
I forgot that Cortex is a v7 family processor :(

@hogwash
openjre/jdk is just another JVM. no nudity :)

Hogwash 2009-10-16 16:26

Re: Java support on N900, the missing thing!!
 
Quote:

Originally Posted by SubCore (Post 348618)
@hogwash
openjre/jdk is just another JVM. no nudity :)

I understand this. My point was that it is no use for the stated desire of running java apps on Maemo5. If you want to build a new java OS on an ARM platform, you may be in luck, but this JVM (if I understand it) has no knowledge of Maemo interfaces/hildon/gtk/qt etc, so would be pretty useless.

SubCore 2009-10-16 16:33

Re: Java support on N900, the missing thing!!
 
why would the JVM need to know about hildon, gtk, qt? it's not about making java-applets run with the same interface as native maemo software, applets just use swing as they do in any other jvm on any other platform.

allnameswereout 2009-10-16 16:35

Re: Java support on N900, the missing thing!!
 
Quote:

Originally Posted by hypest (Post 348411)
I would use Java on the N900 at least for one reason:

Opera Mini

I think nothing beats Mini's efficiency. For the few things Mini does, it does it remarkably well...

Opera Mini requires Java ME; not Java SE. When we refer to Java we usually refer to Java SE.

Opera Mini is optimized for specific devices (screen size, input methods, etc). I'm not entirely sure how this optimization works, but you cannot simply grab Opera Mini and run that on any device you get Java ME working on and get an optimized experience.

Have to admit I'm impressed with Opera Mini 5.0 beta btw.

I think SUN is aware of Nokia N900 because I see various blog posts by employers about that. JavaFX requires either Java ME or Java SE. An early access built of 1.2 is available for Windows Mobile only though.

[EDIT]
Quote:

phoneME Feature software is an open source development effort addressing the market and technical requirements of “feature phone” devices. The majority (about 80%) of mobile phones in the world today are feature phones. Devices of this type typically include a high-resolution screen, multiple forms of messaging (SMS, MMS, IM, Email), basic 2D and 3D gaming, a camera, music player, Internet browser, etc.
phoneME was ported previously to 770 and N800 (Bora).

Project homepage: https://phoneme.dev.java.net
Linux/ARM port: https://phoneme.dev.java.net/downloads_previous.html
Nokia 770/N800 port: http://wiki.java.net/bin/view/Mobile...honeMEAdvanced[/EDIT]

Quote:

Originally Posted by Hogwash (Post 348555)
That won't help you on Maemo5....I presume this JVM runs naked on the processor.

What do you mean? That is always the case.

The JVM is static or dynamic compiled and utilizes the processor. Whether it runs on a Linux kernel and you have only Java SE programs running on the JVM (like with Jalimbo) or whether you run a full Linux server headless with Apache/Tomcat does not matter. The JVM runs on an OS with a kernel, and the Java applications run in the JVM.

The good news is that OpenJRE (OpenJDK 6 JRE) is almost completely compatible with SUN's Java SE 6. There are only a few proprietary parts of SUN Java SE 5 & 6. Effort is put in replacing these with open source variants.

All one has to do is recompile this and its dependancies in sbox. Which will take quite some time, and the built will not be optimized for Maemo 5 or ARMv7 (but Linux/ARMv5 and Linux/ARMv6 should work!). Once packed this binary may be distributed via extras-devel.

We could also use Jalimbo, its already ported to previous Java versions.

We'd also need a plugin for MicroB to be able to embed Java. These work with e.g. OpenJRE too.

In short, there are tons of methods to get a Java ME compatible VM or Java SE compatible VM working on Linux/ARM. Each requires effort though. Before I start effort on porting I rather first try SUN's proprietary packages to check performance and see if MicroEmu can be run from that.

allnameswereout 2009-10-16 16:45

Re: Java support on N900, the missing thing!!
 
Quote:

Originally Posted by Hogwash (Post 348628)
I understand this. My point was that it is no use for the stated desire of running java apps on Maemo5. If you want to build a new java OS on an ARM platform, you may be in luck, but this JVM (if I understand it) has no knowledge of Maemo interfaces/hildon/gtk/qt etc, so would be pretty useless.

The Java SE applications I use are either headless or Swing. Yes, doesn't look nice in desktop environment. Whatever. Both Qt (Qt Jambi) and GTK have bindings for Java, allowing you to give the application 'native feel'.

Hogwash 2009-10-16 22:29

Re: Java support on N900, the missing thing!!
 
By "run naked on the processor" I mean that the JVM is the only software that runs on the processor - as is the case with embedded apps.

To actually see anything on your display, a whole truckload of library code needs to be implemented; take the simple case of Swing (which ain't that simple) - for a basic Swing window to visually appear on your N900, there needs to be bindings through to the hildon layer....ie. the JRE needs to be built - not only for the ARM platform - but also for the Maemo environment it will interact with. Not only that, but the limitations of the Maemo5 GUI will have a significant impact on how those bindings are implemented. Coding Java apps for Maemo5 will be a tad more awkward than for good ol' 'Doze or X ;)


All times are GMT. The time now is 05:06.

vBulletin® Version 3.8.8