deprecated class?

Help
publicNama
2004-12-19
2013-04-25
  • publicNama
    publicNama
    2004-12-19

    Hi,

    I'm trying to use the ycad library to be able to see dxf's inside my own designed applet. I followed the instructions given in the Ycad_api_readme1_a.txt. The compiling went fine but the problem is at run time, I get the NoClassDefFoundError exception. I use the -classpath option on the command line and I checked many times to be sure it wasn't that.
    Knowing that it can sometimes solve the problem I tried to compile again all the ycad source files, the problem is that YutilProperties.java uses StringBufferInputStream which is a deprecated class.
    Is this the real problem? and if it is are there any plans to update the library?

    I'm using the java sdk 1.4.2

    Thanks

     
    • Ed Karlo
      Ed Karlo
      2004-12-20

      This is Ed Karlo, developer of the Ycad library.

      There should not be a problem with NoClassDefFoundError even with the deprecated classes.  The old library still works fine even with the Java 1.5.0 release.  Could you send me (ekarlo at users.sourceforge.net) a copy of your console output and maybe the statements (html or batch file) you are using to start your applet?  I can probably tell you a lot more with them.  It still might be a classpath problem.

      The code in the CVS repository has been updated considerably since the ycad-1.0.2 release.  I need to finish a few changes and package it up for release.  Much of it works well and it might be useful for you to get it and try it out.  (The imprint to a Graphics object does not yet work).

      The Ycad_api_readme1_a.txt document describes how to imprint a dxf drawing onto an arbitrary Graphics object.  This can be used to create various image files, image objects and even things like pdf files.  If you are imbedding a ycad display into an applet of your design you might want to go another route and actually use the ycad code directly.  This will give you all the zoom and pan functionality and such.  I would have to know more about your application to advise you further.

      The most significant change in the CVS repository is the addition of a Swing version of the viewer. The AWT version (the YxxfDrw*) modules are getting a bit long in the tooth. The new Swing version (the YxxfJDrw*) modules make use of Swing features like double buffering. The "YxxfPrt*" modules allow rendering the drawing to an arbitrary Graphics object.

      Other changes include:

      - Initial implementation of the MTEXT entity.
      - Implementation of the ELLIPSE entity.
      - Major improvements to the display of Paper Space views. The toolbar functions (zoom, pan, etc.) now work in paper space.  The new Swing viewer is called "YcadvJ".

      I have a copy of the current CVS repository bundled up in tar and zip files on my web site at:
      http://www.ysystems.com/dist/ycad-1.0.13.tar.gz
      and
      http://www.ysystems.com/dist/ycad-1.0.13.zip
      You can download them from there if that is more convenient than getting them from CVS directly.

      Also, I have some sample code on how to embed the Swing dxf viewer into a larger Swing applet or application.  It is at:
      http://www.ysystems.com/dist/ycadgis1-1.0.0.tar.gz
      and
      http://www.ysystems.com/dist/ycadgis1-1.0.0.zip
      You can download it and study the code.  I hope to have this incorporated into the next release as an example.

      Let me know if this is helps.

       
    • jbarragan
      jbarragan
      2005-12-22

      Hello Ed,

         You have a great product!!!!

         I have a question concerning to events: do I have to compile the yCad-1.0.n (n = 13..15) with an specific JRE (eg 1.4.x or 1.5)? I am compiling yCad with JRE 1.4.2 and it compiles, but zoom window and pan line events (the ones on the canvas)  are not responding .

      Thank you and regards,

      Jaime