JNI Not write once run anywhere But...

I have written a program that I put into C++ for speed reasons. I now want to use the JNI to

a) Get familiar with the JNI

b) To merge a Java GUI and speedy code together.

I've read that if you use the JNI then you cannot run your program everywhere. But I thought about programs written in C/C++ that do run everywhere, with respect to say the OS.

So isn't it possible to still have that via the JNI?

[433 byte] By [java4life87a] at [2007-11-27 11:59:28]
# 1

> I have written a program that I put into C++ for

> speed reasons.

So, you measured the speed of a Java prototype and a C++ prototype and found the Java version to be significantly slower?

Or you just assumed it would be?

> I've read that if you use the JNI then you cannot run

> your program everywhere. But I thought about programs

> written in C/C++ that do run everywhere, with respect

> to say the OS.

You may be able to use the same C/C++ source code, depending on what it's doing, but you'll at least have to recompile the native code. A Windows DLL can't be used on a Linux box.

jverda at 2007-7-29 19:25:48 > top of Java-index,Java Essentials,Java Programming...