You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Lingzhi Zhang <lz...@cse.ogi.edu> on 2003/08/15 20:42:55 UTC

jre jar or xalan jar

Hi,

This might need to be posted in xalan list, however, I couldn't deliever
there. However, it looks like a java question. I feel sorry if it bothers
you.

I got following error when I sent my code to others for test.

Exception in thread
"main" java.lang.NoSuchMethodError: org.apache.xpath.compile
r.OpMap.getTokenQueue()Lorg/apache/xml/utils/ObjectVector;

I developed the program in jre1.4.2, however, the code was tested in the
1.4.1. The problem is that in jre1.4.2 org.apache.xpath.compile
r.OpMap.getTokenQueue() returns a ObjectVector, however, in jre1.4.1 this
method returns a Object[]. Even though I include xalan 2.5.1, which also
has ObjectVector as return value, in my classpath like

export
CLASSPATH=$CLASSPATH:$API_HOME/xalan.jar:$API_HOME/xercesImpl.jar:$API_HOME/xml-apis.jar:$API_HOME/xmlParserAPIs.jar:$STATIX_HOME/StatiX.jar
java -cp $CLASSPATH myprogram

It sees that java does use the class org.apache.xpath.compiler.OpMap in
jre while not xalan I specified in class path, since I guess that using
jre library is default. Therefore, the code couldn't run in jre1.4.1.

My question is how to force the java to use the class in xalan.jar instead
of that in jre, so that it could run both version of java. Thanks.

Stephen



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org