Editing Java

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 59: Line 59:
=== Unsorted ===
=== Unsorted ===
For Java support in Maemo Browser a plugin is required. (References to be written.)
For Java support in Maemo Browser a plugin is required. (References to be written.)
-
 
-
=== Sun Java SE for embedded ===
 
-
 
-
:''Note: this software is proprietary; the OpenJDK is available, see the Cambridge Software Labs section below''
 
-
 
-
#Downloaded the Sun Java SE for Embedded (ARMv6 jre 1.6_10 Headful) [https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=ejre-6u10-oth-JPR@CDS-CDS_Developer Download it here]. (XXX old link, double-check)
 
-
#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.
 
-
#(Do not extract the archive on your PC! You can only copy it to vfat and the executable flags are lost -  MyDocs is a vfat partition and doesn't support executable flags...) <s>If you don't have a program on N900 to open these yet, download it onto my PC. Fedora GNU/Linux automatically fires up an archive manager when you dbl-click the file. There are free Windows utilities to handle these files too (e.g. 7-zip). 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.</s>
 
-
#Copy it to your device,
 
-
#*If you have SSH configured and networking working (computer and device in the same wireless or USB network), to recursively copy the folder and all its contents to your N900, all you need to do is use the "scp" command (Secure CoPy via SSH) with the "-r" option. 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'''
 
-
#**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. You can, instead of an IP address, use your N900's host name. From xterm on your N900: "hostname" By default, this returns "Nokia-N900-42-11" Your scp command on your host computer (need winbind installed on it for this to work) then becomes: "scp -r ejre1.6.0_10 root@Nokia-N900-42-11/home/opt/java" Names are easier to memorize than numbers (assuming you aren't being lazy and using the history)
 
-
#***Or, if not on WiFi, 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.
 
-
#*Or connect via USB and choose mass storage mode, copy the file over, then disconnect.
 
-
#Open a Terminal and type:
 
-
#:sudo gainroot
 
-
#:mkdir /home/opt/java
 
-
#:cd /home/opt/java
 
-
#:tar -xzvf /home/user/MyDocs/<filename>.tar.gz
 
-
# 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), i.e. "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.
 
-
 
-
[http://web.archive.org/web/20080308015352/http://java.sun.com/products/java-media/2D/samples/java2demo/Java2D.zip Java2D sample] works with this method.
 
-
 
-
[http://talk.maemo.org/showpost.php?p=430791&postcount=13 original post]
 
-
[http://talk.maemo.org/showpost.php?p=432083&postcount=24 'lesson' 1]
 
-
 
-
To enable Mozilla browser plugin [http://talk.maemo.org/showthread.php?p=959215#post959215]:
 
-
#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.
 
-
 
-
=== MicroEmulator ===
 
-
{{main|Microemulator}}
 
-
There is also some [http://talk.maemo.org/showthread.php?p=238027#post238027 micro emulator] thing which may be Java related. [http://talk.maemo.org/showpost.php?p=435335&postcount=53 more of the same] ([http://talk.maemo.org/showpost.php?p=435479&postcount=55 mirror])
 
-
 
-
To run a midlet [http://talk.maemo.org/showpost.php?p=494025&postcount=118]:
 
-
# Install JRE
 
-
# Go to http://www.microemu.org/ and download the zip file
 
-
# Unzip the file
 
-
# Go to folder in terminal and run java -jar microemulator.jar
 
-
# Get out your stylus and used the menu to open dbmidlet.jar
 
-
 
-
[http://www.microemu.org/maemo this one manual] outdated doesn't work at all. [http://talk.maemo.org/showpost.php?p=511778&postcount=148]
 
-
 
-
no gps? [http://talk.maemo.org/showpost.php?p=518089&postcount=161][http://talk.maemo.org/showpost.php?p=518240&postcount=165] [http://talk.maemo.org/showpost.php?p=657320&postcount=240 work in progress]
 
-
 
-
[http://talk.maemo.org/showpost.php?p=542689&postcount=193]
 
-
[http://talk.maemo.org/showpost.php?p=542689&postcount=194], confirming the steps above
 
-
 
-
I'd like to be able to use it in portrait mode, and ofcourse keyboard support would be nice [http://talk.maemo.org/showpost.php?p=837802&postcount=269]
 
-
 
-
=== Cambridge Software Labs OpenJDK for ARM ===
 
-
 
-
{{main|OpenJDK 6.0 0 (Cambridge Software Labs) on N900}}
 
-
 
-
This is a good free/open-source solution,
 
-
 
-
The optimized OpenJDK for ARM on the N900 provided by Cambridge Software Labs (see [http://www.camswl.com/openjdk/])
 
-
 
-
[http://talk.maemo.org/showpost.php?p=496437&postcount=122 "works quite well for me"]
 
-
 
-
It is without JIT. But they also say that this version gives reasonable performance even without JIT (they say something about "70-80% of the performance of a JIT"). [http://talk.maemo.org/showpost.php?p=508945&postcount=138]
 
-
 
-
===porting pspkvm to N900?===
 
-
 
-
how about porting pspkvm to N900? pspkvm is a JavaME emulator for the PSP. Link: [http://sourceforge.net/apps/trac/pspkvm]
 
-
 
-
pspkvm is itself a port of the [https://phoneme.dev.java.net/ PhoneME] software. Porting directly from PhoneME to Maemo is probably a better bet, rather than going from pspkvm.
 
-
 
-
[http://talk.maemo.org/showpost.php?p=460238&postcount=86] [http://talk.maemo.org/showpost.php?p=459131&postcount=82]
 
== Brainstorm ==
== Brainstorm ==

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)

Templates used on this page:

Retrieved from "https://wiki.maemo.org/Java"