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)

allnameswereout 2009-10-17 00:51

Re: Java support on N900, the missing thing!!
 
You just end up with 2 toolkits, Swing and GTK (Maemo 5) or Qt (Maemo 6). Not recommended for the faint of heart although for backwards compatibility its either an option or not.

Ability to use Java applets is also sometimes required as example above.

I don't believe Java support on the device is going to be a killer feature though, but doesn't mean those who care should stop caring.

Can one not simply port their Java application to Qt Jambi? Provided one has access to source that is.

FWIW, I've made a stub for Java at Maemo wiki the old article was unnecessarily technical, out of date, and mostly about Nokia 770.

Hogwash 2009-10-17 01:13

Re: Java support on N900, the missing thing!!
 
I'm unfamiliar with "Qt Jambi"....but whatever it is, it ain't gonna work unless the specific JRE you install has been compiled for both your hardware and OS/framework environment.

Think about it...when the particular bytecode is executed in the JVM...how does it know what to call through to to cause the OS and graphical interface system to display a nice window or button? Now consider the limitations of the hildon framework - we don't have outer app windows floating around on a big desktop....the available real estate on the device has constrained the GUI framework, and that constraint must therefore be passed onto the relevant Java APIs.

SubCore 2009-10-17 02:01

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

Originally Posted by Hogwash (Post 349230)
when the particular bytecode is executed in the JVM...how does it know what to call through to to cause the OS and graphical interface system to display a nice window or button?

take a look at the java se embedded site once again.

you'll notice, these packages are not only compiled for ARMv6, but also linked to glibc2.5.
you'll also notice there are "headful" and "headless" packages. "headful" just means linked to X11R6.

in a headful package, frameworks like swing have their own controls to be used by any application. API calls made by swing are basic drawing calls to X11(as in, pixel here, line there etc.).

for a hildonized button (which swing by itself does neither offer, nor know about or even care), you'll need something like the bindings allnameswereout mentioned (thank you btw, didn't know they existed).

allnameswereout 2009-10-17 02:06

Re: Java support on N900, the missing thing!!
 
:confused: lets say we have a hypothetic open source Java application using Swing as toolkit.

We port it to Qt Jambi (Java bindings for Qt), and run this in the JVM.

It will look native Qt, the code remains Java, and runs on X11. Just like when I run Qt application on Mac OS X it uses COCOA but internal code is almost completely same as Linux, Windows version.

So, except for the fact our application isn't hildonized (the horror, frankly I don't give a flying dodo about, as long-term is about Qt anyway, it isn't worth it) why would that not work well?

The Java application _is_ using Qt and it 'Qtized', and the JVM hasn't got anything to do with Qt.

If the Qt 4.6 for Maemo works well, and Qt Jambi is supported, all this will easily work too. Although there is no Qt Jambi for embedded as of now.

The problem is with closed source Java applications, and web applets. Those may seem fugly.

fms 2009-10-17 05:42

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

Originally Posted by allnameswereout (Post 349258)
:confused: lets say we have a hypothetic open source Java application using Swing as toolkit.

Drop "hypothetic" and think of how many such applications exist that are actually useful. This should provide you with the answer why Java is not on the device.

PS: We are talking JavaSE here, not JavaME, so Opera and games do not count =)

SubCore 2009-10-17 12:02

Re: Java support on N900, the missing thing!!
 
well, here is one example.

just because you can't think of useful java apps, doesn't mean they don't exist.

fms 2009-10-17 12:12

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

Originally Posted by SubCore (Post 349493)
well, here is one example.

Ok, and what does this example do? As far as I can tell, this is just some guy trying to run some custom piece of business software.

Quote:

just because you can't think of useful java apps, doesn't mean they don't exist.
Back to square one: How many useful Java apps do you actually know? Please, exclude JavaME (separate case) and custom corporate middleware (does not qualify as useful for general public).

SubCore 2009-10-17 12:20

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

Originally Posted by fms (Post 349504)
Ok, and what does this example do? As far as I can tell, this is just some guy trying to run some custom piece of business software.

and what exactly makes that less valid ??

i'm not gonna list examples, that would be of no use to you or anyone. fine, you don't need java. other people do, which is exactly my point. here we are talking about ways to deliver it, and you seem to convince us not to do it, which is counterproductive.

fms 2009-10-17 13:17

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

Originally Posted by SubCore (Post 349515)
i'm not gonna list examples, that would be of no use to you or anyone.

Actually, it would be of good use to me: I would genuinely like to know just what useful general purpose applications have ever been written in Java. I know of just one (Eclipse) that at least some people find useful. Are there any others?

Quote:

fine, you don't need java. other people do, which is exactly my point. here we are talking about ways to deliver it, and you seem to convince us not to do it, which is counterproductive.
Well, I would like to know how many "other people" really need Java? I mean, not to entertain themselves programming in it, but to run real Java apps?

SubCore 2009-10-17 14:40

Re: Java support on N900, the missing thing!!
 
well, i myself would actually need it for "custom corporate middleware" :)

for one, i need it to be able to place orders with my bank on the go. i can't do that now (unless i have my laptop with me, which i usually don't), and it's not a must-have or dealbreaker or anything like that. i don't even know if the bank's applet would be usable on the n900 (icon and screen size), but i sure would like to try :)

another use case for me would be logging in remotely to my corporate desktop. my company offers 3 options: activex (no need to elaborate), a local citrix client (which i haven't actually looked into as a possibility on the n900), and a java applet. again, it's not something that i currently can do or that i'm sure would work, but it would be quite nice to have.

basically, you're right about the reason why java doesn't come with the n900 out-of-the box (and why it didn't on earlier tablets). there are not really many use cases for it on such devices, but they do exist :)
which makes pursuing this goal worthwhile.


All times are GMT. The time now is 21:59.

vBulletin® Version 3.8.8