maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   JAVA on the N900 is possible! (https://talk.maemo.org/showthread.php?t=37405)

floweih 2010-01-26 13:59

Re: JAVA on the N900 is possible!
 
Hello,

the microemulator does not work. The error message is:

java -jar /home/opt/microemulator-2.0.4/microemulator.jar
Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:60 7)
at javax.swing.plaf.basic.BasicLookAndFeel.initialize (BasicLookAndFeel.java:1720)
at javax.swing.UIManager.setLookAndFeel(UIManager.jav a:912)
at javax.swing.UIManager.<clinit>(UIManager.java:245)
at org.microemu.app.Main.main(Main.java:1024)
Caused by: java.lang.UnsatisfiedLinkError: Native library `gtkpeer' not found (as file `libgtkpeer.so') in gnu.classpath.boot.library.path and java.library.path
at java.lang.Runtime.loadLibrary(Runtime.java:763)
at java.lang.System.loadLibrary(System.java:670)
at gnu.java.awt.peer.gtk.GtkToolkit.<clinit>(GtkToolk it.java:177)
at java.lang.VMClass.forName(Native Method)
at java.lang.Class.forName(Class.java:233)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:58 3)
...4 more
Nokia-N900-42-11:~#

Which Version of the java jre is the right one? The hard floating or the soft floating? Who can please help?

Greetings

Wonko 2010-01-26 23:04

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by Ulrik (Post 495501)
Is it possible to install Java on the N900 without the 90-day trial period?

You could e.g. use the openjdk provided on the following website:
http://www.camswl.com/openjdk
Someone else posted that link already earlier in the thread but i am kinda weak in remembering names. ;)

It works quite well for me here.

fred123 2010-01-27 02:17

Re: JAVA on the N900 is possible!
 
Using

ejre-1_6_0_10-ea-b39-linux-armv6-vfp-eabi-headless-eval-30_jul_2009.tar.gz

microemulator-2.0.4

Runing the command
Nokia-N900-51-1:/home/opt/java/microemulator-2.0.4# java -jar microemulator.jar

I get error below

Exception in thread "main" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(Graphic sEnvironment.java:159)
at java.awt.Window.<init>(Window.java:414)
at java.awt.Frame.<init>(Frame.java:403)
at java.awt.Frame.<init>(Frame.java:368)
at javax.swing.JFrame.<init>(JFrame.java:163)
at org.microemu.app.Main.<init>(Main.java:772)
at org.microemu.app.Main.<init>(Main.java:769)
at org.microemu.app.Main.main(Main.java:1029)

Any suggestions?

fred123 2010-01-27 02:51

Re: JAVA on the N900 is possible!
 
OK found problem was sing headless jre.

Now trying to get my traffic tv app to run, is there any way of changing the font size?

[DarkGUNMAN] 2010-01-30 17:15

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by qole (Post 432491)
Wow.

The headful Java works amazingly well.

I tried the Java 2D demo, and it worked at a reasonable speed! Not as fast as my desktop, but I didn't say, "oh man, this is slow" or anything...

If Sun will let N900 owners use this without trial limitations, then we really do have a viable Java SE for the N900.

Now to try Opera Mini via MicroEmulator ;)

(EDIT: Using this method)


Managed to get this running too - running OpenJDK and MIcroEmu. Created a Menu link which launches MicroEmu running Opera Mini 4.2, works as fast as I'd expect it from a J2ME comaptible phone.

I'm going to make an easier guide to follow for other people to implement. Only thing left would be to create a .deb file to automate the install.

2bli2 2010-01-30 18:02

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by Ulrik (Post 495501)
Is it possible to install Java on the N900 without the 90-day trial period?

No - but it's fairly easy to get around the 90-day trial period. Not sure of the legality of it, so not going to tell you exactly how :p Have a look for any hidden files in the JRE installation, though... ;)

[DarkGUNMAN] 2010-02-01 11:39

Re: JAVA on the N900 is possible!
 
Given MicroEmu and Opera Mini 4.2 on OpenJDK a good test this weekend using only a 2G connection. The experience is comparable to MicroB if you leave the screen effects enabled and navigate as you usually would. Though the zooming features aren't there it does come in handy when WiFi and 3G are not available.. Only thing about it is the font used by MicroEmu, I'd like to try and change it but I don't know where to edit this.

I did try using Opera Mini 5 beta, but this ran more sluggish..
Next test is to use J2SE as the Java base and see if it makes any difference.

In the main this would run better if J2ME was supported natively or through PhoneME, but this is the best work around so far.
----------

Back on topic it looks like OpenJDK is running fine. Assuming that Nokia won't provide native Java support at a later date, this should be made available as an install from the repository.

barteo 2010-02-02 13:09

Re: JAVA on the N900 is possible!
 
Hi all,

I'm a person behind the MicroEmu. I've been watching that forum from time to time. I've noticed there is significant interest in running Java ME applications on Maemo platform using MicroEmu.

I'm eager to help in making MicroEmu better for Maemo. What in your opinion is the most important to do?

myk 2010-02-02 13:22

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by barteo (Post 506769)
What in your opinion is the most important to do?

maps are lacking on Maemo, so the java version of google maps would be nice. How much is needed to get that working?

fred123 2010-02-02 13:36

Re: JAVA on the N900 is possible!
 
I have tried using it to run TrafficTv, I find that the font size is a little small.

if I can get that and maps working I could sell my n97!

kojacker 2010-02-02 13:43

Re: JAVA on the N900 is possible!
 
i would love to be able to run Java ME applications on the n900, it would be a brilliant feature to have It's great to see so much interest and keenness on the thread, looking forward to following along and seeing what y'all come up with :)

sxg75 2010-02-02 14:56

Re: JAVA on the N900 is possible!
 
Well if someone are supposed to express their wishes then ;)

Direct support of Location API (JSR-179) or Bluetooth API (JSR-82) would be good. Or if that's not possible, describe how or if OpenLAPI/Bluecove/ integration would be possible on maemo platform?

mikec 2010-02-02 15:12

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by barteo (Post 506769)
Hi all,

I'm a person behind the MicroEmu. I've been watching that forum from time to time. I've noticed there is significant interest in running Java ME applications on Maemo platform using MicroEmu.

I'm eager to help in making MicroEmu better for Maemo. What in your opinion is the most important to do?

Lots of people have asked for the java gmail client.

[DarkGUNMAN] 2010-02-02 16:35

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by barteo (Post 506769)
Hi all,

I'm a person behind the MicroEmu. I've been watching that forum from time to time. I've noticed there is significant interest in running Java ME applications on Maemo platform using MicroEmu.

I'm eager to help in making MicroEmu better for Maemo. What in your opinion is the most important to do?

Glad you popped in and are interested in improving this for N900! If possible could MicroEmu allow you to select a font which is used by the midlet. Also enable aa full screen option if possible

ofels 2010-02-02 16:46

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by [DarkGUNMAN] (Post 507113)
Glad you popped in and are interested in improving this for N900! If possible could MicroEmu allow you to select a font which is used by the midlet. Also enable aa full screen option if possible

I have not followed the whole thread but as MicroEmu seems to support jamVM and classpath (which are available at least for Diablo) it should be fairly straightforward to build jamvm, classpath, jikes and swt to get MicroEmu running under Fremantle without the need to fiddle around with OpenJDK: http://www.microemu.org/maemo/

gowen 2010-02-02 19:25

Re: JAVA on the N900 is possible!
 
Well if we are putting in requests I would really like to run the J2ME Audible Air client.

soeiro 2010-02-03 03:15

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by Wonko (Post 496437)
You could e.g. use the openjdk provided on the following website:
http://www.camswl.com/openjdk

Two quick questions and a not so quick one:

1) I understood that this is not the full OpenJDK (no JIT) but a interpreted version of it. Is this correct?

2) Is there any one thinking of packaging it or another OpenJDK-based jvm to place it into extra-testing?

3) Does anybody know if that version of the OpenJDK will be enough to run Scala (language) applications? :D

Wonko 2010-02-03 16:55

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by soeiro (Post 507893)
1) I understood that this is not the full OpenJDK (no JIT) but a interpreted version of it. Is this correct?

Yes, according to their website, it is without JIT. But they also say that this version gives reasonable performance even without JIT (they say something about "70-80% of the performance of a JIT"). I didn't do any benchmarks, i'm just happy having java on my N900. :)

Quote:

Originally Posted by soeiro (Post 507893)
2) Is there any one thinking of packaging it or another OpenJDK-based jvm to place it into extra-testing?

This would be a great thing! Btw there are also openjdk packages for debian armel available. Though i don't know if porting/using these for maemo makes sense or is feasible at all.

Quote:

Originally Posted by soeiro (Post 507893)
3) Does anybody know if that version of the OpenJDK will be enough to run Scala (language) applications? :D

Not me ;)

fred123 2010-02-03 17:28

Re: JAVA on the N900 is possible!
 
Does anyone know if there is a java version of google maps 3?

owerlord 2010-02-03 18:34

Re: JAVA on the N900 is possible!
 
can someone try Runescape java web browser based game be played with this? can anyone try to load the game up, no need to play it just load the game?

i would love to know if its possible =)

soeiro 2010-02-04 12:12

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by owerlord (Post 509071)
can someone try Runescape java web browser based game be played with this? can anyone try to load the game up, no need to play it just load the game?

i would love to know if its possible =)

It depends. They usually package OpenJDK for debian systems in such a way that you can also install the java plugin for Firefox/Iceweasel. For Konqueror, you don't even need the plugin. It calls the JRE directly.

So, my guess is that it really comes down to the N900 browser. Does it support plugins like Firefox?

fred123 2010-02-04 12:24

Re: JAVA on the N900 is possible!
 
I does support firefox plugins and addons, but people seem to be having problems getting them to work.

soeiro 2010-02-04 13:08

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by fred123 (Post 510284)
I does support firefox plugins and addons, but people seem to be having problems getting them to work.

For clarification.

I meant the Java plugin. In Konqueror, you just specify the location of the JVM runtime (java). In Firefox, on the other hand, you must specify the location of the Java plugin.

Hence, on some browsers you only need the Java runtime to be able to use Java Applets (inside browsers). In other browsers, you need the Java plugin, a separate package, for Java Applets to work.

owerlord 2010-02-04 15:31

Re: JAVA on the N900 is possible!
 
can someone test runescape pls???

fred123 2010-02-04 17:12

Re: JAVA on the N900 is possible!
 
Ok I'm using the sun embeded jre and have the java plugin enabled in microb.

If I load a page with an applet the page loads without any errors but the applet just shows as a black box, any suggestions

qole 2010-02-04 23:07

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by barteo (Post 506769)
Hi all,

I'm a person behind the MicroEmu. I've been watching that forum from time to time. I've noticed there is significant interest in running Java ME applications on Maemo platform using MicroEmu.

I'm eager to help in making MicroEmu better for Maemo. What in your opinion is the most important to do?

barteo: I would like to see input improved. When I try to log in to a web site with Opera Mini, I get a text box. I can enter text into this box, but I cannot submit it.

I would also like to see fonts improved. Some way to set font size would be nice, and it would be nice if the fonts were smoothly rendered.

Finally, I would love to see MicroEmu packaged for Maemo, with the OpenJDK included.

debernardis 2010-02-05 06:24

Re: JAVA on the N900 is possible!
 
...and I would like to be able to run ylld.jar.

Don't you know what is it? It's a java version of shazam id (the application who listens at music and tells you title, album and author). You can find it in several forums, either as ylld.jar or as yyld.jar (someone's typo).
I've tried it on an install of microemulator (the one you can download from maemo.ru, and where opera mini 4 works well) but yyld outputs some java errors from the terminal that I won't be able to understand in the next fifty years :)

barteo 2010-02-05 12:52

Re: JAVA on the N900 is possible!
 
Hi all,

Thanks for the feedback related to the MicroEmu. As you probably discovered yourself the manual at http://www.microemu.org/maemo is outdated and doesn't work at all. Now I'm trying to update that instruction and make it even simpler. When it starts working again we should have discussion on the plan what to do next.

At the moment I'm struggling to compile GNU Classpath 0.98 with the ECJ compiler. Maybe someone has done it before and can help me in that.

owerlord 2010-02-05 13:01

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by soeiro (Post 510273)
It depends. They usually package OpenJDK for debian systems in such a way that you can also install the java plugin for Firefox/Iceweasel. For Konqueror, you don't even need the plugin. It calls the JRE directly.

So, my guess is that it really comes down to the N900 browser. Does it support plugins like Firefox?

so what does it mean? :o n900 browser needs to supports firefox plugin so it will work?

[DarkGUNMAN] 2010-02-05 16:20

Re: JAVA on the N900 is possible!
 
For some unknown reason, the font used by MicroEmu has changed to Courier Italic! No idea why or how but I'd let you Opera Mini looks wierd with pages rendered in this font :)

Addison 2010-02-06 07:37

Re: JAVA on the N900 is possible!
 
Hey all.

I installed my DVD of UptoDate 17.3 on my internal memory card.

I'd like to run this under Garnet VM if possible.

All the files, which total around 1.8 gigs in size, are in .jar format. The program is just basic text output to the screen along with non-animated images.

The installation went fine but went I start it up, I get a segmentation fault most likely due to not having any type of java support.

So to keep things simple, is there any possible chance of having this work?

This app is probably the most important thing to me in the world.

Here's a basic screen shot of what it put on my memory card.

http://img707.imageshack.us/img707/1408/20046689.png

My expectations on this is very low but still had to at least ask you guys. :)

debernardis 2010-02-06 08:51

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by Addison (Post 512833)
Hey all.

I installed my DVD of UptoDate 17.3 on my internal memory card.

I'd like to run this under Garnet VM if possible.

All the files, which total around 1.8 gigs in size, are in .jar format. The program is just basic text output to the screen along with non-animated images.

The installation went fine but went I start it up, I get a segmentation fault most likely due to not having any type of java support.

So to keep things simple, is there any possible chance of having this work?

This app is probably the most important thing to me in the world.

Here's a basic screen shot of what it put on my memory card.

http://img707.imageshack.us/img707/1408/20046689.png

My expectations on this is very low but still had to at least ask you guys. :)

dear colleague :) I'm no expert at all of java stuff but try this:

do as the first post of this: http://talk.maemo.org/showthread.php...ght=java+opera - the thing you have to download and uncompress in /home/user is this: http://maemos.ru/wp-content/uploads/...opera_mini.zip

then after confirming that it works by running opera mini, you can try with your medical jar files by command line; as far as I can tell should be

java -jar microemulator.jar yourmedicalfile.jar

Good luck :)

Addison 2010-02-06 15:57

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by debernardis (Post 512870)
dear colleague :) I'm no expert at all of java stuff but try this:

do as the first post of this: http://talk.maemo.org/showthread.php...ght=java+opera - the thing you have to download and uncompress in /home/user is this: http://maemos.ru/wp-content/uploads/...opera_mini.zip

then after confirming that it works by running opera mini, you can try with your medical jar files by command line; as far as I can tell should be

java -jar microemulator.jar yourmedicalfile.jar

Good luck :)

Thank you Deb!

I'll give this my best try later on today.

The DVD would only install this if it was connected to something that it liked, and I guess it wanted to get friendly with Garnet VM.

From there, it installed some type of stamp on my memory card where I needed to remove it from my device and place the card into a memory card reader to download the 1.8 gigs of crud onto it.

After that, I had an install file in Garnet that worked without complaint.

So maybe there is some hope on this afterall.

The only thing is that this app is quite expensive, up to $1,500 for a one year subscription, though I get a moderate discount on it.

My worry is that the encoding needs to be hacked if it's not running naturally like intended.

If using this by command line, I can easily make a custom desktop file to achieve such a thing.

Anyway, I'll give it a whirl and see what happens from it.

Many thanks again Deb!

fred123 2010-02-07 00:29

Re: JAVA on the N900 is possible!
 
Stil trying to get java working with microb.

libnpjp2.so is shown as enabled is add-ons plugins

what else would be needed to enable java on a web page

Addison 2010-02-08 06:14

Re: JAVA on the N900 is possible!
 
Hey there Deb.

I've tried to download the java_nokia_n900_maemo5_opera_mini zip file you suggested on my tablet and even my home computer.

All three times the file crapped out at around 12 megs and when trying to open it, there's some kind of a file corruption message.

I'm not sure what is wrong with this or what to do here.

debernardis 2010-02-08 10:27

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by Addison (Post 515491)
Hey there Deb.

I've tried to download the java_nokia_n900_maemo5_opera_mini zip file you suggested on my tablet and even my home computer.

All three times the file crapped out at around 12 megs and when trying to open it, there's some kind of a file corruption message.

I'm not sure what is wrong with this or what to do here.

PM me your email address - I'll send you the zip file, working, from home.

derdas 2010-02-08 21:48

Re: JAVA on the N900 is possible!
 
Try this: http://rapidshare.com/files/34785693...opera_mini.zip
33.849.953 bytes

derdas 2010-02-09 17:33

Re: JAVA on the N900 is possible!
 
Public transport in east Austria has a presumably nice tool to get all their schedules on the mobile. But they do not support N900.
:(

Please - is there anybody who would help me to get the Java version of www.qando.at to run on N900?
Thanks!

fred123 2010-02-09 17:50

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by derdas (Post 518004)
Public transport in east Austria has a presumably nice tool to get all their schedules on the mobile. But they do not support N900.
:(

Please - is there anybody who would help me to get the Java version of www.qando.at to run on N900?
Thanks!

This app will run on microemulator, described above but gives very small display.

qole 2010-02-09 18:34

Re: JAVA on the N900 is possible!
 
Microemulator can be made to have a large display, you have to set it in Options -> Select Device. Change the default to "Resizable Device".

EDIT: I can't get either qando.jar or qandoTouch.jar to open in MicroEmulator. It says "loading" but in the terminal, it gets an error ("java.lang.IllegalArgumentException: Malformed \uxxxx encoding")...

EDIT-EDIT: You can use "qando light" but it really is awful. This is probably what fred123 was talking about. It only uses a tiny corner of the display and no graphics to speak of.


All times are GMT. The time now is 12:14.

vBulletin® Version 3.8.8