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)

SubCore 2009-12-17 21:33

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by qole (Post 432417)
Is there a specific reason why you choose /usr/local/bin for your symlink, instead of /usr/bin? Wouldn't it be easier to just add it to /usr/bin?

makes it easier to backup & restore changes after a firmware upgrade or similar. you just have to remember /usr/local instead of every single one :)

qole 2009-12-17 22:23

Re: JAVA on the N900 is possible!
 
Update: Yes, Opera Mini runs fast enough, but it seems to have some interaction bugs under this system... Can't seem to enter text into a text field properly. The OK button doesn't do anything...

patstew 2009-12-17 22:43

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by qole (Post 432596)
Update: Yes, Opera Mini runs fast enough, but it seems to have some interaction bugs under this system... Can't seem to enter text into a text field properly. The OK button doesn't do anything...

Have you tried any J2ME games with MicroEmulator?

qole 2009-12-17 22:50

Re: JAVA on the N900 is possible!
 
Nope. Not going to either ;)
I played OpenArena on my N900 on the bus last night. Mobile phone games just don't do it for me.

j.s 2009-12-18 00:43

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by qole (Post 432605)
I'm sorry, but you're just wrong. The N900 busybox tar very definitely does support gzip compression. It doesn't support bzip2 compression, however.

Type tar at the command line; it lists [czxtv0] as the valid options.

OK. My mistake.
I had typed:
Code:

tar cvfz filename.tar.gz filename.ext
It complained of no file filename.tar.gz and created a tar file named z. It looks like f must be the last option. Every tar with gzip support that I have used before was fine with z being the last option whether creating, listing, or extracting from gzipped tar files.

I will delete my post.

Xizor 2009-12-18 12:47

Re: JAVA on the N900 is possible!
 
This is indeed great stuff...made a quick Swing app that fetches some train timetables from a certain WWW-page. Works like a charm! :)

Dak, have you had any luck registering the jar files so that one could start a Java app more easily?

Xizor 2009-12-18 17:14

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by Dak (Post 433577)
@Xizor - I'm still tinkering with that 'auto run' mechanism.

...

PS. Did you originally download the wrong JRE? Is that why you got the "Headless" exception?

Yeah, I had the wrong JRE...I was sure I downloaded the right one, but maybe it's time to start thinking about them glasses. :D

One thing I noticed is that the java application (using Swing) takes a really long time to start (almost 10 seconds). There probably is nothing that can be done to speed this up....

Xizor 2009-12-18 18:15

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by Dak (Post 433662)
Yep...that's part of the overhead involved in setting up the JVM, loading all the bytecode, initializing it and then letting it run. I guess it's up to Sun to optimize this process, but I wouldn't expect significant improvement unless they can implement some safe 'lazy optimization' for startup.

But it's a 600MHz ARM chip....whaddayagonnado? Imagine how treacly that same code would run on a 600Mhz pentium ;)

The important thing is that it runs respectably well once it is loaded. I'm pleased with it.

I think this leads to the inevitable conclusion that Java on the N900 should be used sparingly and with due consideration to the bandwidth limits we face.

My strategy, if I use it at all, will be to prefer crafting very thin, lightweight clients that provide a visual surface for a native core...accessed via JNI/sockets.

You are absolutely right...you can't do wonders with the given hardware and once the app is running the performance seems to be quite good.

It would be really interesting to see a java application using the phones native API's via JNI. :)

hypnotik 2009-12-18 18:33

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by qole (Post 432635)
Nope. Not going to either ;)
I played OpenArena on my N900 on the bus last night. Mobile phone games just don't do it for me.

How is the game play without a mouse? I could never play quake without mouseview. ..

Aranel 2009-12-19 23:05

Re: JAVA on the N900 is possible!
 
with auto-aim ofc =)

rlinfati 2009-12-20 00:04

Re: JAVA on the N900 is possible!
 
http://farm3.static.flickr.com/2641/...cb595128_o.png

yataaaaaaaaaaa

wire-less 2009-12-20 13:43

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)

Tried it today. Works like a charm. I sent an email-feedback to sun. Hope they release this for Maemo someday.
Any Idea how to give the full screen to the java app? Needs some communication with the window-manager?

rlinfati 2009-12-20 15:31

Re: JAVA on the N900 is possible!
 
http://rapidshare.com/files/32352022...armel.deb.html

MD5: CF9852C9725FAEAD3035E4F13AFA0380

Java se for armv6 + microemulator + icon ( .desktop file )

only need a .jar/.jad.... and go!

g0dzilla 2009-12-20 17:27

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by rlinfati (Post 435335)

please add mirror

CrckMc 2009-12-20 17:46

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by g0dzilla (Post 435462)
please add mirror

hope it helps
http://netload.in/dateilZgA2SUinb/ja..._armel.deb.htm

this is the same as above

g0dzilla 2009-12-20 17:47

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by CrckMc (Post 435479)
hope it helps

Big Tnx!!!

rlinfati 2009-12-20 17:51

Re: JAVA on the N900 is possible!
 
ahhh...
the java is a trial of 90 days... but, you can reset... uninstalling, and installing again :)

( at the first run of java, it change a file... )

g0dzilla 2009-12-20 18:01

Re: JAVA on the N900 is possible!
 
I rebooted during the installation ((

beli 2009-12-21 20:41

Re: JAVA on the N900 is possible!
 
I folowed the instructions of Dak but when I try to run a jar i get:

An unexpected error has been detected by Java Runtime Environment:
SIGBUS (0x7) at pc=0x4007ae44, pid=2016, tid=1088148624
Java VM: Java Hotspot(TM) Client VM (11.0-b15 mixed mode linux-arm)
Problematic frame:
V [libjvm.so+0x5ee44]

the .tar I installed is : ejre-1_6_0_10-ea-b39-linux-armv6-vfp-eabi-min-eval-30_jul_2009.tar.gz (from Dak's link)

Anyone had the same error or has any clue of the cause?

Tnx

Dak 2009-12-21 20:51

Re: JAVA on the N900 is possible!
 
That seems like a problem with the jar, not the JVM....

Do you have a simple java app jarfile to run to test the JVM? REALLY simple....like just creating an application window.

Bratag 2009-12-21 21:27

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by rlinfati (Post 435488)
ahhh...
the java is a trial of 90 days... but, you can reset... uninstalling, and installing again :)

( at the first run of java, it change a file... )

Couldnt you just keep a copy of the file with the old date and copy that back in place when the timer runs out?

aspidites 2009-12-22 01:41

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by Dak (Post 432083)
You'll need your N900s IP address - there's a very handy little widget for that (thanks to whoever made it!)

example:

scp -r ejre1.6.0_10 root@my.n900.ip.addr:/home/opt/java

Half true. You can, instead of an IP address, use your N900's host name. From xterm on your N900:
Code:

hostname
By default, this returns "Nokia-N900-42-11"

Your scp command on your host computer then becomes:
Code:

scp -r ejre1.6.0_10 root@Nokia-N900-42-11/home/opt/java
If you are like me, names are easier to memorize than numbers (assuming you aren't being lazy and using the history, lol)

At any rate, pretty interesting that you got the jre running.

Dak 2009-12-22 01:46

Re: JAVA on the N900 is possible!
 
Quote:

Half true. You can, instead of an IP address, use your N900's host name.
Half true. You will need to enter your N900 hostname into your "/etc/hosts" file for your method to work.

Your PC will not know WTF "Nokia-N900-42-11" means, otherwise.

Please don't post misleading information. Think it through and double-check your work. There are many new linux enthusiasts here that could be unnecessarily confused by such things.

aspidites 2009-12-22 02:29

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by Dak (Post 437000)
Half true. You will need to enter your N900 hostname into your "/etc/hosts" file for your method to work.

Your PC will not know WTF "Nokia-N900-42-11" means, otherwise.

Please don't post misleading information. Think it through and double-check your work. There are many new linux enthusiasts here that could be unnecessarily confused by such things.

I didn't make any modifications to my /etc/hosts file and my computer instantly recognized "Nokia-N900-42-11. In fact, the only thing in my /etc/hosts file is this:
Code:

127.0.0.1              localhost.localdomain  localhost my_host_name
While I appreciate your enthusiasm for wanting to help people, I would appreciate it if you didn't ASSUME that I a) didn't check my work and b) I am unconcerned about how my posts will affect other readers.

Dak 2009-12-22 03:12

Re: JAVA on the N900 is possible!
 
I knew your method wouldn't work, but I tested it anyway (Fedora12 box)....and sure enough, it didn't work.

It is clear that you didn't check your work because you don't understand WHY it worked for you. If youi're going to suggest things like this, you should explain them fully.

How is the name ""Nokia-N900-42-11" being correctly resolved to an IP address on your machine/network?

aspidites 2009-12-22 04:50

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by Dak (Post 437065)
I knew your method wouldn't work, but I tested it anyway (Fedora12 box)....and sure enough, it didn't work.

Works for me:
http://www.screencast-o-matic.com/watch/cQl3f6hus

Quote:

Originally Posted by Dak (Post 437065)
It is clear that you didn't check your work because you don't understand WHY it worked for you.

I do know why it works. That it fails to work on your machine is no indication of my (in)ability to check my work.

Quote:

Originally Posted by Dak (Post 437065)
If youi're going to suggest things like this, you should explain them fully.

How is the name ""Nokia-N900-42-11" being correctly resolved to an IP address on your machine/network?

Much like you explained how "scp" magically worked on your N900? Much like you explained how to use the alternative archiving program that you pointed to?

I tend not to explain things that aren't going to damage a person's computer. And don't mind answering questions that arise because of some element that I introduced into a conversation.

At any rate, for the sake of not confusing things further and attempting to make this thread at least some-what OP related, two things that I believe make it work on my box and not yours are:
1) I have DHCP enabled
2) both my laptop and N900 are connected on the same wifi network.

That being said for the sake of clarity, my original post should have been something like this:

"If both your N900 is connected to your home wifi connection, you should be able to replace the IP address with the host name without modifying any files on your system."

Texrat 2009-12-22 04:59

Re: JAVA on the N900 is possible!
 
Ok, guys, you're BOTH doing good work here. ;)

Dak 2009-12-22 05:23

Re: JAVA on the N900 is possible!
 
I too have DHCP and wifi....yet it doesn't work. I understand why it doesn't work and don't expect it to work. This is why I raised the warning flag about your suggestion - on most stock systems it likely won't work either.

There is more to your config....you really should explain what. DNS server? NIS? Funky WINS router etc?

qole 2009-12-22 05:45

Re: JAVA on the N900 is possible!
 
Dak, aspidites, seriously. Break it up.

This is way off topic anyway, since using scp to transfer the files from a desktop is not the best way to do this. Go to the Embedded Java web page with your N900's browser and download the file directly to your N900, then follow Rob1n's instructions for extracting the files to your /opt directory.

But if you really insist on using scp, try to ping your N900's host name. If that doesn't work, use the IP address (as shown by a couple of widgets you can get for your n900's desktop). It just isn't a big deal.

Dak 2009-12-22 06:09

Re: JAVA on the N900 is possible!
 
I tend to download everything to my repository server - huge storage - hence my initial use of scp.

But you're right....downloading directly to the N900 and using "tar -xzvf" is far more direct.

Anyway, I'm still fubar with the jarfile mime registration....and I'm working on some crude java benchmarking app to see how hard we can push this baby.

Still no word from Sun regarding licene/royalties.

beli 2009-12-22 09:14

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by Dak (Post 436767)
That seems like a problem with the jar, not the JVM....

Do you have a simple java app jarfile to run to test the JVM? REALLY simple....like just creating an application window.

The jar I tested with was a simple Hello World program ... it works on my laptop ...

*edit*
I also tested it with the Java2Ddemo from the sun site ... same error.

Detailed output:
#
# An unexpected error has been detected by Java Runtime Environment:
#
# SIGBUS (0x7) at pc=0x4007ae44, pid=1784, tid=1088148624
#
# Java VM: Java HotSpot(TM) Client VM (11.0-b15 mixed mode linux-arm)
# Problematic frame:
# V [libjvm.so+0x5ee44]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

*edit*

Dak 2009-12-22 21:39

Re: JAVA on the N900 is possible!
 
Sorry beli, I cannot debug your java app via this forum. All I can tell you is that I have never seen such an error....yet.

Can you make the jarfile & source available for download in a zipfile or something? I'll happily test it on my N900 for you.

qole 2009-12-22 21:41

Re: JAVA on the N900 is possible!
 
I can say that the Java 2D demo works fine on my N900. In fact it works surprisingly well!

beli 2009-12-23 10:14

Re: JAVA on the N900 is possible!
 
Ok, I reflashed my OS and now Java2D demo works as well. Guess something was wrong with my system ...

pinguino89 2010-01-04 18:21

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by rlinfati (Post 435335)
http://rapidshare.com/files/32352022...armel.deb.html

MD5: CF9852C9725FAEAD3035E4F13AFA0380

Java se for armv6 + microemulator + icon ( .desktop file )

only need a .jar/.jad.... and go!

Hi!!! I have an n800, downloaded the deb and installed flawlssy (I know it's meant for the n900...)

but no jad files work!! It gives me a lot of errors...

why?

rlinfati 2010-01-05 07:43

Re: JAVA on the N900 is possible!
 
http://www.ubuntu-pics.de/bild/36637...800_4Zx0xT.png

http://www.ubuntu-pics.de/bild/36638...900_pBga6T.png

qole 2010-01-05 07:47

Re: JAVA on the N900 is possible!
 
rlinfati: can you enter text into a text field on a web page with Opera Mini? The "OK" button just doesn't work for me...

tousisd 2010-01-05 07:56

Re: JAVA on the N900 is possible!
 
will it be in a repo?

myk 2010-01-05 16:41

Re: JAVA on the N900 is possible!
 
I just installed this from the .deb file, and tried to run google maps from a JAD file. It is running in a tiny area (144wide?) and I can't click the 'accept' button, but it runs.

Any chance of it really working? Can ME access the GPS?
It would be nice to have, even without touchscreen. Anything is better than Ovi Maps.

rlinfati 2010-01-05 18:37

Re: JAVA on the N900 is possible!
 
@qole: on n900 yes, on n800... untested..

@tousisd no, sorry

@myk no gps


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

vBulletin® Version 3.8.8