I'm working with an existing Java codebase which, while it can be invoked from an HTML page using an <APPLET> tag, does not actually subclass the Applet class. The same jars are also used in a non-browser context, so they did not subclass Applet.
Is there either:
- a way to use JSObject from something which isn't an Applet subclass?
Asked by: Fiona192 | Posted: 23-01-2022
JSObject.getWindow(this) in the applet. Then pass the
JSObject into the code that needs it in the usual fashion.
I think you're actually going to need to implement an applet in a jar file to handle the communication between your code and the browser itself. Perhaps just use the non-applet jar as a class lib and make the applet jar a simple wrapper that proxies your calls between the browser and the Java code.Answered by: Dominik415 | Posted: 24-02-2022
What's wrong with returning a value?
Still can't find your answer? Check out these amazing Java communities for help...
Java Reddit Community | Java Help Reddit Community | Dev.to Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)