Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call Static Method on Class in a jar File

Status
Not open for further replies.

YerMom

Programmer
Oct 3, 2006
127
0
0
US
I'm on windows xp and need to call a static method that is on a class in a jar file. The jar file is in my classpath. The class is Process and the method is also called Process.

The documentation I'm reading says to call the method as follows:
Code:
java com\sun\org\apache\xalan\internal\xslt.Process -in in.xml -xsl style.xsl -out out.html.

I've done so, but get the following error:
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: com\sun\org\apache\xa
lan\internal\xslt/Process

What am I doing wrong?

Thanks -- I'm a beginner at this.

 
Well it would be :

Code:
java com.sun.org.apache.xalan.internal.xslt.Process -in in.xml -xsl style.xsl -out out.html

But you should probably read this depending on your JDK version :


--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Hi sedj,

I downloaded the latest xalan.jar file from the Apache website and also made your correction.

My transformation works fine.

BTW, did you already know about the bug you referenced in your post? I'm just wondering how you found out about it.

Thanks and regards.
 
I did not know about the bug ... but google does :)

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top