[EvA] Failed compilation of EvA2 with icedtea6

Oliver Borm oli.borm at web.de
Sat Feb 13 23:15:13 CET 2010


>Hi there,
>
>it seems icedtea does not include the JPEGCodec or Java beans
>implementations used by EvA2. If using the Sun SDK, which is available
>for Gentoo, I think, is not an option, this can not be easily solved.
>The JPEG encoding is of course not vital (and can easily be replaced by
>other implementations), but changing the GUI Bean usage is not as easy.
>If you can make suggestions on alternative Bean implementations, please
>let us know.
>However, it should still be possible to use the EvA2 API for
>optimization without the GUI, since the core optimization classes do not
>depend on Java beans. So you should still be able to run the API example
>from the short documentation, for instance.
>
>Best wishes,
>  Marcel Kronfeld
>

Hello,

thanks for your reply. Yes using the sun jdk 1.6 would solve the problem for the moment, but in further releases (sun jdk 1.7) this code will be removed.  Furthermore these classes are not standard java API, they are just packaged by sun. That means also that your code will only run on x86 and amd64 platforms. This problem is also valid on ubuntu and with the gcj compiler, so it is not a gentoo specific one. So if you would like that your code also run in further VM's you should think about rewriting them and using standard java. As alternative for the jpeg implementation you could use, javax.imageio.plugins.jpeg; see also for example here:

http://developer.classpath.org/mediation/ClasspathMigration#head-d4ee9efe53a641e29ffdcd96e985bf38bbc671c1

But the real problem are the errors, which came from the sun.beans.editors.*:

    [javac] /tmp/work/src/eva2/gui/PropertyBoolSelector.java:19: cannot find symbol                                                                  
    [javac] symbol  : class BoolEditor                                                                                                                                            
    [javac] location: package sun.beans.editors                                                                                                                                   
    [javac] import sun.beans.editors.BoolEditor;

I've found out that rt.jar from icedtea6 contains the editor classes, but I have no idea how to make them visible to the java compiler:

    jar tvf /opt/icedtea6-bin-1.6.2/jre/lib/rt.jar | grep editor
  1622 Tue Nov 10 21:08:40 CET 2009 sun/beans/editors/BooleanEditor.class
  1087 Tue Nov 10 21:08:40 CET 2009 sun/beans/editors/ByteEditor.class
  6187 Tue Nov 10 21:17:06 CET 2009 sun/beans/editors/ColorEditor.class
   653 Tue Nov 10 21:08:40 CET 2009 sun/beans/editors/DoubleEditor.class
  3892 Tue Nov 10 21:08:40 CET 2009 sun/beans/editors/EnumEditor.class
  1075 Tue Nov 10 21:08:40 CET 2009 sun/beans/editors/FloatEditor.class
  6226 Tue Nov 10 21:17:06 CET 2009 sun/beans/editors/FontEditor.class
   657 Tue Nov 10 21:08:40 CET 2009 sun/beans/editors/IntegerEditor.class
  1069 Tue Nov 10 21:08:40 CET 2009 sun/beans/editors/LongEditor.class
   581 Tue Nov 10 21:08:40 CET 2009 sun/beans/editors/NumberEditor.class
  1093 Tue Nov 10 21:08:40 CET 2009 sun/beans/editors/ShortEditor.class
  1660 Tue Nov 10 21:17:06 CET 2009 sun/beans/editors/StringEditor.class

If I want to run the binary jar from the website (as compiling the sources does not work) with VM from icedtea6, I run into the following problems:

$ java -cp EvA2Base.jar eva2.client.EvAClient
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: sun/beans/editors/IntEditor
        at eva2.gui.PropertyEditorProvider.installEditors(PropertyEditorProvider.java:155)
        at eva2.gui.JParaPanel.makePanel(JParaPanel.java:44)
        at eva2.gui.EvATabbedFrameMaker.makePanel(EvATabbedFrameMaker.java:56)
        at eva2.client.EvAClient.loadSpecificModule(EvAClient.java:776)
        at eva2.client.EvAClient.loadModuleFromServer(EvAClient.java:696)
        at eva2.client.EvAClient.init(EvAClient.java:334)
        at eva2.client.EvAClient.access$0(EvAClient.java:296)
        at eva2.client.EvAClient$1.run(EvAClient.java:253)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:602)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Caused by: java.lang.ClassNotFoundException: sun.beans.editors.IntEditor
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
        ... 16 more

Anyhow I will try to use the binary from the website in the commandline without the GUI in the mean time.

Best regards,
Oliver Borm
___________________________________________________________
NEU: Mit WEB.DE DSL über 1000,- ¿ sparen!
http://produkte.web.de/go/02/


More information about the EvA mailing list