participate


Java Programming - Getting Data from Compiled Application
This question is not answered.

<<   Back to Forum  |   Give us Feedback
5 Duke Stars available
This topic has 14 replies on 1 page.
pm-lemos
Posts:4
Registered: 11/2/09
Getting Data from Compiled Application   
Nov 2, 2009 1:27 PM
 
 
Hi people,

I'm not sure if this post is in the right forum, but either way here it goes...

Question:
I'm wondering if there is anyway that makes possible getting data (variables values and other) from a java compiled application?
If more details needed, please ask!

Any help appreciated!
Thanks in advance.
 
JoachimSauer
Posts:8,238
Registered: 1/8/04
Re: Getting Data from Compiled Application   
Nov 2, 2009 2:12 PM (reply 1 of 14)  (In reply to original post )
 
 
Yes, there are ways to do that.

If you want a more specific question, you'll need to provide a much more specific question.
 
pm-lemos
Posts:4
Registered: 11/2/09
Re: Getting Data from Compiled Application   
Nov 2, 2009 5:21 PM (reply 2 of 14)  (In reply to #1 )
 
 
Can you tell which ways are that? Can you expose them?

The purpose is to develop a Java application (A) that can access "any" other java application (B) information/variables in order to execute verifications with (B) already in use.

Thanks in advance! :)
 
paulcw
Posts:17,104
Registered: 2/22/00
Re: Getting Data from Compiled Application   
Nov 2, 2009 5:24 PM (reply 3 of 14)  (In reply to #2 )
 
 
It would help a lot if you described in more detail what you mean by "access". And if you used better grammar so I'd know what you mean by (B) -- you gave nouns but no verbs there.

It kind of sounds like you're describing a profiler. Or maybe a something like JMX. You could try googling those terms to see if they're what you're thinking of.
 
DrClap
Posts:38,751
Registered: 4/30/99
Re: Getting Data from Compiled Application   
Nov 2, 2009 9:22 PM (reply 4 of 14)  (In reply to #3 )
 
 
Or a debugger.
 
scphan
Posts:1,294
Registered: 1/9/08
Re: Getting Data from Compiled Application   
Nov 2, 2009 10:59 PM (reply 5 of 14)  (In reply to original post )
 
 
One way is through socket comm. on the local machine: http://java.sun.com/docs/books/tutorial/networking/sockets/
 
JoachimSauer
Posts:8,238
Registered: 1/8/04
Re: Getting Data from Compiled Application   
Nov 3, 2009 1:46 AM (reply 6 of 14)  (In reply to #2 )
 
 
You can assume the following:

If a user U has a computer C and runs the program A on it, then he is technically able to access any and all information that program A can access. There are ways to make that access a bit harder, but conceptually you can't really stop him. Of course the same is true for a program B that the user U runs.
 
jschell
Posts:36,985
Registered: 11/3/97
Re: Getting Data from Compiled Application   
Nov 3, 2009 11:32 AM (reply 7 of 14)  (In reply to #2 )
 
 
pm-lemos wrote:
Can you tell which ways are that? Can you expose them?

The purpose is to develop a Java application (A) that can access "any" other java application (B) information/variables in order to execute verifications with (B) already in use.

As stated along with info from the original post I doubt that is possible.

If the app can be debugged
If you manually use that to retrieve information.
Then you can retrieve a lot of information.

It would now be time for you to tell us what the real problem is that you want to solve versus us guessing.
 
Jadz_Core
Posts:629
Registered: 3/21/09
Re: Getting Data from Compiled Application   
Nov 3, 2009 12:09 PM (reply 8 of 14)  (In reply to #7 )
 
 
Sounds like reflection?..
 
jschell
Posts:36,985
Registered: 11/3/97
Re: Getting Data from Compiled Application   
Nov 3, 2009 12:10 PM (reply 9 of 14)  (In reply to #8 )
 
 
Jadz_Core wrote:
Sounds like reflection?..

No. From the OP

"that can access "any" other java application"
 
pm-lemos
Posts:4
Registered: 11/2/09
Re: Getting Data from Compiled Application   
Nov 3, 2009 5:09 PM (reply 10 of 14)  (In reply to #7 )
 
 
You're right! And I'm sorry for being so vague...

The java application (A) I'm trying to build has as objective to do some kind of verifications over other java applications (B).

Q: Why do I have asked if it's possible to access information over a compiled java application (B)?
A: Because the verification I've just talked about is to be made over data that was inputed into that (B) application as configuration/data.

Thats why I asked if it is possible to access data of a java application using another java application.

Can you guy's help me now?
(I'm still analyzing/investigating some answer that were provided until now)

thanks!
 
jschell
Posts:36,985
Registered: 11/3/97
Re: Getting Data from Compiled Application   
Nov 3, 2009 5:39 PM (reply 11 of 14)  (In reply to #10 )
 
 
Q: Why do I have asked if it's possible to access information over a compiled java application (B)?
A: Because the verification I've just talked about is to be made over data that was inputed into that (B) application as configuration/data.

Sounds like automated testing.
There are commercial tools that do that. Probably free ones as well.
 
pm-lemos
Posts:4
Registered: 11/2/09
Re: Getting Data from Compiled Application   
Nov 4, 2009 6:01 AM (reply 12 of 14)  (In reply to #11 )
 
 
You're right! That's my objective... ;)

But I want to build my own tool, to respond my desired needs.
So, can help me with that?

But if you know some existing tools (free or commercial), I'll like to know them, in order to check them ;)

thanks!

Edited by: pm-lemos on Nov 4, 2009 6:01 AM
 
paulcw
Posts:17,104
Registered: 2/22/00
Re: Getting Data from Compiled Application   
Nov 4, 2009 10:56 AM (reply 13 of 14)  (In reply to #12 )
 
 
There are lots of free open-source automated testing tools. Just Google for them.

A lot of them are also well-documented, both electronically and in printed form.
 
jduprez
Posts:1,169
Registered: 10/2/98
Re: Getting Data from Compiled Application   
Nov 4, 2009 1:07 PM (reply 14 of 14)  (In reply to original post )
 
 
I'm wondering if there is anyway that makes possible getting data (variables values and other) from a java compiled application?

[Automated testing is] my objective... ;)

the verification I've just talked about is to be made over data that was inputed into that (B) application as configuration/data.

I'm not sure of your exact need (sorry to insist in that direction):

- If you want to check the values of variables within the application, you're doing white-box testing, and unit-testing may probably be the most appropriate form (client code that knows the API of the code being tested).
- - -> Then search for unit-testing tools,jUnit will probably come first, then a few extensions, then a very few competitors.

- if you want to perform functional testing, you should merely be concerned with observable output of application B, instead of with its inner variables.
Observable output is something that goes out of the application, and may be inspected : output file, screen output, bytes sent on the network,...
A variable is only a temporary storage location, that exists only in the application working memory, but may never be output: for example, a variable may contain a correct result, but the result may be incorrectly displayed, or the wrong variable may be displayed, or...
- - -> Then search for automated functional testing tools. A few come to mind (WinRunner, QuickTestPro,...), but I have no practical experience with them.

If application B has a GUI, I dare point you to this thread for a discussion of various techniques to do unit- or functional- testing.
 
This topic has 14 replies on 1 page.
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics

About Sun forums
  • Sun Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Sun Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums