Use an external compiler

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
(migration)
 
 
Line 5: Line 5:
 
servlets.
 
servlets.
  
Resin's default is to use the "internal" compiler because it is the most
+
== Eclipse compiler ==
likely to be available. Sometimes the internal compiler causes  
+
 
 +
The eclipse compiler requires the presence of $RESIN_HOME/lib/eclipse-compiler.jar.
 +
It is a very fast compiler that was developed as part of the Eclipse project.
 +
 
 +
In [[resin.conf]] with the [[javac]] configuration option:
 +
 
 +
<!-- pre -->
 +
  <javac compiler="eclipse" args="-source 1.5"/>
 +
<!-- /pre -->
 +
 
 +
== Internal compiler ==
 +
 
 +
The internal compiler requires tools.jar from the JDK installation, so a JDK must be used (not a JRE).
 +
 
 +
Sometimes the internal compiler causes  
 
errors, creating exceptions or simply hanging and taking up a thread.  The
 
errors, creating exceptions or simply hanging and taking up a thread.  The
solution is to change the compiler to "javac" in [[resin.conf]]:
+
solution is to change the compiler to use an external compiler.
 +
 
 +
In [[resin.conf]] with the [[javac]] configuration option:
 +
 
 +
<!-- pre -->
 +
  <javac compiler="internal" args=""/>
 +
<!-- /pre -->
 +
 
 +
== javac JDK compiler ==
 +
 
 +
The javac compiler is included with the JDK.  It executes that same as the internal compiler, however it is executed as an external process and is less prone to the problems described for the internal compiler.
 +
 
 +
In [[resin.conf]] with the [[javac]] configuration option:
  
 
<!-- pre -->
 
<!-- pre -->
Line 14: Line 40:
 
<!-- /pre -->
 
<!-- /pre -->
  
Jikes is another option for the compiler, as discussed in the documentation
+
== Jikes compiler ==
for [[javac]].
+
 
 +
In [[resin.conf]] with the [[javac]] configuration option:
 +
 
 +
<!-- pre -->
 +
  <javac compiler="jikes" args=""/>
 +
<!-- /pre -->

Latest revision as of 20:05, 18 April 2006


Resin uses a compiler to compile the java code that is generated for jsp, xsl, and php. The compiler is also used to compile java source files such as servlets.

Contents

Eclipse compiler

The eclipse compiler requires the presence of $RESIN_HOME/lib/eclipse-compiler.jar. It is a very fast compiler that was developed as part of the Eclipse project.

In resin.conf with the javac configuration option:

 <javac compiler="eclipse" args="-source 1.5"/>

Internal compiler

The internal compiler requires tools.jar from the JDK installation, so a JDK must be used (not a JRE).

Sometimes the internal compiler causes errors, creating exceptions or simply hanging and taking up a thread. The solution is to change the compiler to use an external compiler.

In resin.conf with the javac configuration option:

 <javac compiler="internal" args=""/>

javac JDK compiler

The javac compiler is included with the JDK. It executes that same as the internal compiler, however it is executed as an external process and is less prone to the problems described for the internal compiler.

In resin.conf with the javac configuration option:

 <javac compiler="javac" args=""/>

Jikes compiler

In resin.conf with the javac configuration option:

 <javac compiler="jikes" args=""/>
Personal tools