|
|
Classification: |
Java |
Category: |
JNI |
Created: |
06/14/99 |
Modified: |
09/02/2001 |
Number: |
FAQ-0235 |
Platform: |
ER5 |
|
Question: I've compiled the PowerInfo JNI example in the SDK and run it successfully from a DOS command line, but when I try to run
it from the emulator shell by selecting and clicking PowerInfo.class, I get an unsatisfiedLinkError for the native method
ExternalPowerPresent.
Answer: You are likely running the wrong version of the emulator. When you install the Java SDK, the batch files e32-sys.bat. e32-vga.bat
and e32-lrg.bat in the \epoc32\tools directory, which are used to launch the emulator from the Windows Start Menu, are written
(or overwritten) to specify \rel rather than \deb. This is because use of the rel version of the emulator is preferred for
debugging pure Java apps. But the native code for the PowerInfo JNI example gets placed on the path of the deb, rather than
the rel, version of the emulator. If you were able to compile the PowerInfo app you presumably have installed your Java SDK
on top of an ER5 C++ SDK so have access to a debug version of the emulator at \epoc32\release\wins\deb\epoc.exe. Launching
this should allow you to run the PowerInfo example from the emulator shell.
|
|
|