Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java 6 and Instruments



On Dec 25, 2007, at 6:02 AM, email@hidden wrote:

I want to use the spiffy new Instruments application to attach to my
java process as eluded to here:
http://developer.apple.com/java/javaleopard.html

Unfortunately I can't figure out how to do it. I am running tomcat via
the command line or IntelliJ with no problem, in java 1.5 and the new
java 1.6 that apple just released and have no problems. Instruments
won't allow me to attach to the process with the JavaThread
Instrument. I tried having Instruments start tomcat, but it didn't
like the catalina.sh shell script very much. I even tried it by
specifying all the params to the java executable and having it start
java itself, that also did not work.

I looked around and can't find any docs that give me a clue as to how
to run this, anyone here ever get this working?

Currently, Instruments does not launch non-double-clickable applications, or attach to pre-existing processes. My best suggestion would be to "wrap" some Jar file using the JarBundler application, and attempt to replace it's binary in the <app>/Contents/MacOS directory with a renamed catalina.sh. Then try launching this "hacked application shell" using Instruments. It may or may not identify the Java process as a sub-child process...I don't know, since I haven't tried this.


If you can somehow bundle your application as a "double clickable" application (perhaps using JarBundler), Instruments will at least offer it as a potential application to attach to. Also, if your whole app can be wrapped into a single Jar file, Instruments offers to launch those as well.

Best of luck,
Mike Swingler
Java Frameworks Engineer
Apple Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Java 6 and Instruments (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.