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

error in using jsr-82

1 replies · 1,875 views · Started 02 November 2004

Dear all,

I am recently writing java application which require using bluetooth api
(JSR-82). During the compilation, the program works fine. Unfortunately,
when I try to run it with the emulator, error does come up. I have tried
different classpath setting already. But the problem still can't be solved.
Following is the details:
_epoc_drive_j=C:\Symbian\UIQ_21\epoc32\Java\
_epoc_drive_t=C:\Symbian\UIQ_21\erj

classpath =.;C:\Symbian\UIQ_21\epoc32\java\lib\classes.zip;C:\Symbian\UIQ_21\epoc32\java\
lib\emptyapi.zip;C:\Symbian\UIQ_21\erj\classes;C:\Symbian\UIQ_21\erj\ext\qaw
t.jar;C:\Symbian\UIQ_21\erj\ext\util.jar;C:\Symbian\UIQ_21\erj\ext\btapi.jar
;C:\Symbian\UIQ_21\epoc32\java\ext\javaphone.jar;

command used for compile : "javac -target 1.1 *.java"
command used for running emulator: "pjava_g -cp t:\PrintClient PrintClient"
error : "Exception in thread "main" java.lang.NoClassDefFoundError:
javax/bluetooth/DiscoveryListener"

This program I am doing is the example in JSR82-spec_1.0a.pdf

can anyone spot any error in my work??
thank you very much!

Hello,

Since you have used -cp option in the command, "pjava_g -cp t:\PrintClient PrintClient", the settings you have provided in the set classpath command is overriden.
Either include the entire classpath settings in the -cp option or remove the -cp option from the command and run it.

cheers
Ajith