tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elalmaire <elalma...@yahoo.com>
Subject Re: Using JDT compiler from build.xml
Date Sat, 04 Oct 2008 09:03:20 GMT



Mark Thomas-18 wrote:
> 
> Elalmaire wrote:
>> Hi, 
>> I'm a new tomcat user. 
>> I'm running Apache Tomcat ver 6.0.18 on Windows Vista with JRE 6 (so I've
>> setted JRE_HOME). 
>>>>From docs, I've read that it's possible to use a jre since "Tomcat 6.0
uses the Eclipse JDT Java compiler for compiling JSP pages", but when I try
to compile with ant (the sample consists in two jsps and two servlets) I
have:
>> ------------------------------------
>> Unable to locate tools.jar. Expected to find it in C:\Program
>> Files\Java\jre1.6.0_07\lib\tools.jar
>> Buildfile: build.xml
>> Trying to override old definition of datatype resources
>> 
>> prepare:
>> 
>> compile:
>>     [javac] Compiling 2 source files to
>> c:\exercises\myapp\build\WEB-INF\classes
>> 
>> BUILD FAILED
>> c:\exercises\myapp\build.xml:305
>> : Unable to find a javac compiler;
>> com.sun.tools.javac.Main is not on the classpath.
>> Perhaps JAVA_HOME does not point to the JDK.
>> It is currently set to "C:\Program Files\Java\jre1.6.0_07"
>> 
>> Total time: 1 second
>> ----------------------------
>> 
>> Shouldn't Tomcat use jasper_jdt.jar in $CATALINA_HOME/lib? or have I to
>> change the javac task into something else? or what?
>> Fran
> 
> What are you trying to compile? JSPs, servlets or something else?
> 
> Mark
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

I'm trying to compile two servlets.
Under the src dir I've a dir called ebookshop (the two servlet are under the
package ebookshop).
The target compile is:
--------------------------------------------
<target name="compile" depends="prepare"
   description="Compile Java sources">

    <!-- Compile Java classes as necessary -->
    <mkdir    dir="${build.home}/WEB-INF/classes"/>
    <javac srcdir="${src.home}"
          destdir="${build.home}/WEB-INF/classes"
            debug="${compile.debug}"
      deprecation="${compile.deprecation}"
         optimize="${compile.optimize}">
        <classpath refid="compile.classpath"/>
    </javac>

    <!-- Copy application resources -->
    <copy  todir="${build.home}/WEB-INF/classes">
      <fileset dir="${src.home}" excludes="**/*.java"/>
    </copy>

  </target>
-------------------------------------------------
-- 
View this message in context: http://www.nabble.com/Using-JDT-compiler-from-build.xml-tp19795278p19810270.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message