Hi All,
I’m starting some experiments writing java code to connect to an Ingres database.
I’m using a Linux box to develop.
I’ve set CLASSPATH to $II_SYSTEM/ingres/lib/iijdbc.jar:.
The initial code compiles OK with javac, but when I attempt to execute the class I get:
Exception in thread "main" java.lang.ClassFormatError: com.ingres.jdbc.IngresDriver (unrecognized class file version)
Any ideas what I’m missing?
Marty
Hi Roy,
java --version
java version "1.4.2"
gij (GNU libgcj) version 4.1.1 20070105 (Red Hat 4.1.1-52)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
javac -version
Eclipse Java Compiler v_677_R32x, 3.2.1 release, Copyright IBM Corp 2000, 2006. All rights reserved.
Marty
From: Martin Bowes [mailto:martin...@ctsu.ox.ac.uk]
Sent: 14 May 2012 13:56
To: info-...@kettleriverconsulting.com
Subject: [Info-Ingres] Newby Java connection issue
Hi All,
I’m starting some experiments writing java code to connect to an Ingres database.
I’m using a Linux box to develop.
I’ve set CLASSPATH to $II_SYSTEM/ingres/lib/iijdbc.jar:.
The initial code compiles OK with javac, but when I attempt to execute the class I get:
Exception in thread "main" java.lang.ClassFormatError: com.ingres.jdbc.IngresDriver (unrecognized class file version)
Any ideas what I’m missing?
Marty
What version of Java are you using? Is it possible you’re picking up javac from a later version than java itself?
Java –version
Javac -version
Ok a fresh install: yum install *jdk* and suddenly java and javac have the same version and the test program is now working!
Hurrah!
Marty