General discussion

Locked

How to call C++ function/program in java

By jason ·
I try to use c++ program/function in my java program but I don't know how to call them in java. Besides, I don't know how to put them in a pacakge under different directory and call them on my working directory.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

How to call C++ function/program in java

by manoj_u_99 In reply to How to call C++ function/ ...

any c++ or c functions can be called in java using the native keyword.
the necessary header files have to be included and the function can be used with the native keyword.
i hope the answer satisfies ur need.

Collapse -

How to call C++ function/program in java

by jason In reply to How to call C++ function/ ...

The question was auto-closed by TechRepublic

Collapse -

How to call C++ function/program in java

by iceblast In reply to How to call C++ function/ ...

you can use the "native" keyword.

since u say u cannot locate the file if put in the different folder, then try this Runtime method:

public void load(String filename)

note that uhv to hv privileged to perform this operation.

hope this help solving your problem.

Collapse -

How to call C++ function/program in java

by jason In reply to How to call C++ function/ ...

The question was auto-closed by TechRepublic

Collapse -

How to call C++ function/program in java

by jason In reply to How to call C++ function/ ...

This question was auto closed due to inactivity

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums