You are here:

C++/How to connect C++ application to Javascript functions?


Good day Sir Eddie,

I know that C++ and Visual C++ are a bit different but because C++ is a strongly typed language, there is a big possibility for me to acquire answers from you even if I am using Visual C++ MFC.

I tried to searched on the net about the topic but there are no relevant answers to my question.

Is it possible to connect C++ to Javascript functions? Let us say you have these few lines of codes in html...
FILENAME: hello.html
<script language="Javascript">
function MyMessage()
alert("Hello World");

... and I wish to connect my C++ application to my html file. How do I establish connections using C++ codes? Please help.

Thanks in advance and God Bless,

Hello Paolo, thank you for the question.

I've never done this before. However, I know that it can be done by writing JNI bindings that can translate from Java into C++. I have no idea how to do it, but some of our Java experts might know. I have heard of an application called NoodleGlue that is supposed to help with this, but I've never used it.

You should try asking our Java experts this question. They will probably be more knowledgable than I.

- Eddie


All Answers

Answers by Expert:

Ask Experts




I can answer questions about the C++ language, object oriented design and architecture. I am knowledgable in a lot of the math that goes into programming, and am certified by I also know a good deal about graphics via OpenGL, and GUIs.


I have completed numerous games and demos created with the C++ programming language. Currently employed as a software engineer in the modeling and simulation field. I have about 7 years experience.

©2017 All rights reserved.

[an error occurred while processing this directive]