Hi,

I am not sure this is the right list for this problem, but I thought someone
might be able to direct me to the right place.  I was hoping the maintainer
for the java package might be able to help.

I am trying out JNI programming using the linux port for jdk1.1.3 and the
new libjava.so file.  I am doing my development on a Debian System, 200 Mhz
Pentium with 32 Megs of RAM.  I have based my code completely after the
example in the Java Tutorials at Javasoft.  I am using the following line to
compile the library (I have never made shared libraries before):

gcc -shared -I/usr2/programs/jdk1.1.3/include -I/usr2/programs/jdk1.1.3/incl
ude/genunix -o libGroup.so javaQ_groups_Group.c

The file libGroup.so is generated without any warnings.  When I go to run
the java program, I get the following message:

java.lang.UnsatisfiedLinkError: setegid
   at javaQ.groups.Test.main(Test.java: 7)

The setegid is a function in the Group.java file that was declared native.
The javaQ_groups_Group.c file contains the definition for setegid (which is
only a print("Hello") currently for test purposes).   The Group.java file
(contains the class definition) has the static statement for the loading of
the library.

I have even tried the exact tutorial on JNI programming with the same
results.  I have added the directory with the libGroup.so into the
/etc/ld.so.config file and ran ldconfig.  The library is listed when I run
ldconfig -p.

I have also tried compiling with the "-fpic" flag for gcc with the same
results.

I even went to a Solaris system and tried the save thing.  I get the same
results.  Therefore, I do not believe it has anything to do with my
installation of Debian or the jdk1.1.3 files.  I just do not know what the
problem is or how to go about finding a solution.  Therefore, I have called
upon this group of knowledgeable people.

Thank you for your time and attention.

Richard A. Guay
Network Administrator
ASIC International Inc.
http://www.asicint.com
[EMAIL PROTECTED]

Richard A. Guay
Network Administrator
ASIC International Inc.
http://www.asicint.com
[EMAIL PROTECTED]


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .

Reply via email to