Java hints

This section includes some hints to help you with common problems when running Bank Wizard on Java.

Compiling Experian Java

When running a Java application, you may see the following or a similar exception.

Exception in thread "main" java.lang.UnsupportedClassVersionError:

uk/co/eiger/bwi/example/ExampleApp (Unsupported major.minor version 48.0)

at java.lang.ClassLoader.defineClass0(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:488)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)

This typically means that the supplied Java classes were compiled with a later version of the JDK than you are using. You must recompile the Bank Wizard Java with your own compiler.

The Examples/java/src directory on the software CD-ROM contains the source code you need to compile the core classes, examples and utilities. It also includes an example build.xml file that you can use to compile your Java using ANT.

For example, to build bwint10.jar locally:

mkdir classes

javac -d classes src/uk/co/eiger/bwi/*.java

javac -d classes src/uk/co/eiger/bwi/*.java src/uk/co/eiger/bwi/*/*.java

javac -d classes src/uk/co/eiger/bwi/*.java src/uk/co/eiger/bwi/*/*/*.java

jar cf bwint10.jar -C classes uk

The exact instructions you must use depend on your operating system and local source control or build conventions.

Java on 64 bit machines

If you see this or a similar error when running a Java program:

Error: java.lang.UnsatisfiedLinkError: /use/local/eiger/lib/libeigeru10.so:

load ENOEXEC on shared library(s)

The Java Virtual Machine has loaded the wrong version of the shared libraries, containing the JNI code.

For many 64 bit machines, a 32 bit and 64 bit variant of Bank Wizard is built. The virtual machine will either be a 32 bit executable or a 64 bit executable. For most UNIX versions of Java, start the 64 bit virtual machine using a -d64 command line option.

32/64 bit has nothing to do with the Java classes or jar files, it is referring to the shared libraries and executables.

To solve this, make sure the Bank Wizard shared libraries being used are the same as the bit variant used to run the virtual machine.

If you are using an application server, such as IBM WebSphere, you can isolate the problem by running the Java example at the command line. This removes the complexity of the application server.