summaryrefslogtreecommitdiff
path: root/doc/www.gnu.org/docs/orp.wml
blob: b8a81eaabfc0db1dc7943b1aa79ab665e0cbce4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!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 (<link
url="http://orp.sourceforge.net/" name="ORP">) provides a
covenient and simple platform for both using and testing GNU
Classpath.  With the release of ORP 1.0.9, GNU Classpath's native
libraries 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 sources
are 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 variable
LD_LIBRARY_PATH to provide a colon separated list of directories in
which to look for GNU Classpath's shared libraries.  The example below
assumes the user built and installed GNU Classpath without modifing
the 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 a
so-called JIT 3 and for some things it appears to have more problems
than when using JIT 1.  This is the reasoning behind adding the
-swapjit 0 1 argument to ORP.  ORP does not have the ability at this
time to execute raw bytecode and must use one of these two JIT
compilers.
</p>
</en>
<footer>