views:

88

answers:

2

Hi all,

recently I downloaded this open source project and I am trying to compile it.

However, one of the line is giving me an error.

"import com.sun.org.apache.xpath.internal.functions.WrongNumberArgsException;"

Seems that i am missing a library.... is there a way to know WHICH library do I need?

I tried searching on google for com.sun.org.apache.xpath.internal.functions, while there seem to be a result on kickjava.com/src containing the source code.

I think i need the Jar file right?

I tried downloading xalan from apache and it didn't work. I tried to see if there's a xpath library, but I dont think there's a xpath library? searching for xpath led me to xalan. I have also tried Xerces-J-bin.2.9.1 .

Thanks!


+2  A: 

The WrongNumberArgsException class in Xalan is in the org.apache.xpath.functions package. With the Xalan jar in your project, you should just be able to change the import statement in the open source code to use the correct path.

Bill the Lizard
I think you missed the com.sun prefix of the import.
Arne Burmeister
Xalan is an XSLT processor from Apache. It's not in the Sun libraries.
Bill the Lizard
Hey Bill, have a look inside the java 6 runtime lib!
Arne Burmeister
A: 

The OpenSource author (what ever "this open source project" is) imported the internal exception class from the sun adopted xalan classes in Java 6. This should not be done at all! Will not work with older VMs and may be broken with later ones.

Never import com.sun.*!

Arne Burmeister