Solved

JXM Command Line

Posted on 2011-02-17
10
460 Views
Last Modified: 2013-11-24

 JAVA APPLICATION
I have to access a Java application as shown in the figure.  Ovals depict a click.  Last oval is a double click.  It is on a Windows server.  I am running my Bash script on Linux server.  From my Linux box, I need to access this Java application so that I don't have to log onto the Windows box every time and do those few clicks.  I heard that JMX can do it but I have no idea.  If not terribly complicated, could you please show me how to code this?
0
Comment
Question by:farzanj
  • 5
  • 5
10 Comments
 
LVL 92

Expert Comment

by:objects
ID: 34920080
jmx won't do it, and you're not going to find a way to easily do that
0
 
LVL 31

Author Comment

by:farzanj
ID: 34920137
http://download.oracle.com/javase/1.5.0/docs/guide/management/agent.html#jconsole_remote
Says you can do it programmatically by using URL.  That is the kind of thing I am looking for.  Why can't you do it?
0
 
LVL 92

Expert Comment

by:objects
ID: 34920698
you can access jmx programatically, but you cannot use it to automate clicks
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 31

Author Comment

by:farzanj
ID: 34921313
Well, that is what I meant.  There is an object that I need to call, basically.  Forget about clicks.  By clicks I meant to show the object in the tree I am calling.  I have to invoke a procedure of a particular object as shown in the figure.  I don't care how it is done, but the procedure should be called.

And I know it can be done, there are people in my company who do it but they are too hard to reach.
0
 
LVL 92

Expert Comment

by:objects
ID: 34921338
0
 
LVL 92

Expert Comment

by:objects
ID: 34921347
0
 
LVL 31

Author Comment

by:farzanj
ID: 34926313
It has a steep learning curve.  Could you please answer the following?


Will I need a compile a Java program on the client side, right?
How would I know if the server is running that JMX server?
How would I authenticate to it? Will it have the same password as of Windows server?  When I manually access the server and open the Java application, I don't need to provide any further credentials.
0
 
LVL 92

Expert Comment

by:objects
ID: 34929807
> Will I need a compile a Java program on the client side, right?

to provide custom acces yes

> How would I know if the server is running that JMX server?

you won't be able to connect if it isn't

> How would I authenticate to it? Will it have the same password as of Windows server?  When I manually access the server and open the Java application, I don't need to provide any further credentials.

If the server is setup to require authentication then yes
it does not use the same password as windows
http://download.oracle.com/javase/6/docs/technotes/guides/management/agent.html
0
 
LVL 31

Accepted Solution

by:
farzanj earned 0 total points
ID: 35016619
I think my description was pretty accurate as to what I wanted to do.  No, it was not difficult.  It was easy and I did it.  All I needed to know was "jmxsh-R4.jar" utility.  It is provided under Apache license.  It is also available under JBoss.
http://www.ohloh.net/p/jmxsh
It provides shell capability to access jmx by using TCL language.  If you know the sequence of clicks I had given at the beginning, it takes just a few minutes to write the command for it, which is a one liner.  If you want to do further processing, you need to know TCL.

Personally, I help a lot of people on EE in my zones.  I programmed in Java till early 2000s but then left it for good.  But on EE I expected the same quality of help that I provide.  If I don't know about certain thing, I would never say it cannot be done.
0
 
LVL 31

Author Closing Comment

by:farzanj
ID: 35067628
I appreciate your time and I value it.  However non of the answers you provided gave me not even a clue.  And the solution was very easy to accomplish, only you had to know that there is already a compiled application available to call jmx from shell, which is what I had requested.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question