wood burning stoves 2.0*
The moose likes Applets and the fly likes Using Reflection API on a running applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Using Reflection API on a running applet" Watch "Using Reflection API on a running applet" New topic
Author

Using Reflection API on a running applet

Angus Rose
Ranch Hand

Joined: Jun 21, 2002
Posts: 56
Hi All,
I'm currently writing an applet for a project. What I want to do is inspect the applet while it is running in a browser using the Reflection API for the purpose of system testing. Is this possible?

Angus
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42927
    
  68
The code doing the reflection needs to live in the same JVM as the one being reflected - connecting from the outside is not possible. Other possibilities to inspect a running JVM include JMX(although your applet needs to be especially written to support that), or JVMTI, which is a low-level interface meant for debugging and profiling.
Angus Rose
Ranch Hand

Joined: Jun 21, 2002
Posts: 56
The test scenario that my boss has come up with is to deploy the applet to our dev server and then to run it on a client machine's browser and to then use Reflection to control the running of the applet. Is this possible?

Thanks

Angus
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42927
    
  68
This seems to be the same question as before, to which the answer is 'no'. It does not matter where the applet is served from, and where it is served to. Am I missing something?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using Reflection API on a running applet