aspose 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
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: 131
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: 5830
    
    7

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



JBoss In Action
Manuel Jordan
Ranch Hand

Joined: Sep 29, 2006
Posts: 131
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://aspose.com/file-tools
 
subject: Trying to transform Java Command to ant task