PR target/27599
[official-gcc.git] / libjava / classpath / doc / www.gnu.org / docs / orp.wml
blobb8a81eaabfc0db1dc7943b1aa79ab665e0cbce4b
1 #!wml --include=..
3 #use wml::std::page
4 #use wml::std::lang
5 #use wml::fmt::isolatin
6 #use wml::std::case global=upper
8 <lang:new id=en short>
9 <lang:star:slice:>
11 <set-var last-modified-author="<mjw>">
13 #include <include/macros.wml>
15 <header title="GNU Classpath and ORP">
16 <en>
17 <p>
18 The Open Runtime Platform (<link
19 url="http://orp.sourceforge.net/" name="ORP">) provides a
20 covenient and simple platform for both using and testing GNU
21 Classpath. With the release of ORP 1.0.9, GNU Classpath's native
22 libraries are supported out of the box.
23 </p>
25 <H4>Steps to use ORP+GNU Classpath on GNU/Linux</H4>
26 <p>
27 Example assumes ORP 1.0.9, see above. In the example, GNU Classpath sources
28 are in ~/src/classpath/.
29 </p>
30 <UL>
31 <LI>Obtain <createlink url="http://sourceforge.net/projects/orp/"
32 name="ORP"> from the Sourceforge project page</LI>
33 <OL>
34 <LI><tt>wget
35 http://prdownloads.sourceforge.net/orp/orp-1.0.9.tgz</tt></LI>
36 <LI><tt>tar -xzvf orp-1.0.9.tgz</tt></LI>
37 </OL>
38 <LI>On some systems you might need to apply a patch to work around
39 gcc compile problems</LI>
40 <OL>
41 <LI><tt>cd orp-1.0.9</tt></LI>
42 <LI><tt>patch -p1 < ~/src/classpath/resource/orp-1.0.9.patch</tt></LI>
43 </OL>
44 <LI>Build ORP</LI>
45 <OL>
46 <LI><tt>make NON_ORP_NATIVE_LIBS=-DNON_ORP_NATIVE_LIBS dbg</tt></LI>
47 </OL>
48 </UL>
49 <p>
50 ORP should now be built and ready, orp-1.0.9/mains/orp/Linux/dbg/orp.
51 </p>
52 <H4>Using ORP+GNU Classpath on GNU/Linux</H4>
53 <p>
54 ORP needs to load shared libraries and the class library bytecode.
55 The recommended method is to use the environment variable
56 LD_LIBRARY_PATH to provide a colon separated list of directories in
57 which to look for GNU Classpath's shared libraries. The example below
58 assumes the user built and installed GNU Classpath without modifing
59 the default prefix.
60 </p>
61 <UL>
62 <LI>Set the LD_LIBRARY_PATH variable (assumes Bash shell)</LI>
63 <OL>
64 <LI><tt>export LD_LIBRARY_PATH=/usr/local/classpath/lib/classpath</tt></LI>
65 </OL>
66 </UL>
67 <UL>
68 <LI>Set the CLASSPATH variable (ORP doesn't yet use this but it
69 makes the command line easier).</LI>
70 <OL>
71 <LI><tt>export CLASSPATH=/usr/local/classpath/share/classpath/:.</tt></LI>
72 </OL>
73 </UL>
74 <UL>
75 <LI>Running HelloWorld with ORP</LI>
76 <OL>
77 <LI>Create a <tt>HelloWorld.java</tt> file and compile to a class file
78 with <tt>jikes</tt> or <tt>gcj -C</tt></LI>
79 <LI><tt>orp-1.0.9/mains/orp/Linux/dbg/orp -swapjit 0 1 -classpath
80 $CLASSPATH HelloWorld</tt></LI>
81 </OL>
82 </UL>
83 <p>
84 ORP contains two JITs at this time. By default ORP uses a
85 so-called JIT 3 and for some things it appears to have more problems
86 than when using JIT 1. This is the reasoning behind adding the
87 -swapjit 0 1 argument to ORP. ORP does not have the ability at this
88 time to execute raw bytecode and must use one of these two JIT
89 compilers.
90 </p>
91 </en>
92 <footer>