Hi,
I've written my source code in C++. I want to link it with an applet which will accept the input and show the output. Is it possible or, do i have to convert my source code to java
Linking C++ and Java
Started by strowa65, Dec 05 2007 02:17 AM
3 replies to this topic
#1
Posted 05 December 2007 - 02:17 AM
|
|
|
#2
Posted 05 December 2007 - 03:44 PM
I'm not sure it can be done via an applet because the class files are downloaded locally.
You can link it into a Java application via JNI but unless you have a load of code I wouldn't bother and would rewrite it in Java.
You can link it into a Java application via JNI but unless you have a load of code I wouldn't bother and would rewrite it in Java.
#3
Posted 05 December 2007 - 09:21 PM
it is nearly 1000 lines of code...and i know just the basics of java, so will learning JNI take time? I have a deadline too...
#4
Posted 05 December 2007 - 11:52 PM
That's probably borderline. JNI is doable but like I said, it doesn't work with applets.
Interfacing C with Java in Linux - The JNI Solution
That shows you how to link C code with Java. Shouldn't be too difficult to expand it to C++.
Putting a Java Interface on your C, C++, or Fortran Code
Here's another guide that works in more general terms.
Interfacing C with Java in Linux - The JNI Solution
That shows you how to link C code with Java. Shouldn't be too difficult to expand it to C++.
Putting a Java Interface on your C, C++, or Fortran Code
Here's another guide that works in more general terms.


Sign In
Create Account

Back to top









