hai Juergen
thanx for ur reply,
when i compile the program after changing this line
Juergen Kreileder > you have to use JavaVMInitArgs instead of JDK1_1InitArgs.
gcc -O -I/usr/local/j2sdk1.3/include
-I/usr/local/j2sdk1.3/include/linux/
-L/usr/local/j2sdk1.3/jre/lib/i386/classic
-ljvm invoke.c -lpthread -D_REENTRANT
its giving me the error
invoke.c : in function 'main':
invoke.c:29 : structure has no member named 'classpath'
invoke.c:30 : structure has no member named 'classpath'
then i changed it back to its original then compiled it back , with a new error
/usr/local/j2sdk1.3/jre/lib/i386/classic/libjvm.so: undefined reference to
`jdk_pthread_sigmask'
collect2: ld returned 1 exit status
then i changed the command to
gcc -O -I/usr/local/j2sdk1.3/include
-I/usr/local/j2sdk1.3/include/linux/
-L/usr/local/j2sdk1.3/jre/lib/i386/client
-ljvm invoke.c -lpthread -D_REENTRANT
bcos i got that libjvm.so file was there in /client,/server,/classic so i changed it
there was no compilation problem but when i run this
# ./a.out
./a.out: error in loading shared libraries: libjvm.so: cannot open shared object
file: No such file or directory
same with server ...
and one more thing
Juergen Kreileder > Our 1.3 includes j2sdk-config which may help you with this:
Juergen Kreileder > % j2sdk-config --cflags -D_REENTRANT -D_GNU_SOURCE
-I/usr/lib/j2sdk1.3/include -I/usr/lib/j2sdk1.3/include/linux
Juergen Kreileder > % j2sdk-config --libs -L/usr/lib/j2re1.3/lib/i386/client -ljvm
-lpthread
i tried
% j2sdk-config --cflags -D_REENTRANT -D_GNU_SOURCE -I/usr/lib/j2sdk1.3/include
-I/usr/lib/j2sdk1.3/include/linux
% j2sdk-config --libs -L/usr/lib/j2re1.3/lib/i386/client -ljvm -lpthread
its giving me command usage
Usage: j2sdk-config [VMTYPE] [OPTIONS]
VM Type:[-hotspot][-server][-classic][-native][-green]
Options:[--javahome][--version][--ext-dir][--cflags][--libs][--ld-library-path]
i want to know in these commands
% j2sdk-config --cflags -D_REENTRANT -D_GNU_SOURCE
-/usr/lib/j2sdk1.3/include
^^^
-I/usr/(lib)/j2sdk1.3/include/linux
^^^
% j2sdk-config --libs
-L/usr/(lib/j2re1.3/)lib/i386/client -ljvm -lpthread
^^^^^^^^^^^
where i dont have these file in that /usr/lib directory, do i need to copy them or do
we need separate files for that,
i tried it with changing /USR/LIB to /USR/LOCAL where my j2sdk is located
but still the same problem
i installed j2sdk-1.3.0-RC1-linux.1386.tar.bz2
first i copied it to /usr/local then i double clicked on the file where i got j2sdk1.3
i have removed the kaffee related java commands from /usr/bin directory then in
/usr/bin i created a symbolic link with
ln -s /usr/local/j2sdk1.3/bin/java /usr/bin/java , such that every user can access
this command
is my way correct ?
running java programme's no problem , running java native programmes no problem ,
but c ivoking jvm i cannot , i think with ur help i can do that.
please help me out.
waiting for ur reply
regards
Sreenivas
_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]