![]() |
HowTo.UseJavaOnTheSlug HistoryHide minor edits - Show changes to markup August 25, 2008, at 10:20 AM
by --
Changed lines 137-139 from:
Note: libmagic is missing in the jamvm package, and therefor the package 'file' needs to be installed for network java programs to work. Solution found here: |Debugging jamvm and classpath - 'ipkg install file' solves the problem. to:
Note: libmagic is missing in the jamvm package, and therefore the package 'file' needs to be installed for network java programs to work. Solution found here: |Debugging jamvm and classpath - 'ipkg install file' solves the problem. August 25, 2008, at 10:02 AM
by -- Added info on network and libmagic
Added lines 109-110:
ipkg install file (for networking) Changed lines 137-139 from:
to:
Note: libmagic is missing in the jamvm package, and therefor the package 'file' needs to be installed for network java programs to work. Solution found here: |Debugging jamvm and classpath - 'ipkg install file' solves the problem. March 10, 2008, at 10:02 PM
by -- phoneme-advanced tests ok on openwrt-brcm24
Changed lines 92-93 from:
to:
October 16, 2007, at 05:57 AM
by -- jython
Changed lines 43-45 from:
3) Servlet with jetty. On both your PC and your slug to:
3) Jython 2.2.1 (with a small patch) runs under CVM, pystone number on mssii Changed lines 45-46 from:
$ wget http://dist.codehaus.org/jetty/jetty-6.1.3.zip $ unzip jetty-6.1.3.zip to:
$ cvm -cp jython.jar org.python.util.jython Lib/test/pystone.py Pystone(1.1) time for 10000 passes = 20.986 This machine benchmarks at 476.508 pystones/second Changed lines 49-50 from:
On your PC, compile to:
See this msg for detail 4) Servlet with jetty. On both your PC and your slug Added lines 55-60:
$ wget http://dist.codehaus.org/jetty/jetty-6.1.3.zip $ unzip jetty-6.1.3.zip @] On your PC, compile [@ October 15, 2007, at 10:26 PM
by -- updated status of phoneme-advanced
Changed lines 79-84 from:
Optware phoneme-advanced status: 1) Builds and passes tests on unslung; 2) Builds but failed floating point tests on slugosbe. However the unslung ipk can run on slugobe passing all tests; 3) Builds and passes tests on openwrt-ixp4xx. to:
July 11, 2007, at 08:15 PM
by -- Added status of phoneme-advanced
Changed lines 79-86 from:
to:
Optware phoneme-advanced status: 1) Builds and passes tests on unslung; 2) Builds but failed floating point tests on slugosbe. However the unslung ipk can run on slugobe passing all tests; 3) Builds and passes tests on openwrt-ixp4xx. May 23, 2007, at 05:54 AM
by -- phoneme-advanced reaches optware ipk feed
Changed lines 1-7 from:
Sun has open sourced their J2ME JVM (called CVM) under the umbrella of phoneme advanced with GPL. It seems that CVM performs better than jamvm on the slug. An optware/make/phoneme-advanced.mk has been added. You can already build the phoneme-advanced package if you have the optware cross compilation environment. The package will be added to the ipkg feed as soon as we install Sun's JDK on the official build machine. Assume you've installed the phoneme-advanced package, the following shows a couple of things you can do: 1) Preliminary testing. to:
Sun has open sourced their J2ME JVM (called CVM) under the umbrella of "phoneme advanced" with GPL. It seems that CVM performs better than jamvm or kaffe on the slug. The phoneme-advanced package has been added to the optware ipkg feed. You can simply install it by Added lines 5-12:
# ipkg update # ipkg install phoneme-advanced @] After installing phoneme-advanced ipk, the following shows a couple of things you can do: 1) Preliminary testing. [@ Changed lines 61-62 from:
Transfer examples/embedded/target/classes to your slug, to:
Transfer examples/embedded/target/classes/ to your slug, May 22, 2007, at 11:03 PM
by -- formatting
Changed lines 50-54 from:
$ /usr/lib/jvm/j2sdk1.4.2_09/bin/javac -bootclasspath $J2ME?_HOME/lib/foundation.jar:$J2ME?_HOME/lib/btclasses.zip -classpath lib/servlet-api-2.5-6.1.3.jar:lib/jetty-util-6.1.3.jar:lib/jetty-6.1.3.jar -d examples/embedded/target/classes examples/embedded/src/main/java/org/mortbay/jetty/example/[MO]*.java to:
$ /usr/lib/jvm/j2sdk1.4.2_09/bin/javac -bootclasspath $J2ME?_HOME/lib/foundation.jar:$J2ME?_HOME/lib/btclasses.zip -classpath lib/servlet-api-2.5-6.1.3.jar:lib/jetty-util-6.1.3.jar:lib/jetty-6.1.3.jar -d examples/embedded/target/classes examples/embedded/src/main/java/org/mortbay/jetty/example/[MO]*.java Changed lines 60-65 from:
$ cvm -cp lib/servlet-api-2.5-6.1.3.jar:lib/jetty-util-6.1.3.jar:lib/jetty-6.1.3.jar:examples/embedded/target/classes org.mortbay.jetty.example.MinimalServlets?
to:
$ cvm -cp lib/servlet-api-2.5-6.1.3.jar:lib/jetty-util-6.1.3.jar:lib/jetty-6.1.3.jar:examples/embedded/target/classes org.mortbay.jetty.example.MinimalServlets?
May 22, 2007, at 11:01 PM
by -- formatting
Added line 42:
[@ Changed lines 45-46 from:
to:
@] Added line 48:
[@ Changed lines 51-52 from:
to:
@] Added line 55:
[@ Changed lines 63-64 from:
to:
@] May 22, 2007, at 11:00 PM
by -- formatting
Changed line 8 from:
to:
[@ Changed lines 22-23 from:
to:
@] Changed line 25 from:
to:
[@ Changed lines 37-38 from:
to:
@] May 22, 2007, at 10:58 PM
by -- formatting
Changed lines 1-2 from:
Sun has open sourced their J2ME? JVM (called CVM) under the umbrella of phoneme advanced with GPL. It seems that CVM performs better than jamvm on the slug. to:
Sun has open sourced their J2ME JVM (called CVM) under the umbrella of phoneme advanced with GPL. It seems that CVM performs better than jamvm on the slug. Changed lines 7-8 from:
to:
1) Preliminary testing. Changed lines 23-24 from:
to:
2) Some Javascript scripting with rhino. Changed lines 37-38 from:
to:
3) Servlet with jetty. May 22, 2007, at 10:57 PM
by -- instructions on CVM
Added lines 1-58:
Sun has open sourced their J2ME? JVM (called CVM) under the umbrella of phoneme advanced with GPL. It seems that CVM performs better than jamvm on the slug. An optware/make/phoneme-advanced.mk has been added. You can already build the phoneme-advanced package if you have the optware cross compilation environment. The package will be added to the ipkg feed as soon as we install Sun's JDK on the official build machine. Assume you've installed the phoneme-advanced package, the following shows a couple of things you can do:
$ cvm -version Product: phoneME Advanced (phoneme_advanced_mr2-b18) Profile: Foundation Profile Specification 1.1 JVM: CVM phoneme_advanced_mr2-b18 (mixed mode) $ cvm -cp /opt/lib/java/phoneme-advanced/testclasses.zip HelloWorld? Hello world. $ cvm -cp /opt/lib/java/phoneme-advanced/testclasses.zip Test ... lots of output ... *CONGRATULATIONS: test Test completed with 411 tests passed and 0 failures *Output lines starting with a * should be checked for correctness *They can be compared to src/share/javavm/test/TestExpectedResult?
$ wget ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_6R5.zip $ unzip rhino1_6R5.zip $ cd rhino1_6R5 $ cvm -cp js.jar org.mozilla.javascript.tools.shell.Main Rhino 1.6 release 5 2006 11 18 js> importPackage(java.util); js> print(new java.util.Date()); Tue May 23 12:23:01 GMT 2007 js> print(new Date()); Tue May 23 2007 12:23:09 GMT-0000 (GMT) js> quit();
On both your PC and your slug $ wget http://dist.codehaus.org/jetty/jetty-6.1.3.zip $ unzip jetty-6.1.3.zip On your PC, compile $ cd jetty-6.1.3 $ /usr/lib/jvm/j2sdk1.4.2_09/bin/javac -bootclasspath $J2ME?_HOME/lib/foundation.jar:$J2ME?_HOME/lib/btclasses.zip -classpath lib/servlet-api-2.5-6.1.3.jar:lib/jetty-util-6.1.3.jar:lib/jetty-6.1.3.jar -d examples/embedded/target/classes examples/embedded/src/main/java/org/mortbay/jetty/example/[MO]*.java Transfer examples/embedded/target/classes to your slug, $ cvm -cp lib/servlet-api-2.5-6.1.3.jar:lib/jetty-util-6.1.3.jar:lib/jetty-6.1.3.jar:examples/embedded/target/classes org.mortbay.jetty.example.MinimalServlets? 2007-05-22 22:52:12.024::INFO: Logging to STDERR via org.mortbay.log.StdErrLog? 2007-05-22 22:52:12.034::INFO: jetty-6.1.3 2007-05-22 22:52:12.313::INFO: Started SocketConnector? @ 0.0.0.0:8080 $ w3m -dump http://localhost:8080/ Hello SimpleServlet? November 08, 2006, at 06:56 PM
by --
Added lines 87-92:
/opt/bin/jikes -classpath /opt/share/jamvm/classes.zip:/opt/share/classpath/glibj.zip $* September 01, 2005, at 02:08 PM
by --
Changed lines 3-6 from:
(NB - At present, this is only applicable for the unslung release; no comparable packages exist yet for OpenSlug - 31 Aug 2005) 1) If using the Unslung release, the required packages can be installed as follows: (For OpenSlug, the packages do not yet exist in the corresponding ipkg repository, but the same result can be achieved by usingb the OpenSlugJavaInstallWorkaround) to:
1) If using the Unslung release, the required packages can be installed as follows: (To date - 1 September 2005 - the packages do not yet exist in the OpenSlug ipkg repository, but the same result can be achieved by following the OpenSlugJavaInstallWorkaround) September 01, 2005, at 02:05 PM
by --
Changed lines 5-6 from:
1) Install required packages: to:
1) If using the Unslung release, the required packages can be installed as follows: (For OpenSlug, the packages do not yet exist in the corresponding ipkg repository, but the same result can be achieved by usingb the OpenSlugJavaInstallWorkaround) August 31, 2005, at 10:15 PM
by --
Changed lines 3-4 from:
(NB - At present, this is only applicable for the unslung release; no comparable packages exist for OpenSlug - 31 Aug 2005) to:
(NB - At present, this is only applicable for the unslung release; no comparable packages exist yet for OpenSlug - 31 Aug 2005) August 31, 2005, at 10:14 PM
by --
Added lines 3-4:
(NB - At present, this is only applicable for the unslung release; no comparable packages exist for OpenSlug - 31 Aug 2005) March 21, 2005, at 06:57 PM
by --
Added lines 85-86:
[21/03/05] Hmmm. if there's no JIT jamvm will be faster -- kaffe's interpreter is unoptimised, jamvm uses direct-threading and stack-caching. It's 5x faster on ppc, which again doesn't have a working JIT. Of course, the JIT is faster. March 18, 2005, at 07:44 PM
by --
Added lines 11-12:
ipkg install zlib Changed lines 30-32 from:
4) to run type: /opt/bin/jamvm Test to:
4) to run type: /opt/bin/jamvm Test Changed lines 36-37 from:
bash-2.05b# jamvm Test to:
bash-2.05b# jamvm Test March 18, 2005, at 07:36 PM
by --
Changed line 26 from:
jikes -classpath /opt/share/jamvm/classes.zip:/opt/share/classpath/glibj.zip Test.java to:
/opt/bin/jikes -classpath /opt/share/jamvm/classes.zip:/opt/share/classpath/glibj.zip Test.java Changed line 28 from:
4) to run type: jamvm Test to:
4) to run type: /opt/bin/jamvm Test March 17, 2005, at 10:38 PM
by --
Changed line 5 from:
ipk install classpath to:
ipkg install classpath Changed line 7 from:
ipk install jamvm to:
ipkg install jamvm Changed line 9 from:
ipk install jikes to:
ipkg install jikes March 16, 2005, at 05:52 PM
by --
Added lines 1-2:
Note: if the procedure below does not work for you, please uninstall and then reinstall jamvm. After that it should work... February 01, 2005, at 04:44 AM
by --
Added lines 77-78:
[15:13] <jacques> yeah only things in common are jikes - compiler, and they both use gnu classlib derived classlibs February 01, 2005, at 04:43 AM
by --
Added lines 32-76:
[15:06] <jacques> rwhitby-away, kaffe is a JVM, like jamvm [15:07] <dyoung-web> isnt the differnce sorta like dropbear vs openssh ? [15:07] <jacques> very apt analogy [15:07] <rwhitby-web> which is the openssh one :-) [15:07] <jacques> kaffe [15:08] <garpinc> That's why I did jamvm [15:08] <kergoth> i hear good things about kaffe. iirc there's a dev or two of it that drop by #oe on occasion [15:08] <jacques> it has its own classlib which is synced with gnu classlib relatively often [15:08] <jacques> jikes it a java compiler - compiles jave source code into bytecode [15:08] <garpinc> I synced directly with gnu classpath for my port [15:08] <jacques> I tried to get kaffe going with JIT but it's broken for armeb (and possibly armel) right now [15:09] <rwhitby-web> ok, let's put both alternatives (with the pros and cons of each) on that page. We do *not* need to decide between them :-) [15:09] <rwhitby-web> (unless they are conflicting, in which case we will just mark them as such) [15:10] <jacques> oh absolutely not - any more than we need to decide between openssh and dropbear - even less so actually since kaffe and jamvm and sablevm and ... can all coexist [15:10] <jacques> but kaffe will kick jamvs's ass in speed [15:10] <jacques> oops did I say that out loud? [15:10] <garpinc> http://www.mail-archive.com/kaffe@kaffe.org/msg07533.html [15:10] <garpinc> You're right jaques [15:11] <garpinc> But jamvm will kick kaffee on memory won't it. [15:12] <jacques> garpinc, well that's talking about if JIT is enabled in kaffe, which is broken for armeb right now [15:12] <jacques> but still, kaffe has a lot of optimizations that jamvm does not have, and jamvm is absolutely tiny compared to kaffe - pros and cons [15:12] <rwhitby-web> good, so it really is like dropbear and openssh - horses for courses February 01, 2005, at 04:28 AM
by --
Changed line 1 from:
ipk install classpath to:
1) Install required packages: Changed line 3 from:
ipk install jamvm to:
ipk install classpath Changed line 5 from:
ipk install jikes to:
ipk install jamvm Changed line 7 from:
Use your favorite editor (i.e: vi) to create a java program: to:
ipk install jikes Changed line 9 from:
filename: Test.java to:
2) Use your favorite editor (i.e: vi) to create a java program: Changed lines 11-12 from:
class Test { public static void main(String[] args) {
to:
filename: Test.java Changed lines 13-14 from:
System.out.println("hello world");
to:
class Test {
public static void main(String[] args) {
Changed line 16 from:
} to:
System.out.println("hello world");
Changed line 18 from:
} to:
} Changed line 20 from:
to compile type on one line (ignore \) : to:
} Changed lines 22-23 from:
jikes -classpath /opt/share/jamvm/classes.zip:/opt/share/classpath/glibj.zip \ Test.java to:
3) to compile type on one line: Changed lines 24-26 from:
to run type: jamvm Test to:
jikes -classpath /opt/share/jamvm/classes.zip:/opt/share/classpath/glibj.zip Test.java 4) to run type: jamvm Test Changed line 30 from:
bash-2.05b# jamvm Test to:
bash-2.05b# jamvm Test\\ February 01, 2005, at 04:25 AM
by --
Changed lines 1-30 from:
Describe UseJavaOnTheSlug here. to:
ipk install classpath ipk install jamvm ipk install jikes Use your favorite editor (i.e: vi) to create a java program: filename: Test.java class Test { public static void main(String[] args) {
System.out.println("hello world");
}
} to compile type on one line (ignore \) : jikes -classpath /opt/share/jamvm/classes.zip:/opt/share/classpath/glibj.zip \ Test.java to run type: jamvm Test Example: bash-2.05b# jamvm Test hello world
view ·
edit ·
print ·
history ·
Last edited by Tumaini.
Based on work by Tumaini, BrianZhou, GerhardMuth, Philip Hart, rlougher, kaste, Vasile Dumitrescu, rwhitby, and Keith Garry Boyce. Originally by Keith Garry Boyce. Page last modified on August 25, 2008, at 10:20 AM
|