I'm encountering a rather serious problem using the jni with
Blackdown-1.3.0-FCS (kernel 2.2.14, SuSE 6.4) . The problem is actually
causing problems in my system as a whole. I suspect it has to do with
memory allocation , and it would help to have some information about how
memory for jni is al
At 1:20 01 Jan 2001 +0530, Dushyanth Harinath wrote:
> Iam trying to use a existing c library and build a java based interface for
> it.I have written a java program for this and created the corresponding
> header file and i have also written a c file to execute the native methods.
> while compi
Ho guys,
Iam trying to use a existing c library and build a java based interface for
it.I have written a java program for this and created the corresponding
header file and i have also written a c file to execute the native methods.
while compiling through gcc it doesnt give me any errors and the
Thank you Nathan,
You were right. I thought if you use C++ files the linker picks up
correct libraries automatically - not yet.
Anyway, your answer reminds me how great our listserver is.
Thank you again,
Jacob Nikom
Nathan Meyers wrote:
>
> On Fri, Nov 19, 1999 at 06:44:48PM -0500, Jacob
On Fri, Nov 19, 1999 at 06:44:48PM -0500, Jacob Nikom wrote:
> I am writing JNI application called MainPanel using Java, C++ and
> a bit of C. It compiles and links without problem, but when I run
> it, it crushes with the message...
My guess is that you linked your shared library using gcc ins
Hi,
Using:
Linux 2.2.9, Debian potato (glibc 2.1 - hence green threads),
with your jdk 1.2 pre-release-v1
I have a bit of a problem with JNI and a fairly complex program I'm in
the middle of writing. What it basically does is accept requests on a
specific network port, accepts clients
Wes Biggs wrote:
>
> optima wrote:
>
> > cc -G NativeHello.c NativeHelloImp.c -o libHello.so
> > ,I encount a problum
> > "cc: unrecognized option `-G'
> > /usr/lib/crt1.o(.text+0x36): undefined reference to `main'"
The problem is that there is no "-G" option to gcc. If you want to build
optima wrote:
> cc -G NativeHello.c NativeHelloImp.c -o libHello.so
> ,I encount a problum
> "cc: unrecognized option `-G'
> /usr/lib/crt1.o(.text+0x36): undefined reference to `main'"
> before I do this ,I had copy the include file of java/include into
> /usr/include ,and I copy the *.h in
I have been develop java program for a serveral days.But I havn't have a
success test with the java native include in linux on my redhat 5.1 with
jdk1.1.7. when I complied the c impliction code
with gcc
as :
cc -G NativeHello.c NativeHelloImp.c -o libHello.so
,I encount a problum
"cc: unrec
Hi,
I am writing JNI application called MainPanel using Java, C++ and
a bit of C. It compiles and links without problem, but when I run
it, it crushes with the message:
prompt>java -green MainPanel pixelbuf
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/homes/nikom/work/libStere
The error you were getting is solved by giving the linker (ld) the location
of the library that defines the symbol that the loader is looking for. This
is accomplished with the '-f name' option, similar to the following:
ld -G -f /usr/lib/libuuid.so UUID.o -o libjava-rlt-uuid.so
Hi Denis.
You should build your library using g++ instead of ld.
The reason is that g++ links additional object files that
are essencial for a library to work well (namely, crtbegin.o,
crtend.o, crti.o, and crtn.o).
Try:
g++ -fPIC -I[jdk-root]/include -I[jdk-root]/include/genunix Load.cc Load.
I am making a viewing program that needs to acces C(++)-code. I have compiled
a Native library (libLoad.so) by means of the following commands :
g++ -fPIC-c -I[jdk-root]/include -I[jdk-root]/include/genunix Load.cc Load.o
ld -shared Load.o -o libLoad.so
When I run my java-program the following e
Mark Fardal wrote:
>
> > What happens if you use the debug version of the java interpreter (java_g)?
> >
> > Steve
> >
>
> The result is the same as was reported with 1.1.5, it reads a single string
> and returns fine.
>
> weka:native[ 996 ] java_g Prompt
> Type a line: hi there
> A diagnostic
> What happens if you use the debug version of the java interpreter (java_g)?
>
> Steve
>
The result is the same as was reported with 1.1.5, it reads a single string
and returns fine.
weka:native[ 996 ] java_g Prompt
Type a line: hi there
A diagnostic message...
User typed: hi
This is cor
Mark Fardal writes:
>
> Hi,
>
> The example (Prompt) of how to pass and return arguments
> from C routines exits:
>
> weka:native[ 863 ] java Prompt
> Type a line: hi there
> SIGSEGV 11* segmentation violation
> stackbase=0xb920, stackpointer=0xb7bc
>
> I'm runni
"Works" on Steve Byrne's jdk1.1.5v7 (except seems to pick up the string
only to a space, not end of line...):
[user@ravel native]$ java Prompt
Type a line: Hi there
User typed: Hi
[user@ravel native]$ java Prompt
Type a line: Hithere
User typed: Hithere
Hope it helps.
Bob L.
--
Robert Lynch-B
Hi,
I'm trying to learn the JNI using the Java Tutorial and the JDK docs,
since the books I have don't cover it at all. Mostly things are ok,
I can call Java from C and vice versa and have passed some arguments
successfully. However, I did get an error when trying to run one of
the Tutorial's
18 matches
Mail list logo