Kevin,
thanks for the response.

My underestanding was that the xalan, xerces and jaxp  are all roled
into the JDK 1.5 and hence no need for me to add them to the
classpath.

from 1.5 release notes at:
http://java.sun.com/j2se/1.5.0/docs/guide/xml/jaxp/ReleaseNotes_150.html#versions

" Component Versions
These versions of the relevant technologies have been incorporated
into the reference implementation.
   * Xerces version 2.6.2 + (Xerces version 2.6.2 with controlled bug fixes)
   * XSLTC version 2.6.0 + (XSLTC version 2.6.0 , with controlled bug
fixes, based on the Xalan 2.6.0 release) "


so thats where I am comming from.

I unjared the rt.jar and noticed bunch of xalan and xerces packages
prefixed with com/sun/....

so I assumed that they have roled them into rt.jar  that is part of the JDK 1.5

the echo $CLASSPATH for JDK 1.4  is empty and hence there are no extra
jars related to xalan/xerces that are in the classpath as well and yet
that works.

running the command in jdk 1.4.2 is successfull as below:


[EMAIL PROTECTED]:/opt/j2sdk1.4.2_06/bin] ./java
org.apache.xalan.xslt.EnvironmentCheck
#---- BEGIN writeEnvironmentReport($Revision: 1.14 $): Useful stuff found: ----
version.DOM.draftlevel=2.0fd
java.class.path=.
version.JAXP=1.1
java.ext.dirs=/opt/j2sdk1.4.2_06/jre/lib/ext
version.xerces2=not-present
version.xerces1=not-present
version.xalan2_2=Xalan Java 2.4.1
version.xalan1=not-present
version.ant=not-present
java.version=1.4.2_06
version.DOM=2.0
version.crimson=present-unknown-version
sun.boot.class.path=/opt/j2sdk1.4.2_06/jre/lib/rt.jar:/opt/j2sdk1.4.2_06/jre/lib/i18n.jar:/opt/j2sdk1.4.2_06/jre/lib/sunrsasign.jar:/opt/j2sdk1.4.2_06/jre/lib/jsse.jar:/opt/j2sdk1.4.2_06/jre/lib/jce.jar:/opt/j2sdk1.4.2_06/jre/lib/charsets.jar:/opt/j2sdk1.4.2_06/jre/classes
version.SAX=2.0
version.xalan2x=Xalan Java 2.4.1
#----- END writeEnvironmentReport: Useful properties found: -----
# YAHOO! Your environment seems to be OK.




running the command in Jdk 1.5 is not successfull:


[EMAIL PROTECTED]:/opt/jdk1.5.0_07/bin] java
org.apache.xalan.internal.xslt.EnvironmentCheck
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/xalan/internal/xslt/EnvironmentCheck


I can put the xalan.jar and et al in the classpath and try but I was
hoping I could simply use what is in JDK.


help.




On 6/1/06, Kevin Cormier <[EMAIL PROTECTED]> wrote:
Hi John,

 I'm new to Xalan, but it sounds like your classpath is different for your
two JDKs.  EnvironmentCheck works for me using JDK 1.5.  You need to have
xalan.jar (or xsltc.jar), serializer.jar, xml-apis.jar, and xercesImpl.jar
on your classpath.  If you're not using the -cp or -classpath option to pass
the appropriate classpath to the JVM, then it comes from the CLASSPATH
environment variable.  Check the value of it with:

 echo $CLASSPATH

 You'll need to have the actual .jar files in the classpath; just using the
directory that contains them will not work.



> checking the jdk rt.jar of jdk1.5  where xalan package resides I see
> the EnvironmentCheck utility class sits in:
>
com/sun/org/apache/xalan/internal/xslt/EnvironmentCheck.class


 I'm not sure what this class is for, but it is not the class you want.
Because it's in rt.jar, the JVM can always find it, but it doesn't have a
main() method.

 Hope this helps,

 -Kevin

Reply via email to