Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Problem In JNI

4 replies · 2,575 views · Started 25 June 2003

Hello Everyone,

I am developing a simple JNI application for P800.
while using make i am getting following exception,

Exception in thread "main" java.lang.NoClassDefFoundError: com/symbian/util/ArrayEnumerator
at
at com.symbian.tools.jniexports.Tool.getJNIMethods(Tool.java:111)
at com.symbian.tools.jniexports.Tool.run(Tool.java:56)
at com.symbian.tools.util.ToolBase.run(ToolBase.java:29)
at com.symbian.tools.jniexports.Main.main(Main.java:22)

But then too dll is generated.

I am placing dll,class,header,txt,map,app files in the sis file.

Everything is placed in system\apps\JNIDemo directory.

But then i can't run the program.

If i remove jni part from the java file, i am being able to run the application..

Is it because i have placed dll file in wrong directory ??
what is the path where i should place the dll file.

Thanks,

Chintan

[quote="c.oza"]Hello Everyone,

I am developing a simple JNI application for P800.
while using make i am getting following exception,

Exception in thread "main" java.lang.NoClassDefFoundError: com/symbian/util/ArrayEnumerator
at
at com.symbian.tools.jniexports.Tool.getJNIMethods(Tool.java:111)
at com.symbian.tools.jniexports.Tool.run(Tool.java:56)
at com.symbian.tools.util.ToolBase.run(ToolBase.java:29)
at com.symbian.tools.jniexports.Main.main(Main.java:22)

But then too dll is generated.

I am placing dll,class,header,txt,map,app files in the sis file.

Everything is placed in system\apps\JNIDemo directory.

But then i can't run the program.

If i remove jni part from the java file, i am being able to run the application..

Is it because i have placed dll file in wrong directory ??
what is the path where i should place the dll file.

Thanks,

Chintan[/quote]

Hello, this looks like a build time problem. Some class files needed are missing in the epoc32 tools folder. That was a problem on earlier UIQ SDK versions.

Are you using the downloadable UIQ SDK version from the Mobilityworld site ? It is the only version that allows JNI builds (some managed to do that also with the Beta CD) . A version following the Beta came with various missing files and incorrect makefiles. This has later been corrected by UIQ (May 27) in the files available for download at:
http://www.ericsson.com/mobilityworld/sub/open/technologies/epoc/tools/7_uiq

You need to make sure that (1) after successfully downloading the UIQ SDK parts and (2) unpacking them with the correct WinZip version,
(3) Installing the UIQ SDK, that you then (4) download and unpack the 12 Mbyte update and then install it. After this you should have a working UIQ SDK for allowing JNI builds.

Hi,

My personal java app displays the usual "starting" message but does nothing.
I have the latest UIQ 2.1 SDK downloadedform "www.Symbian.com" with the latest update.
( I could not find the file in the link provided by you. I am getting "resource not found" error )
The personal java application doesnot call the native methods. I was just opening a console
and wirting some string into it. I have no clue as to if there is a problem in
loading the .dll or some where else. I created my .dll in line with the "InfoPrint1"
example in the UIQ SDK documentation. I have no idea whats going on. Please help.

Narendra

Hello!

I am developing a simple JNI application and I don�t know how can I generate the .dll�files from Visual C++ 6.0. Please Help me!

Hi,
Try to place dll file in system\libs\ folder.

Thanx.
Toseef

c.oza wrote:Hello Everyone,

I am developing a simple JNI application for P800.
while using make i am getting following exception,

Exception in thread "main" java.lang.NoClassDefFoundError: com/symbian/util/ArrayEnumerator
at
at com.symbian.tools.jniexports.Tool.getJNIMethods(Tool.java:111)
at com.symbian.tools.jniexports.Tool.run(Tool.java:56)
at com.symbian.tools.util.ToolBase.run(ToolBase.java:29)
at com.symbian.tools.jniexports.Main.main(Main.java:22)

But then too dll is generated.

I am placing dll,class,header,txt,map,app files in the sis file.

Everything is placed in system\apps\JNIDemo directory.

But then i can't run the program.

If i remove jni part from the java file, i am being able to run the application..

Is it because i have placed dll file in wrong directory ??
what is the path where i should place the dll file.

Thanks,

Chintan