问题
Does the LiClipse development environment (IDE) for Mac OS X include its own copy of the JRE (Java Runtime Environment), or does it use the system's JRE to run?
LiClipse is built on the Eclipse IDE, which is written in the Java language, and so needs a JRE to run. The answer for Eclipse and for LiClipse may be the same. Mac OS permits applications to be packaged as "bundles", a camouflaged form of a directory tree, so it is possible for an app to include support software such as a JRE. "Bundles" are a Mac OS specific structure, so the answer for Windows and Linux versions of Eclipse or LiClipse might differ.
I am using LiClipse 4.4.0 on Mac OS X El Capitan 10.11.6. I expect the answer may be the same for several versions of LiClipse, Eclipse, and Mac OS X, but not for all.
回答1:
Yes, LiClipse does include a JRE (depending on each platform it may be on a different place).
The JRE is actually put there on a post-build step (before creating native installers for each platform).
This means that starting LiClipse doesn't require the user to have a JRE installed on the machine (although it should still be possible to specify a different Java VM if needed as explained in https://wiki.eclipse.org/Eclipse.ini).
回答2:
Yes, LiClipse for Mac apparently does include its own JRE.
The Java Home directory for this JRE is within the LiClipse.app
bundle directory, at ./jre/Contents/Home
. You can get to this directory from the shell with a simple cd
command, or from the Finder by right-clicking on the LiClipse.app
icon and
% cd /Applications/LiClipse\ 4.0.0/LiClipse.app/jre/Contents/Home
% ls -F
COPYRIGHT THIRDPARTYLICENSEREADME.txt man/
LICENSE Welcome.html release
README bin/
THIRDPARTYLICENSEREADME-JAVAFX.txt* lib/
I confirmed that this was LiClipse's JRE, by performing an operation on this JRE, then running LiClipse and verifying that the operation had effect on LiClipse. (I installed the CA Certificate from a software project's repository into that JRE's Key Store, as part of answering the SO question, How can I add a certificate to LiClipse to permit access to a git repo via SSL?).
The Java Platform, Standard Edition Deployment Guide has documentation on Self-Contained Application Packaging, section on "[macOS]-Specific Customization for Basic Packages". It gives examples of creating a bundle using javapackager or an Ant task <fx:deploy>...<fx:bundleArgument>...
. I have no evidence that this is how LiClipse does it, but this is evidence that something like it is possible.
来源:https://stackoverflow.com/questions/47549726/does-liclipse-for-mac-include-its-own-copy-of-the-jre