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 18:57

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by Xizor (Post 432193)
Even if I go directly to /home/opt/java/ejre1.6.0_10/bin and type "java" I get "/bin.sh: java: not found"

when you're in /home/opt/java/ejre1.6.0_10/bin, did you type just "java" or "./java" ? note the dot and the slash at the beginning.
unlike windows, linux shells usually don't have the current path in the PATH variable.

Xizor 2009-12-17 19:37

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by SubCore (Post 432273)
when you're in /home/opt/java/ejre1.6.0_10/bin, did you type just "java" or "./java" ? note the dot and the slash at the beginning.
unlike windows, linux shells usually don't have the current path in the PATH variable.

If I'm in /home/opt/java/ejre1.6.0_10/bin and type "./java" I get "permission denied" ? (And this happens as root )

Quote:

Originally Posted by Dak (Post 432290)
I think you also have to kill and restart your xterm so the new profile path gets refreshed...you can test this by just typing "ja" then hitting tab...it should autocomplete to "java"

The autocomplete works with java but only without "sudo gainroot".

There's got to be some silly mistake I've made, but I just can't seem to figure it out... :(

fabolousv 2009-12-17 19:41

Re: JAVA on the N900 is possible!
 
can someone try nav4all? this might enable turn-by-turn navigation on the n900

Diavoli 2009-12-17 19:47

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????

Dak 2009-12-17 19:51

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.

SubCore 2009-12-17 19:53

Re: JAVA on the N900 is possible!
 
Quote:

Originally Posted by Xizor (Post 432329)
If I'm in /home/opt/java/ejre1.6.0_10/bin and type "./java" I get "permission denied" ? (And this happens as root )

ah, of course.

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
cd /home/opt/java
tar -xzvf /home/user/MyDocs/<filename>.tar.gz

now every file should have their proper flags and permissions :)

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 :)

Xizor 2009-12-17 20:37

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?

qole 2009-12-17 20:43

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?

Dak 2009-12-17 20:53

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.

qole 2009-12-17 21:29

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 15:02.

vBulletin® Version 3.8.8