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)

ymartin59 2010-11-06 14:55

Re: JAVA on the N900 is possible!
 
At the moment, the answer is no. There is a way but it is not so easy: OpenJDK with MicroEmulator + a skin to ease use, then you have to download and start .jad or .jar files in MicroEmu.
Working, slowly because Java bytecode is interpreted and JVM+MicroEmu requires too much memory.

That is why I'm working on the port of Symbian JRT http://developer.symbian.org/wiki/JRT as a proof of concept. For a real end-user deployment, I guess we will face many licensing and royalties issues...

birefringence 2010-12-05 22:46

Re: JAVA on the N900 is possible!
 
There seems to be a new release Java SE for Embedded 6 Update 21 which doesn't expire (at least there is no mentioning of this).

Tried it out ... works well!

gerdich 2010-12-07 14:31

Re: JAVA on the N900 is possible!
 
Which one do you use:
headless / headful ?

Does it work together with OpenJDK or have I to uninstall it first?

birefringence 2010-12-07 16:54

Re: JAVA on the N900 is possible!
 
I've downloaded the headful version.

Since it's just a tarball which can be unpacked to a directory of your choice, it should be possible to use it without uninstalling OpenJDK first (I didn't test it). Of course, as long as the OpenJDK "java" binary is linked to /usr/bin/java, you will always have to specify the full path to the Sun "java" binary in order to use it.

ymartin59 2010-12-08 20:41

Re: JAVA on the N900 is possible!
 
I have compared MicroEmulator startup with OpenJDK and Oracle JavaSE embedded (armv7, headful) and Oracle JavaSE runs a little faster.
If you want it to be used for MicroEmulator, edit /usr/bin/microemulator script and replace "java" by the full path to the location where you extract Oracle JavaSE embedded.

gerdich 2010-12-18 12:35

Re: JAVA on the N900 is possible!
 
The microemulator 3.0.0 is really nice!!!

It works with google maps full screen!

But there is a little thing:
My keyboard.
The regional settings are not respected.
The up and down buttons don't work, only left and right.

With an external bluetooth keyboard everything works well.

Is there a chance to change that behaviour?

Changegames 2010-12-18 12:39

Re: JAVA on the N900 is possible!
 
i just wanna know if we can run java on n900 is it possible to use skyfire (symbian) that way so we can view any websites including hulu?

lolloo 2011-01-17 12:25

Re: JAVA on the N900 is possible!
 
CONGRATULATION DUDES!

JAVA IS IMPRESSIVE! SO MANY APPS TO TRY NOW!!

nice one dudes!

evan 2011-01-17 12:41

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by gerdich (Post 899346)
The microemulator 3.0.0 is really nice!!!

where is 3.0?
latest in the repos is 2.0.4.62.

Radicalz38 2011-01-17 14:12

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by evan (Post 922254)
where is 3.0?
latest in the repos is 2.0.4.62.

http://snapshot.microemu.org/microem...0-SNAPSHOT.zip

gerdich 2011-01-17 14:21

Re: JAVA on the N900 is possible!
 
And also the keyboard problem is solved!

There is a nice keyboard layout application from qole!

I've only two chose US-layout and all directional buttons work!!

Everything works!

LagunaCid 2011-01-18 05:43

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by gerdich (Post 899346)
The microemulator 3.0.0 is really nice!!!

It works with google maps full screen!

But there is a little thing:
My keyboard.
The regional settings are not respected.
The up and down buttons don't work, only left and right.

With an external bluetooth keyboard everything works well.

Is there a chance to change that behaviour?

I tried GoogleMaps and it froze in the loading screen, which jar did you use, and are you using Oracle's Java or the Open one?

debernardis 2011-01-18 07:12

Re: JAVA on the N900 is possible!
 
Bumping here my post #147:
there's an old edition of the shazam id program which you can find in forums (I can't swear it's legally allright). It's called ylld.jar or yyld.jar (someone's typo).
It works well on my symbian phone and could be an excellent addition to our n900 which hasn't been taken in consideration by the shazam developers.

Well, when I throw it at the latest microemulator (on my ubuntu box), it outputs some errors. I haven't the expertise to debug the thing, but maybe someone here could try and make us happy with a shazam app.

Here's the error log:
Code:

ubuntu@ubuntu:~/Desktop/microemulator-3.0.0-SNAPSHOT$ java -jar microemulator.jar
openJar [file:///home/ubuntu/Desktop/microemulator-3.0.0-SNAPSHOT/yyld.jar]
          org.microemu.app.Common.loadJar(Common.java:559)
openJar [file:///home/ubuntu/Desktop/microemulator-3.0.0-SNAPSHOT/yyld.jar]
          org.microemu.app.Common.loadJar(Common.java:559)
error Message: Error starting MIDlet: Unable to create MIDlet, org.microemu.app.classloader.MIDletClassLoader$LoadClassByParentException: javax.microedition.media.PlayerListener java.lang.NoClassDefFoundError: javax/microedition/media/PlayerListener
          org.microemu.app.Common.loadMidlet(Common.java:425)
java.lang.NoClassDefFoundError: javax/microedition/media/PlayerListener
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:480)
        at org.microemu.app.classloader.MIDletClassLoader.findClass(MIDletClassLoader.java:430)
        at org.microemu.app.classloader.MIDletClassLoader.loadClass(MIDletClassLoader.java:201)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
        at motorola.motoid.MotoID.<init>(Unknown Source)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at java.lang.Class.newInstance0(Class.java:372)
        at java.lang.Class.newInstance(Class.java:325)
        at org.microemu.app.Common.loadMidlet(Common.java:418)
        at org.microemu.app.Common.initMIDlet(Common.java:1051)
        at org.microemu.app.launcher.Launcher.commandAction(Launcher.java:121)
        at javax.microedition.lcdui.Display$DisplayAccessor$1.run(Display.java:209)
        at org.microemu.device.ui.EventDispatcher$RunnableEvent.run(EventDispatcher.java:246)
        at org.microemu.device.ui.EventDispatcher.post(EventDispatcher.java:164)
        at org.microemu.device.ui.EventDispatcher.run(EventDispatcher.java:99)
        at java.lang.Thread.run(Thread.java:636)
Caused by: org.microemu.app.classloader.MIDletClassLoader$LoadClassByParentException: javax.microedition.media.PlayerListener
        at org.microemu.app.classloader.MIDletClassLoader.findClass(MIDletClassLoader.java:342)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at org.microemu.app.classloader.MIDletClassLoader.loadClass(MIDletClassLoader.java:213)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
        ... 21 more


barteo 2011-01-18 07:20

Re: JAVA on the N900 is possible!
 
You should modify the command line a bit:
java -cp microemulator.jar:lib/microemu-jsr-135.jar org.microemu.app.Main

gerdich 2011-01-18 11:00

Re: JAVA on the N900 is possible!
 
@LagunaCid

I took:
- Java from the Sun (Oracle) Website (headful)
- Microemulator from the website (3.0.x.x)
- Layout applet from qole
- gmaps-232-m2_ts_L1.jar from this thread

On satellite view I can even see my house.
On some spots there is streetview.

(In fact: My standard Java installation is openJDK. But I've installed Sun Java only for the Microemulator. I've modified the startup file of microemulator to use the binaries of SUN. I gave the full path of the binaries of SUN.)

lq_sunshine 2011-01-18 19:23

Re: JAVA on the N900 is possible!
 
i have one question

i have installed the Frostwire p2p client. http://talk.maemo.org/showthread.php...233#post923233
and wrote a shell script:

Code:

cd  /home/user/MyDocs/frostwire-4.21.2.noarch/
 java -jar FrostWire.jar

it works from terminal,but now i want a desktop shortcut and made a .desktop file to execute the script.
However i get a internel error.

When i delete the line with
Code:

cd  /home/user/MyDocs/frostwire-4.21.2.noarch/
the jar file starts and displays an error because it cant find the needed files.

anybode can help?

[DarkGUNMAN] 2011-01-18 19:49

Re: JAVA on the N900 is possible!
 
Code:

java -jar /home/user/MyDocs/frostwire-4.21.2.noarch/FrostWire.jar

Turkishflavor 2011-01-18 19:59

Re: JAVA on the N900 is possible!
 
http://img5.imagebanana.com/img/37fg...0109191920.png

http://img5.imagebanana.com/img/u4ag...0108163809.png

http://img5.imagebanana.com/img/et3y...0109194544.png

gionni88 2011-01-18 21:52

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by lq_sunshine (Post 923237)
anybode can help?

This is my frostwire.sh
Code:

#!/bin/sh
cd  /opt/frostwire-4.21.2.noarch/
java -jar FrostWire.jar

and frostwire.desktop
Code:

[Desktop Entry]
Type=Application
Name=FrostWire
Exec=/opt/frostwire-4.21.2.noarch/frostwire.sh
Icon=frostwire


lq_sunshine 2011-01-18 21:56

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by [DarkGUNMAN] (Post 923255)
Code:

java -jar /home/user/MyDocs/frostwire-4.21.2.noarch/FrostWire.jar

Hi,

i tryed this and the problem is, that the program doesnt find the nessesary files in the program folder

lq_sunshine 2011-01-18 21:57

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by gionni88 (Post 923357)
This is my frostwire.sh
Code:

#!/bin/sh
cd  /opt/frostwire-4.21.2.noarch/
java -jar FrostWire.jar

and frostwire.desktop
Code:

[Desktop Entry]
Type=Application
Name=FrostWire
Exec=/opt/frostwire-4.21.2.noarch/frostwire.sh
Icon=frostwire


thank you so much. ihis helped me but i hat do add th sh command:
Code:

Exec=sh /opt/frostwire-4.21.2.noarch/frostwire.sh

impeham 2011-01-24 08:31

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by gerdich (Post 922929)
@LagunaCid

I took:
- Java from the Sun (Oracle) Website (headful)
- Microemulator from the website (3.0.x.x)
- Layout applet from qole
- gmaps-232-m2_ts_L1.jar from this thread

On satellite view I can even see my house.
On some spots there is streetview.

(In fact: My standard Java installation is openJDK. But I've installed Sun Java only for the Microemulator. I've modified the startup file of microemulator to use the binaries of SUN. I gave the full path of the binaries of SUN.)

Can you please explain how did you use this version 3? it only contains jars - how did u install this to n900?
which java version did you install from oracle? can you post alink?

Thanks

gerdich 2011-01-24 22:04

Re: JAVA on the N900 is possible!
 
I did it a long time ago, difficult to remember.
I think it is this link:
http://www.oracle.com/technetwork/ja...ads/index.html
Take EABI armv7 linux headful (Would be nice if anybody could confirm)



For the start of microemulator.jar you can look in /usr/bin/microemulator

Its a script that starts microemulator.
I did a forbidden thing and edited the main command to:
/home/user/microemu-maemo/ejre1.6.0_21/bin/java -jar /home/user/microemu-maemo/microemulator-3.0.0-SNAPSHOT/microemulator.jar

Now my microemulator icon starts the new microemulator with sun java, although my standard java installation is openJDK.

You have to take the fullpath of YOUR installation.

ivgalvez 2011-02-08 16:37

Re: JAVA on the N900 is possible!
 
Hi guys, do you know any Java applications that worth the time apart from jDownloader?

I've been searching and it seems that Freecol and Runescape run too slow. And most of .jar out there are J2ME applications.

beach king 2011-03-01 17:44

Re: JAVA on the N900 is possible!
 
hi guys

I want to execute a jar application without using MicroEmulator ???
i tried to execute this line
Quote:

java -jar shMassanger.jar
but the output was
Quote:

failed to load Main-Class manifest attribute from sh.....jar
I did this with and without root ...
so any help
I have icedtea6_1.8-5

654321 2011-03-02 20:00

Re: JAVA on the N900 is possible!
 
I enabled java in browsers but when I want to check java version here in microb is not working.
http://i52.tinypic.com/33yhqup.png
Another site like http://www.pingtest.net is working. Is a timeout for running scripts that I can alter to allow longer execution time in microb?


In Firefox and Chromium is working fine.
http://i52.tinypic.com/2e6bj4n.png
http://i55.tinypic.com/25yzsjm.png

ymartin59 2011-03-02 20:35

Re: JAVA on the N900 is possible!
 
May you please detail how you have enabled Java in Firefox and Chromium ?
Which Java version have you used ?

654321 2011-03-02 21:28

Re: JAVA on the N900 is possible!
 
Download java (Java SE for Embedded 6 Update 21 (Build 9) ARMv7 Linux - Headful, EABI, Hard Float (VFP), Little-Endian) from here: https://cds.sun.com/is-bin/INTERSHOP...-CDS_Developer

Extract ejre1.6.0_21 from the archive to MyDocs in N900
Move ejre1.6.0_21 to /opt (I was using MC)
Run in terminal as root:
ln -s /opt/ejre1.6.0_21/bin/* /usr/bin/
chmod 777 /usr/bin/java
ln –s /opt/ejre1.6.0_21/lib/arm/libnpjp2.so /usr/lib/browser/plugins/libnpjp2.so
ln –s /opt/ejre1.6.0_21/lib/arm/libnpjp2.so /home/user/.mozilla/plugins/libnpjp2.so
Then in microB and Firefox type about:config in address
Search for java
Change java.java_plugin_library_name to libnpjp2.so
I don’t know if changing in about:config is needed because I did this at the beginning.
After that chromium was running java without any changes.

ymartin59 2011-03-02 22:02

Re: JAVA on the N900 is possible!
 
shMessenger seems to be a JavaME application and it probably cannot run without Microemulator. But you can pass the jar file name as argument to the micro-emulator startup script to start the application directly.
Look for MicroEmulator skins to ease use on N900.

geojoking 2011-03-26 16:57

Re: JAVA on the N900 is possible!
 
I've seen Nokia has developed some Nokia S40 FourSquare applications and I wanted to try them on the N900 with the MicroEmulator but it doesn't seem to work.

Can anyone else try and tell me their feedback.
http://betalabs.nokia.com/apps/fours...d_installation

Thanks,

bblue 2011-03-26 20:24

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by 654321 (Post 959215)
Download java (Java SE for Embedded 6 Update 21 (Build 9) ARMv7 Linux - Headful, EABI, Hard Float (VFP), Little-Endian) from here: https://cds.sun.com/is-bin/INTERSHOP...-CDS_Developer

Extract ejre1.6.0_21 from the archive to MyDocs in N900
Move ejre1.6.0_21 to /opt (I was using MC)
Run in terminal as root:
ln -s /opt/ejre1.6.0_21/bin/* /usr/bin/
chmod 777 /usr/bin/java
ln –s /opt/ejre1.6.0_21/lib/arm/libnpjp2.so /usr/lib/browser/plugins/libnpjp2.so
ln –s /opt/ejre1.6.0_21/lib/arm/libnpjp2.so /home/user/.mozilla/plugins/libnpjp2.so
Then in microB and Firefox type about:config in address
Search for java
Change java.java_plugin_library_name to libnpjp2.so
I don’t know if changing in about:config is needed because I did this at the beginning.
After that chromium was running java without any changes.

sorry, when i try to execute this commands:
ln –s /opt/ejre1.6.0_21/lib/arm/libnpjp2.so /usr/lib/browser/plugins/libnpjp2.so
ln –s /opt/ejre1.6.0_21/lib/arm/libnpjp2.so /home/user/.mozilla/plugins/libnpjp2.so
I get:
ln: -s: No such file or directory
ln: /usr/lib/browser/plugins/libnpjp2.so: Invalid cross-device link
and
ln: -s: No such file or directory
ln: /home/user/.mozilla/plugins/libnpjp2.so: Invalid cross-device link

what's wrong?

Many thanks.

gionni88 2011-03-26 20:34

Re: JAVA on the N900 is possible!
 
@BBlue: The "–" you're typing is not the right one ("-"), in my opinion. So it doesn't recognize it as an option but as a path, and the ln command fails since it's not possible to make an hardlink between different partitions. Check better that character.

casketizer 2011-03-26 20:57

Re: JAVA on the N900 is possible!
 
@geojoking
Not working. Most likely uses S40 specific api(s). I only tried the one version that had a direct link to the .jar.

bblue 2011-03-26 23:33

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by gionni88 (Post 976213)
@BBlue: The "–" you're typing is not the right one ("-"), in my opinion. So it doesn't recognize it as an option but as a path, and the ln command fails since it's not possible to make an hardlink between different partitions. Check better that character.

Thanks, yes the character was wrong, but now, in firefox, when I try the test page, it displays me: Something is wrong. Java is not working.

geojoking 2011-03-27 00:12

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by casketizer (Post 976221)
@geojoking
Not working. Most likely uses S40 specific api(s). I only tried the one version that had a direct link to the .jar.

Yes, that's the version I also tried. Oh well, I thought I'd give it a try, the app seems a lot better that BarrioSquare, it has more features.

Temporal 2011-03-27 17:44

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by 654321 (Post 959215)
Download java (Java SE for Embedded 6 Update 21 (Build 9) ARMv7 Linux - Headful, EABI, Hard Float (VFP), Little-Endian) from here: https://cds.sun.com/is-bin/INTERSHOP...-CDS_Developer

Extract ejre1.6.0_21 from the archive to MyDocs in N900
Move ejre1.6.0_21 to /opt (I was using MC)
Run in terminal as root:
ln -s /opt/ejre1.6.0_21/bin/* /usr/bin/
chmod 777 /usr/bin/java
ln –s /opt/ejre1.6.0_21/lib/arm/libnpjp2.so /usr/lib/browser/plugins/libnpjp2.so
ln –s /opt/ejre1.6.0_21/lib/arm/libnpjp2.so /home/user/.mozilla/plugins/libnpjp2.so
Then in microB and Firefox type about:config in address
Search for java
Change java.java_plugin_library_name to libnpjp2.so
I don’t know if changing in about:config is needed because I did this at the beginning.
After that chromium was running java without any changes.

Here the instructions kinda worked when:
1)Removed Microemulator and icedtea;
2)I typed ln -s and then copied the rest. Looks like there's some kind of weird character that messes things in here...
3)Put the -f after ln -s to FORCE the thing to make the link.

But even after, the thing just kinda worked. Firefox tries to load but crashes more often then not while trying to load applets, AND Microb shows a black screen in the place of the applet. SOMETIMES if I zoom the applet, it appears, but then it goes black the time I move the window.

I'm yet to try on chromium...

epitaph 2011-03-27 18:07

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by Temporal (Post 976712)
Here the instructions kinda worked when:
1)Removed Microemulator and icedtea;
2)I typed ln -s and then copied the rest. Looks like there's some kind of weird character that messes things in here...
3)Put the -f after ln -s to FORCE the thing to make the link.

But even after, the thing just kinda worked. Firefox tries to load but crashes more often then not while trying to load applets, AND Microb shows a black screen in the place of the applet. SOMETIMES if I zoom the applet, it appears, but then it goes black the time I move the window.

I'm yet to try on chromium...

I get the same result from following this how-to, java-plugin in microb didn't work. I don't have chromium. But 3) didn't worked for me I had to copy the file to the plugins folder.

654321 2011-03-27 18:51

Re: JAVA on the N900 is possible!
 
Well… The steps are copied here from different sources but I never paste it in N900. I start typing on N900 keyboard and use TAB for autocomplete.
Some applets do not work in microB but work in Firefox or Chromium and Firefox or Chromium never crashed on my device (when I was playing with java) and I didn’t have any problems with symlinks.

epitaph 2011-03-27 19:11

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by 654321 (Post 976746)
Well… The steps are copied here from different sources but I never paste it in N900. I start typing on N900 keyboard and use TAB for autocomplete.
Some applets do not work in microB but work in Firefox or Chromium and Firefox or Chromium never crashed on my device (when I was playing with java) and I didn’t have any problems with symlinks.

I use TAB too it didn't work but copy worked so I try to avoid a headache. Too bad my applet didn't work in microb. Do know you if it is possible to run a java applet from cli?

Temporal 2011-03-28 02:50

Re: JAVA on the N900 is possible!
 
update - installed chromium and worked. Now I have the possibility to show java applets in a browser if needed.

My fennec 1.1 just show a black thing and Microb sometimes show something and sometimes not, but I cannot interact with the thing.

Here is the site I'm using: http://www.schubart.net/rc/


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

vBulletin® Version 3.8.8