![]() |
JAVA on the N900 is possible!
It worked fine for me to install java (through apt-get netbeans from debian/lenny) after repartitioning the N900. I'm able to compile and run (javac/java) JAVA- (.class-)files now on my device.
|
Re: JAVA on the N900 is possible!
Do that mean i can maybe someday play Java based games with N900?
|
Re: JAVA on the N900 is possible!
Isn it just possible to install only JDK without netbeans using atp-get?
|
Re: JAVA on the N900 is possible!
What is the performance like? The N800 would run Java apps, too... but they were really, really slow (unless in easy-debian, for example).
|
Re: JAVA on the N900 is possible!
Quote:
|
Re: JAVA on the N900 is possible!
@steady
you probably need Java ME for the kind of games you mean - MIDlets for other mobile devices use this. what mankir installed was a Java SE environment, which is intended for desktop applications. though there are a few webgames out there which need java SE, so it depends on what kind of games you're talking about. could a moderator please merge this into the main java thread? TIA |
Re: JAVA on the N900 is possible!
Applets is the only thing I would need Java for (some sites use this for authentication). So I guess that means SE is for me then and ME is out.
|
Re: JAVA on the N900 is possible!
I wouldn't hold my breath waiting for browsers to support Java.
|
Re: JAVA on the N900 is possible!
Quote:
|
Re: JAVA on the N900 is possible!
@mankir, how to do this ? step by step ? please...
|
Re: JAVA on the N900 is possible!
I followed the steps on page 6 in: Repartition the internal drive, but without the /opt partition. then selected ftp.debian.org/debian lenny as apt-source with: main non-free contrib and there you go...
|
Re: JAVA on the N900 is possible!
i am seriously thinking about repartitioning. Was waiting to see when Nokia will release firmware...
|
Re: JAVA on the N900 is possible!
Confirmed.
I downloaded the Sun Java SE for Embedded (ARMv6 jre 1.6_10 Headful) Download it here Just inflate the tar.gz on your PC and use "scp -r" to copy it to your N900. Stick a "ln -s" symlink in your /usr/local/bin (may need to edit your path in /etc/profile) Used Netbeans to build a little swing gui test application. Copied the jarfile across, runs just fine. It's only a 90-day evaluation jre, sadly... |
Re: JAVA on the N900 is possible!
I see that Sun requires royalties for embedded jre deployment on anything other than "general purpose" devices. The N900 is most certainly a general purpose computer, just like my linux PC, which we do not pay royalties for.
I have put this question to Sun. Will report back. |
Re: JAVA on the N900 is possible!
Here I am, using a simple java app to browse my N900 filesystem - this is my jre folder in /home/opt/java/jre
http://i50.tinypic.com/33wpp8w.png |
Re: JAVA on the N900 is possible!
will anyone of you be willing to see if this java app for HTPC will work with that your java. It is called PlaceShifter by sagetv.
|
Re: JAVA on the N900 is possible!
WOW, Ok guys please please will this work on playing Ninja Video? Streaming? Please someone find this out. It would be much appreciated thanks!
|
Re: JAVA on the N900 is possible!
@cenwesi - I got your PlaceShifter app running. Don't get too excited yet...it seems to use a bunch of native x86 shared libs, so there will probably be a loud bang when JNI tries to load them.
To test it, I need an example server to connect to....can you point me at one? http://i48.tinypic.com/2cnutqg.png |
Re: JAVA on the N900 is possible!
omg...no way. It looks like it will work. once i get home i will create an account for you and give u access to see if u can pull up my recordings and movies :)
|
Re: JAVA on the N900 is possible!
Quote:
Could you clarify this a bit....I'm a total n00b when it comes to Linux. :o |
Re: JAVA on the N900 is possible!
Quote:
|
Re: JAVA on the N900 is possible!
Quote:
|
Re: JAVA on the N900 is possible!
Quote:
Quote:
|
Re: JAVA on the N900 is possible!
OK n00bz...listen up ;)
The downloaded file is a gzipped tar (.tar.gz) archive. It's just a different kinda zipfile...it uses a different process for storing and compressing data, but conceptually they're similar. I don't have a utility on my N900 to open these yet, so I downloaded it onto my PC. I run Fedora linux, which automatically fires up an archive manager when I dbl-click the file. There are free Windows utilities to handle these files too (try tucows.com). When you expand (extract, inflate...whatever) this file, it will create a folder called "ejre1.6.0_10" and neatly store all the java software within. All you need to do is use the "scp" command (Secure CoPy via SSH) with the "-r" option to recursively copy the folder and all its contents to your N900. 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 (you'll need to create that java folder on your N900 first - go to xterm, use "sudo gainroot" and then type "mkdir /home/opt/java") Once you get this far, we'll continue the lesson :) |
Re: JAVA on the N900 is possible!
I'm not sure you're helping there - most n00bz won't have ssh server installed & configured on their N900!
You'd be better copying the archive straight onto the N900 (connect via USB and choose mass storage mode, copy the file over, then disconnect). Open up an X Terminal, then do: Code:
sudo gainroot |
Re: JAVA on the N900 is possible!
Quote:
the command(s) would look like this: Code:
sudo gainroot i'm sorry i forgot that mydocs is of course a vfat and will loose needed executable flags. the above is wrong, do this instead: copy the .tar.gz (or .tgz, haven't d/l it yet) on the n900, then Code:
sudo gainroot |
Re: JAVA on the N900 is possible!
thanks... will forward this to the SageTV company...hopefully they can do this for me and others :)
|
Re: JAVA on the N900 is possible!
Quote:
|
Re: JAVA on the N900 is possible!
Next, you'll need to install a link to the main java program, so that when you open an xterm and type "java" it knows what you're talking about.
If you've followed my choice of folder location, the java program is located in /home/opt/java/ejre1.6.0_10/bin/java Open an xterm and use "sudo gainroot" again. Then type "ln -s /home/opt/java/ejre1.6.0_10/bin/java /usr/local/bin/java" This will create a "symlink" (a Symbolic Link....basically a pointer to a file or folder) in /usr/local/bin. You could create it in /usr/bin, but I prefer to keep things separate. You will also need to alter your /etc/profile file slightly. Open it up (with vi) vi /etc/profile ...and look at the line beginning with "export PATH=" You need to add ":/usr/local/bin" to the end of the path (inside the quotes). Now you will be able to download Java SE jarfiles and run them by typing "java -jar somejarfile.jar" I'm working on registering the ".jar" extension so that you can just dbl-click them to run them....I thought I had it figured out, but it's not working yet. |
Re: JAVA on the N900 is possible!
Quote:
/bin/sh: java: not found or did I mess something up. :o (when I try "java" without "sudo gainroot" I get "permission denied" but that is to be expected?) Even if I go directly to /home/opt/java/ejre1.6.0_10/bin and type "java" I get "/bin.sh: java: not found" |
Re: JAVA on the N900 is possible!
Quote:
unlike windows, linux shells usually don't have the current path in the PATH variable. |
Re: JAVA on the N900 is possible!
Quote:
Quote:
There's got to be some silly mistake I've made, but I just can't seem to figure it out... :( |
Re: JAVA on the N900 is possible!
can someone try nav4all? this might enable turn-by-turn navigation on the n900
|
Re: JAVA on the N900 is possible!
Sorry I thought NinjaVideo.net had a java applet that you need to launch first in order to watch the streaming content on there????
|
Re: JAVA on the N900 is possible!
@Xizor - Did you download the archive onto a Windows PC, expand it, then copy it across? If so, you may have lost permissions...
Type "ls -al /home/opt/java/ejre1.6.0_10/bin" into an xterm On the left-hand side, you should see a column of permission data ("r", "w", "d" etc) ... the files should all have "-rwxr-xr-x" for their permissions. |
Re: JAVA on the N900 is possible!
Quote:
because you extracted it under windows and copied it to MyDocs first, the executable flags were lost. MyDocs is a vfat partition and doesn't support executable flags. my suggestion to just copy the extracted content over wasn't so good after all. you better delete the folder ejre1.6.0_10 (run "rm -rf ejre1.6.0_10" as root when in the directory /home/opt/java) and do this instead: copy the .tar.gz (or .tgz, haven't d/l it yet) on the n900, then Code:
sudo gainroot the changes in /etc/profile and the symlink won't be affected if you just delete the folder btw, so you don't have to do that again :) |
Re: JAVA on the N900 is possible!
Thank you both SubCore and Dak for the help! Now it's working. :)
Although I don't seem to be able to run even the simplest Swing- app => The ever annoying HeadlessException appears. :( Dak, could you post the sample Java code for the Java Swing app you used for testing this rte? |
Re: JAVA on the N900 is possible!
Thanks for the instructions, Dak!
Just a note, the N900 has tar with gzip on it. So you can "tar xzvf" on your device without a problem. It avoids the permissions problems of the other methods. Also /home/user/opt is also just /opt so you can shorten your path a bit. 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? |
Re: JAVA on the N900 is possible!
I tend to leave /usr/bin for "system" kinda stuff, and put all my personal meddling into /usr/local/bin
It's just the way I like to keep my hackery separate, that's all. |
Re: JAVA on the N900 is possible!
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) |
All times are GMT. The time now is 09:06. |
vBulletin® Version 3.8.8