2

Is there any way, without using TWebBrowser, to load a java applet in a Delphi form and interact with it?

Theres a page which contains a applet that I want to show inside my Delphi app (in a particular form) and after the user close it (or do any other operation) I want to interact with it (getting some details about what user did).

I know that TWebBrowser is capable of loading a java applet, but it will not let me interact and get what I need.

Similar thing can be done with a .Net assembly, but I have not seen anything like it using a java applet.

Edit:

As @PA pointed out:

"it will not let me interact" ... well, that's the actual reason for browsers running java applets inside a sandbox

Well .. that was not what a meant. I meant I am not able to get a value from a edit (for example) as I am able to do with other languages. I know that java runs inside a VM, but .Net runs as well and i am able to interact with .Net using some COM and stuff like that.

2
  • 1
    "it will not let me interact" ... well, that's the actual reason for browsers running java applets inside a sandbox. Commented Mar 30, 2011 at 16:52
  • It seems you have to interface to the Java plugin to be able to do something like this. Commented Mar 30, 2011 at 17:24

2 Answers 2

1

I think the only way to use Java Applets in Delphi programs wihtout TWebBrowser is to use ActiveX technology. May be this link from google can help you: http://www.oracle.com/technetwork/java/index-jsp-141438.html

Sign up to request clarification or add additional context in comments.

2 Comments

Ok, it seems nice. But can you elaborate your answer, maybe with a small example?
download.oracle.com/javase/1.4.2/docs/guide/beans/axbridge/… - here you can see a complate instruction how to create activex-controls from applets - this process likely can be automated, after adding created activex-control you can communicate with it in a standart COM-style way
0

May be you should take a look at Java Native Interface (JNI) technology. For example, you can find its Delphi implementation here.

2 Comments

The source code is very old and does not work in Delphi 2010.
It is sad to hear, the last time I was faced with JNI in Delphi 2006.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.