You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "Kenneth B. Harwood" <ru...@comcast.net> on 2005/06/23 21:39:59 UTC

follow-up to classnotfound debug error

A quick follow-up.

I can bring-up an JSVGCanvas in an application (JFrame).  It's when I try to use the Class within a JApplet that I get grief.

- Ken H.


When i run [my batik-1.6, sun jvm/jre] based JApplet this is what i get:


Exception in thread ... java.lang.NoClassDefFoundError: org/apache/batik/swing/svg/JSVGComponent
 at StartButton.run(StartButton.java:90)
 at java.lang.Thread.run(Thread.java:595)

Here is my (batik-specific) CLASSPATH:

f:\batik-1.6\lib\batik-dom.jar
f:\batik-1.6\lib\batik-svg-dom.jar
f:\batik-1.6\lib\batik-swing.jar
f:\batik-1.6\lib\batik-util.jar
f:\batik-1.6\lib\batik-awt-util.jar
f:\batik-1.6\lib\batik-bridge.jar

I realize that other Batik Jar's came with your download.  In fact, those files
are in my batik/lib directory.  But I have not put them in my CLASSPATH yet).
As i understand Java i do not need to add "ununsed" Jars/packages to my
CLASSPATH.

The <jar -tf> utility confirms that JSVGComponent is in my [batik-swing.jar]
file.

Thanks for taking the time to review my carelessness.

 - Kenneth Harwood



--------------------------------------------------------------------------------

   Well it would be useful to know what class was not
found in the ClassDefNotFound error (copy the stack trace).

   The problem is almost certainly an issue with your
classpath (which you also haven't included).  But I don't
really have enough information to provide a solid answer.

Kenneth B. Harwood wrote:
> 
> i'm running win2K.  netbeans 4.0.  swing/japplet.  j2se (5).  my applet 
> bombs-out every time at the following statement:
>  
>  
> JSVGComponent var= new org.apache.batik.swing.svg.JSVGComponent();
> [and also when i use the JSVGCanvas class]
>  
> each time it generates a *ClassDefNotFound* error. 
>  
> I'm pretty certain I have my CLASSPATH set-up properly.
> i get the same error when running the applet from Appletviewer.
>  
> any suggestions?
>  
> thanks.
>  
>  - ken harwood
>     reno, nevada
>  
>    run10kswim@comcast.net <ma...@comcast.net>