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!


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

vBulletin® Version 3.8.8