[NTLUG:Discuss] Java Woes

Bob Byron bbyron at radit.com
Mon Feb 18 09:03:43 CST 2002


> 1.  What does the error message mean?  I interpret it to mean that "main" isn't
>     defined in the StyleSheet.class in the jar file.

It means that the jvm cannot find the StyleSheet class, *not* that main does not
exist in the class.

> 2.  Does the CLASSPATH have a maximum length?  Maybe the directory where
>    saxon.jar is located only appears to be in my CLASSPATH.

There might be, but I highly suspect that this is not the problem as I have used very
large number of paths in the CLASSPATH variable.

I would focus my attention on the classpath.  To help insure that the jvm is seeing
the jar file, you might want to try "java -verbose".  You can also be more explicit by
specifying:
java -cp '/usr/local/share/saxon/saxon.jar:another.jar:yetAnother.jar' com.icl.saxon.StyleSheet

Bob
  ----- Original Message ----- 
  From: Val W. Harris 
  To: NTLUG Discuss 
  Sent: Monday, February 18, 2002 4:24 AM
  Subject: [NTLUG:Discuss] Java Woes


  I've been attempting to get xalan-j or saxon XSLT processors working
  for far longer than I care to admit.  I'm running RedHat 7.2 pretty much
  out-of-the-box.  The following command is taken straight out of the
  saxon docs for running the samples.  Here is the error message I'm getting
  consistently:

  prompt:   java com.icl.saxon.StyleSheet data/othello.xml styles/play.xsl dir=playhtml 
  Exception in thread "main" java.lang.NoClassDefFoundError: com/icl/saxon/StyleSheet

  When I "jar tf" the saxon.jar file, I get:

  prompt:   jar tf /usr/local/share/saxon/saxon.jar | grep com/icl/saxon/StyleSheet
  com/icl/saxon/StyleSheet.class

  The directory /usr/local/share/saxon/saxon.jar is in my CLASSPATH environment
  variable.  My questions are:

  1.  What does the error message mean?  I interpret it to mean that "main" isn't
      defined in the StyleSheet.class in the jar file.

  2.  Does the CLASSPATH have a maximum length?  Maybe the directory where
      saxon.jar is located only appears to be in my CLASSPATH.

  Any help would be greatly appreciated.  I'm completely baffled.

  Thanks,

  Val

-- 
Val W. Harris            vwharris at airmail.net

"Become a student of change. It is the only
thing that will remain constant."
-Anthony J. D'Angelo

  _______________________________________________ http://www.ntlug.org/mailman/listinfo/discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ntlug.org/pipermail/discuss/attachments/20020218/f6e6d6e8/attachment.html


More information about the Discuss mailing list