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)

fms 2009-10-17 22:23

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

Originally Posted by Bratag (Post 349931)
The C version runs in 2 seconds on a selected image, the Java version takes 20 and on top of that half the time it craps out because the jvm runs out of memory.

...and this returns us to the importance of correct memory allocation :) Like someone said good five+ years ago, "if Java is the answer, then what the hell was the question?"

javispedro 2009-10-17 22:28

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

Originally Posted by fms (Post 349936)
then what the hell was the question?

Easy: look a few posts above for someone who hates C memory allocation. You get what you ask for ;)

allnameswereout 2009-10-17 23:22

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

Originally Posted by fms (Post 349653)
2. JavaME also known as MIDP, also known as J2ME, also known as PhoneME is a somewhat lobotomized version of Java supported by most mobile phones. Most mobile games and some mobile apps running on dumb phones are written using this version of Java.

If SUN wants JavaFX run on Nokia N900 they're gonna need either Java ME or Java SE on Nokia N900. For now, SUN is merely providing an early access version of JavaFX for Windows Mobile though.

Once JavaFX is ported to Linux/x86-32 it shouldn't be too hard to port to Linux/ARM because it already is ported to WM6/ARM. Shouldn't be too hard for SUN if proprietary or official port, for community if open source, or both.

It is nice to have backwards compatibility. I've taken advantage of this before. Sometimes, it is beyond your control because you have no power over it because your employer or business partner decides the software to be used. For example, in past I had to use Java for .nl ccTLD administration. Some custom software we run is proprietary and requires Java, they cannot be rewritten (would cost too much), and it'd be nice if I wouldn't need to use a seperate device than N900 to run these. Some corporations also require usage of Java applet, with their only alternative (if there is one!) being a bad interface. For a long time my bank required Java! I need Java to get remote desktop over HTTP, too.

We all have different needs. I don't need any of the game emulators yet they're popular. LUA was useful on Diablo for me but I doubt it was much used. Regarding Java, we're not necessarily talking about out of the box which is also both related to chicken/egg, as well as legacy from non-opensource Java.

Although you said no Java ME on S60 phone I have Opera Mini 5 as my backup browser. I like to use it when roaming. I've even used Opera Mini 4.2 on S40 phones in an emergency. I don't yet how I'm going to fix this on my N900...

fms 2009-10-18 05:55

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

Originally Posted by allnameswereout (Post 349980)
If SUN wants JavaFX run on Nokia N900 they're gonna need either Java ME or Java SE on Nokia N900. For now, SUN is merely providing an early access version of JavaFX for Windows Mobile though.

Who, other then SUN, even needs JavaFX? Are there any useful JavaFX applications? Will there ever be any? As far as I can tell, the world seems to have standardized on Flash for these purposes.

Quote:

Although you said no Java ME on S60 phone I have Opera Mini 5 as my backup browser. I like to use it when roaming. I've even used Opera Mini 4.2 on S40 phones in an emergency. I don't yet how I'm going to fix this on my N900...
I have not said "no" to JavaME. In fact, I continue insisting that we absolutely need JavaME on Maemo, because there are so many applications written in JavaME on the market.

qgil 2009-10-18 08:11

Re: Java support on N900, the missing thing!!
 
I was wondering whether http://maemo.org/community/brainstorm would help consolidating this interesting discussion in one proposal with potential solutions listed.

bcaroll 2009-10-18 09:36

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

Originally Posted by Bratag (Post 349931)
So you want speed and java. Yeah thats not going to happen. As an android coder who also codes in C I can tell you there is no comparison in performance. The reason java coders hate to code in C is because it forces you to think about memory allocation and freeing and that goes against the " throw everything into memory and let garbage collection sort it out " mentality that most Java coders have.

Trust me the surest way to take something fast and hobble it is chuck Java into the mix. Here is an example.

I have a pixel by pixel filter I compiled on my G1 in C and also the same filter in Java. The C version runs in 2 seconds on a selected image, the Java version takes 20 and on top of that half the time it craps out because the jvm runs out of memory.

Take from that what you will I guess

Unfortunately a lot of people, like you, think that there is a jvm in the Android platform. The vm used in Android is called Dalvik and it is not a jvm. The only thing Java about Android is the syntax and the syntax has little to do with performance. Thus your example has no relevance in the Java discussion.

The most important thing lacking in the Dalvik VM is a JIT. The difference in speed has been measured to 5-10 times faster with the JIT. The actual speed naturally depends on what you do but a better figure to use is that Java runs at about 80% of the speed of native programs.

If you had read all of my post you would have noticed that I see the need for some programs and parts of programs that run on the native platform.

However most applications are not image filtering and why would you want to to manage the memory of simple data lookup and entering app?

I think we have all see all those great C developers that "know" how handle memory of apps the leak memory, forcing us to restart the app regularly. A large number of security holes are due to developer that cannot handle a simple buffer overflow. I guess we have to expect a huge increase in mobile worms in the future.

ovjo12 2009-10-18 12:43

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

Originally Posted by qgil (Post 350166)
I was wondering whether http://maemo.org/community/brainstorm would help consolidating this interesting discussion in one proposal with potential solutions listed.

I have not used it before so don't know how it works. But I like the idea to consolidating this interesting discussion in one proposal with potential solutions listed

qgil 2009-10-18 12:47

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

Originally Posted by ovjo12 (Post 350285)
I have not used it before so don't know how it works. But I like the idea to consolidating this interesting discussion in one proposal with potential solutions listed

http://static.maemo.org/static/m/mae...troduction.swf

ovjo12 2009-10-18 13:13

Re: Java support on N900, the missing thing!!
 
I think also it would be very interesting to be able to run eRCP applications. It is a solution from a Eclipse project called eRCP. eRCP is installed on top of JavaME/CDC1.1/FP1.1 and using eSWT instead of AGUI or LCDUI(MIDP). This is something I also think Nokia would like to support because they are supporting this technology since many years in the eRCP project. eSWT support is already added in Nokias's S60 Java runtime from S60 v3.2 because eSWT don't need JavaME/CDC support, it runs also on top of JavaME/CLDC/MIDP.

fms 2009-10-18 13:17

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

Originally Posted by ovjo12 (Post 350289)
I think also it would be very interesting to be able to run eRCP applications. It is a solution from a Eclipse project called eRCP. eRCP is installed on top of JavaME/CDC1.1/FP1.1 and using eSWT instead of AGUI or LCDUI(MIDP). This is something I also think Nokia would like to support because they are supporting this technology since many years in the eRCP project. eSWT support is already added in Nokias's S60 Java runtime from S60 v3.2 because eSWT don't need JavaME/CDC support, it runs also on top of JavaME/CLDC/MIDP.

Ok. How many applications use eRCP/eSWT at the moment?


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

vBulletin® Version 3.8.8