How to launch the “To open “Java Preferences", you need a Java runtime. Would you like to install one now?” in Lion?
How can I make Lion's new Java installer prompt launch when my application is opened?
Example: http://kb2.adobe.com/cps/909/cpsid_90908.html
eclipse appears开发者_如何转开发 to do it but NetBeans does not.
Going to the terminal and typing "java" triggers the popup you are looking for, provided Java is not installed on the system.
I however don't know how to trigger this popup afterwards
If I understand you correctly you would like to be able to run application originally written in java even on machine that does not have JRE installed and be able to show pop-up window that prompts user to install JRE.
Obviously you can implement script for each platform that does it. For example it could be VB script for windows, TCL/TK script for unix etc.
Other possibility is to use package generators that do the work for you. I used to use InstalAnywere and Multiplatform Installer (from Install Shield) and I think they have such functionality.
精彩评论