UnsupportedClassVersionError in DoubleFFT_2D

30 views
Skip to first unread message

Andreas Ipp

unread,
May 29, 2012, 5:00:38 AM5/29/12
to open...@googlegroups.com
When trying to test Kirill's latest code changes, I'm getting the UnsupportedClassVersionError (see below).

Is it only me, or do others see this as well? 

It seems I can fix it by changing source and target to 1.7 (instead of 1.5) in pom.xml:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>

But I wonder why this is necessary now? I think in the past it used to work with 1.5.

Kirill, did you have to do the same change to pom.xml in order for your code to work? Or is there some other way how I can fix this?

----------
Exception in thread "main" java.lang.UnsupportedClassVersionError: edu/emory/mathcs/jtransforms/fft/DoubleFFT_2D : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.openpixi.pixi.physics.fields.PoissonSolverFFTPeriodic.solve(PoissonSolverFFTPeriodic.java:31)
at org.openpixi.pixi.physics.grid.Grid.set(Grid.java:247)
at org.openpixi.pixi.physics.grid.Grid.<init>(Grid.java:222)
at org.openpixi.pixi.physics.grid.GridFactory.createSimpleGrid(GridFactory.java:17)
at org.openpixi.pixi.physics.Simulation.<init>(Simulation.java:70)
at org.openpixi.pixi.physics.InitialConditions.initRandomParticles(InitialConditions.java:65)
at org.openpixi.pixi.ui.Particle2DPanel.<init>(Particle2DPanel.java:111)
at org.openpixi.pixi.ui.MainControlApplet.<init>(MainControlApplet.java:443)
at org.openpixi.pixi.ui.MainControlApplet.main(MainControlApplet.java:816)

Andreas Ipp

unread,
May 29, 2012, 5:07:36 AM5/29/12
to open...@googlegroups.com
Oh, I see. Jan, when you uploaded the JTransforms library to maven, you required it to be compiled with Java 1.7, so any application depending on that library must use Java 1.7 or higher. (pom file contained in JTransforms-2.4.jar)

I think the original JTransforms library didn't have this restriction. How difficult would it be to update the Maven repository to allow for previous Java versions down to 1.5?

Jan Kis

unread,
May 29, 2012, 5:29:53 AM5/29/12
to open...@googlegroups.com
I will ask around on the forum how to do that.

Andreas Ipp

unread,
May 29, 2012, 9:51:54 AM5/29/12
to open...@googlegroups.com
I changed the Java version in the main branch to 1.7, so that further development is not hindered.

Once the JTransforms library is available for 1.5, we can switch back.


Am Dienstag, 29. Mai 2012 11:29:53 UTC+2 schrieb Jan Kis:
I will ask around on the forum how to do that.

Reply all
Reply to author
Forward
0 new messages