FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

java4cpp/examples/NativeRunnable/README.md at java4cpp-1.1 · wshackle/java4cpp · GitHub

Latest commit

 

History

History
17 lines (9 loc) · 645 Bytes

File metadata and controls

17 lines (9 loc) · 645 Bytes

NativeRunnable Example

This provides an example where a C++ class is created to implement a Java Interface.

The script build.sh builds and runs the example. The script clean.sh deletes all files created by build.sh.

The build script sets up the implementation so it can be used from either C++ or Java.

The argument to java4cpp --natives NativeRunnable=java.lang.Runnable tells java4cpp to generate a stub java class that will be implented in C++.

nr.cpp implements this class.

main.cpp creates an intsance of NativeRunnable and passes it as an argument to a Java class that will then callback to the C++ class.


Back | FazBrowse Home | New Git URL