C
cppaddict
Hi,
I'm learning JNI, and I went through the steps of this tutorial
verbatim to create the sample HelloWorld app:
http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/index.html
I got everything to compile correctly (both the java and the native
..dll) but I get an error when I run the program with "java
HelloWorld".
The error is:
The application or DLL C:\Borland\JNI\hello.dll is not a valid Windows
image. Please check this against your installation diskette.
Also, the command line output is:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
C:\Borland\JNI\hello.
dll: %1 is not a valid Win32 application
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at HelloWorld.<clinit>(HelloWorld.java:5)
Does anyone know what might be going wrong?
Thanks,
cpp
PS: The application was compiled using borland's bcc32 on WindowsXP.
I'm learning JNI, and I went through the steps of this tutorial
verbatim to create the sample HelloWorld app:
http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/index.html
I got everything to compile correctly (both the java and the native
..dll) but I get an error when I run the program with "java
HelloWorld".
The error is:
The application or DLL C:\Borland\JNI\hello.dll is not a valid Windows
image. Please check this against your installation diskette.
Also, the command line output is:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
C:\Borland\JNI\hello.
dll: %1 is not a valid Win32 application
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at HelloWorld.<clinit>(HelloWorld.java:5)
Does anyone know what might be going wrong?
Thanks,
cpp
PS: The application was compiled using borland's bcc32 on WindowsXP.