Solved

JXM Command Line

Posted on 2011-02-17
10
480 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

 
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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

729 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