This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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: 41599
    
  55
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.


Ping & DNS - my free Android networking tools app
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: 41599
    
  55
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