Best way to determine openjdk jvm

Michael Hall mik3hall at gmail.com
Wed Feb 8 14:51:45 PST 2012


On Feb 8, 2012, at 12:53 PM, Mike Swingler wrote:

> On Feb 8, 2012, at 3:19 AM, Michael Hall wrote:
> 
>> I am looking at...
>> Mac OS X Port Using jsadebug, jinfo, jmap
>> https://wikis.oracle.com/display/OpenJDK/Mac+OS+X+Port+Using+jsadebug,+jinfo,+jmap
>> 
>> Which appears to require a openjdk specific signing certificate, or sudo.
>> Assuming you wanted to provide the cert, I would further assume you would still need to determine at runtime if you had the features available - meaning a openjdk runtime.
>> Would checking this system property be the best, recommended, way to do that?
>> java.runtime.name=OpenJDK Runtime Environment
> 
> I don't understand what you are asking. The signing certificate is only required at build time to sign the Mach-o binary of the JDK debugging tools. What do you need to know at runtime when you are using the tools?

I may of misunderstood. You are saying this provides instrumentation only for a jdk that you build? 
I thought it was saying this made the tools available for any running jvm's on the machine without having to sudo. If I am now understanding right you are saying you can't assume non-root use unless you built the jdk yourself with the signing cert? 
Wouldn't it be possible to set up a certificate and make it available with KeyChain or otherwise for other platforms that could be runtime checked for the authorization.
Otherwise I guess I am thinking of trying something like Greg Guerin's old AuthKit JNI that used OS X Authorization services (IIRC) to sort of do an authentication dialog equivalent of a sudo. This if I want to looking at providing anything that wraps the tools use from an application. It still requires admin user of course, and is I'm pretty sure OS X specific.
But what I am wondering is how would you approach distributed application use of the tools?



More information about the macosx-port-dev mailing list