On Mac OSX 10.7 JavaVM is automatically downloaded when first used (when some application loads /System/Library/Frameworks/JavaVM.framework/JavaVM). But if JavaVM is not present, application ends immediately with exit code 97.
My question is, is there any way to programmatically (ideally methods in carbon) determine if JavaVM is already downloaded and installed, so my app can behave accordingly?
My app is written in c++, it’s basically native launcher for java app.
I found one way. If java is not installed /usr/libexec/java_home doesn’t return java home dir and doesn’t start download. Downloading could be started by parameter –request.
Anyway would prefer some API.