"this plugin requires Java 1.7 or later"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

"this plugin requires Java 1.7 or later"

John Soong
I'm working on a plugin that works with RXTX (to send messages to a serial
port) but on 1.46 it complains about a major-minor version 51.0 not
supported. When I compiled a test plugin that also used a RXTX library) I
got an error saying I needed Java 1.7 or later. (1.46 curiously runs on
Java 1.6, but nor 1.43, which runs on Java 1.7?)

When I downloaded 1.43 to compile both a new plugin and an old plugin that
used RXTX, it complains about a ClassNotFound error for class files for
gnu.io.* (which are part of the RXTX library). This is weird because the
old plugin compiled fine a few months before and found the RXTX libraries
(in the jre/lib/ext and jre/bin folders) just fine.
-- --
John Riemann Soong Lüwen
Biochem, Physics UVA '13

"Every difference of opinion is not a difference of principle. We have
called by different names brethren of the same principle. We are all
Republicans, we are all Federalists." -- Thomas Jefferson

We want stuctures that serve people, not people serving structures.
(l'Odéon, mai '68)
Reply | Threaded
Open this post in threaded view
|

Re: "this plugin requires Java 1.7 or later"

dscho
Hi John,

On Mon, 9 Apr 2012, John Soong wrote:

> I'm working on a plugin that works with RXTX (to send messages to a serial
> port) but on 1.46 it complains about a major-minor version 51.0 not
> supported.

The problem is not ImageJ, but a version mismatch between the JDK* with
which the classes were compiled and the JRE^ which is supposed to run them.
As long as your JRE is *newer* than the JDK, there is not the slightest
problem.

In your case, I suspect that you compile the classes with an IDE such as
Eclipse or Netbeans and that you did not change the JDK to 1.6 but left it
at 1.7 (AKA Java7).

Two possible solutions: switch the IDE to a lower JDK, or run ImageJ with
a newer JRE.

Hth,
Johannes

* JDK = Java Development Kit (includes a JRE^)
^ JRE = Java Runtime Environment