File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Trying to transform Java Command to ant task Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "Trying to transform Java Command to ant task" Watch "Trying to transform Java Command to ant task" New topic
Author

Trying to transform Java Command to ant task

Manuel Jordan
Ranch Hand

Joined: Sep 29, 2006
Posts: 125
Dear Members

I have this Main class



Therefore, the follow java command

Is to "feed" the line in the main method System.in.read();
java comand (related with JMX)

This work, then I can get a connection from jconsole (PID from Local Tab Pane)

The point is that is a long classpath and work for windows, therefore this in Linux is heavy to be changed,
I used to work with ant (I am not an expert), usually with this is enough



The code work, but I can never get a connection from jconsole because never appear any PID

What is misssing in my ant configuration?

Thanks in advanced


kill your pride, share your knowledge with all
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5536

You didn't set -Dcom.sun.management.jmxremote. Try this:



JBoss In Action
Manuel Jordan
Ranch Hand

Joined: Sep 29, 2006
Posts: 125
Hello Peter

Peter Johnson wrote:You didn't set -Dcom.sun.management.jmxremote. Try this:



Thanks a lot , it work!!!

btw is "jvmargs="-Dco...." and since is deprecated, this "<jvmarg>" must be used according to ant documentation



Thanks a lot again!

-Manuel
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Trying to transform Java Command to ant task
 
Similar Threads
Help needed in ModelMBean descriptors
Suspending/Pausing a MDB's Consumption Programmatically
develpoing simple mbean
JMX: javax.management.InstanceNotFoundException
Problem with JMX