📄 orp.wml
字号:
#!wml --include=..#use wml::std::page#use wml::std::lang#use wml::fmt::isolatin#use wml::std::case global=upper<lang:new id=en short><lang:star:slice:><set-var last-modified-author="<mjw>">#include <include/macros.wml><header title="GNU Classpath and ORP"><en><p>The Open Runtime Platform (<linkurl="http://orp.sourceforge.net/" name="ORP">) provides acovenient and simple platform for both using and testing GNUClasspath. With the release of ORP 1.0.9, GNU Classpath's nativelibraries are supported out of the box. </p><H4>Steps to use ORP+GNU Classpath on GNU/Linux</H4><p>Example assumes ORP 1.0.9, see above. In the example, GNU Classpath sourcesare in ~/src/classpath/.</p><UL> <LI>Obtain <createlink url="http://sourceforge.net/projects/orp/" name="ORP"> from the Sourceforge project page</LI> <OL> <LI><tt>wget http://prdownloads.sourceforge.net/orp/orp-1.0.9.tgz</tt></LI> <LI><tt>tar -xzvf orp-1.0.9.tgz</tt></LI> </OL> <LI>On some systems you might need to apply a patch to work around gcc compile problems</LI> <OL> <LI><tt>cd orp-1.0.9</tt></LI> <LI><tt>patch -p1 < ~/src/classpath/resource/orp-1.0.9.patch</tt></LI> </OL> <LI>Build ORP</LI> <OL> <LI><tt>make NON_ORP_NATIVE_LIBS=-DNON_ORP_NATIVE_LIBS dbg</tt></LI> </OL></UL><p>ORP should now be built and ready, orp-1.0.9/mains/orp/Linux/dbg/orp.</p><H4>Using ORP+GNU Classpath on GNU/Linux</H4><p>ORP needs to load shared libraries and the class library bytecode.The recommended method is to use the environment variableLD_LIBRARY_PATH to provide a colon separated list of directories inwhich to look for GNU Classpath's shared libraries. The example belowassumes the user built and installed GNU Classpath without modifingthe default prefix.</p><UL> <LI>Set the LD_LIBRARY_PATH variable (assumes Bash shell)</LI> <OL> <LI><tt>export LD_LIBRARY_PATH=/usr/local/classpath/lib/classpath</tt></LI> </OL></UL><UL> <LI>Set the CLASSPATH variable (ORP doesn't yet use this but it makes the command line easier).</LI> <OL> <LI><tt>export CLASSPATH=/usr/local/classpath/share/classpath/:.</tt></LI> </OL></UL><UL> <LI>Running HelloWorld with ORP</LI> <OL> <LI>Create a <tt>HelloWorld.java</tt> file and compile to a class file with <tt>jikes</tt> or <tt>gcj -C</tt></LI> <LI><tt>orp-1.0.9/mains/orp/Linux/dbg/orp -swapjit 0 1 -classpath $CLASSPATH HelloWorld</tt></LI> </OL></UL><p>ORP contains two JITs at this time. By default ORP uses aso-called JIT 3 and for some things it appears to have more problemsthan when using JIT 1. This is the reasoning behind adding the-swapjit 0 1 argument to ORP. ORP does not have the ability at thistime to execute raw bytecode and must use one of these two JITcompilers.</p></en><footer>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -