Helder Magalhães wrote:
>> $ squiggle
>> Exception in thread "main" java.lang.UnsupportedClassVersionError:
>> Bad version number in .class file
>
> Weird, sounds like you are hitting a JRE/JDK version
> conflict. Try cleaning your local working copy - I'm
> assuming a SVN check out - (using "build clean") and then
> try building/running squiggle again (using "build squiggle"
> for example).
This happens when I try to run the Ubuntu-packaged (off-the-
shelf) version of Squiggle (from the libbatik-java package)
under sun-java5-jdk. Both, with/without root permissions:
$ sudo squiggle
Exception in thread "main" java.lang.UnsupportedClassVersionError:
Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
...etc...
I am not interested in running any particular Java version.
I just read somewhere that the problem shouldn't happen with
sun-java5-jdk, that's why I tested it. But sun-java6-jdk
(Ubuntu off-the-shelf) doesn't work either. It pops up the
splash screen on start, but then hangs, giving the following
output on the command line (both, with/without sudo):
$ sudo squiggle
java.security.AccessControlException: access denied
(java.net.NetPermission setDefaultAuthenticator)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
...etc...
I made completely sure, I have only 1 java version installed,
purging all unneeded packages with aptitude. I purged/re-
installed the libbatik-java package before testing with a
new java version.
>> $ java -jar batik-squiggle.jar
>> Locking assertion failure. Backtrace:
>
> May you be trying to run this in some privileged directory?
> Have you tried executing with root permissions (using
> "sudo java ...") mostly to for sure? This may also help
> clarifying if it's not just some obscure Java/Batik
> permission setting.
No, I'm working in a "normal" subdirectory in my home, with
complete rwx permissions. Actually, I am working inside
the batik-1.7 installation dir, where I also copied the
SVG file I am trying to run. (Just to make sure it's not a
path problem.)
I have no idea how to change any of those Java security or
permission settings, so I never touched any of these.
(Wouldn't even know where to do that.) I am actually working
on a quite fresh Ubuntu installation, that is only a few
weeks old. So, I guess the settings should be just the
default ones.
Since I am still unable to even start the ubuntu version
of squiggle, I donwloaded/checked/installed the
batik-1.7.zip release again from the Apache site. With
sun-java5-jdk, the Squiggle window opens, shows the first
frame, and then pops up errors at one-second intervals [1]:
SVG Error:
access denied (java.io.FilePermission /home/jerzy/batik-1.7/frame1.png read)
It shows errors for all frames except the first one (ie
'frame1.png', frame2.png', 'frame3.png'). The same behaviour
both, with/without sudo. At the same time, I get the
following message on the command line:
$ sudo java -jar batik-squiggle animation.svg
Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb24047c7]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb2404891]
#2 /usr/lib/libX11.so.6(_XReply+0x254) [0xb14ba494]
...etc...
With sun-java6-jdk I get exactly the same behaviour (both,
with/without root access), except on the command line. With
Java 6, there are no errors on the command line, only the
sequel of access denied pop-ups in the application window.
[1] The file I am trying to open is 'animation.svg', which
was kindly provided by Cameron McCormack:
<svg width="400" height="300"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<image xlink:href="frame0.png" width="100" height="100">
<animate attributeName="xlink:href"
values="frame0.png; frame1.png; frame2.png; frame3.png"
calcMode="discrete" dur="4s" repeatDur="indefinite"/>
</image>
</svg>
I hope, this information helps...