You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by rektide <re...@gmail.com> on 2007/12/17 07:52:10 UTC

super happy build time: package org.eclipse.jdt.core.compiler org.eclipse.jdt.internal.compiler does not exist

i'm on debian and it took me a night of labor to get tomcat building.  it's
my own damned fault for having become so rotten at dealing with classpaths,
and for that i in part can thank eclipse, but it was a kind of rotten
experience, and i wanted to share here incase anyone else gets long streams
of:
    [javac]
/home/rektide/tomcat.java/java/org/apache/jasper/compiler/JDTCompiler.java:38:
package org.eclipse.jdt.core.compiler does not exist
    [javac] import org.eclipse.jdt.core.compiler.IProblem;
    [javac]
/home/rektide/tomcat.java/java/org/apache/jasper/compiler/JDTCompiler.java:39:
package org.eclipse.jdt.internal.compiler does not exist


so, the root cause is that jdt.jar is ecj.jar on debian (and is also ecj in
the eclipse repository itself)

the solution i found was to CLASSPATH=/path/to/ecj.jar.

someone refresh me why
CLASSPATH=/usr/share/java
is inadequate, and
CLASSPATH=/usr/share/java/ecj.jar is required?  i set tomcat.classpath to
look for ecj.jar instead of jdt.jar, but it didnt locate the ecj.jar, i had
to put the exact location manually into the CLASSPATH.  combined with the
first classpath statement, i would've expected ant to look in
/usr/share/java and add the tomcat.classpath specific file ecj.jar, but it
didnt.  it took me a bunch of ant -v's and a couple of hours to work this
out.

there's also another option for compiling, using the eclipse JDT, which i
ran with the following classpath:
CLASSPATH=/usr/lib/eclipse/plugins/org.eclipse.jdt_3.2.1.r321_v20060823.jar:/usr/lib/eclipse/plugins/org.eclipse.jdt.core_3.2.1.v_677_R32x.jar

mostly this is here as a waypoint for anyone else having compile problems on
debian or ubuntu, but if anyone wants to chime in on the proper use of
CLASSPATH / have a nice come-to-jesus post to explain what is going on / how
simple life should be, or even propose ways to make this friendlier to
reduce noob pains, or anything at all topical really, i'd welcome any
discussion.

good evening to all,
rektide