简体   繁体   English

在Java 1.8上运行JavaFX应用程序

[英]Running javafx application on java 1.8

I have noticed that in jdk folder javafx-src.zip is separate from src.zip. 我注意到在jdk文件夹中,javafx-src.zip与src.zip是分开的。 Is it included in the jre? 它包含在jre中吗? Will it run in all java 8 VMs? 它将在所有Java 8 VM中运行吗?

I have noticed that in jdk folder javafx-src.zip is separate from src.zip. 我注意到在jdk文件夹中,javafx-src.zip与src.zip是分开的。 Is it included in the jre? 它包含在jre中吗?

No. The JRE only needs to include binary runtime code, it does not need to include source code. 不需要。JRE仅需要包含二进制运行时代码,而无需包含源代码。 Only the JDK includes source code. 仅JDK包含源代码。 So, the JRE includes neither src.zip, nor javafx-src.zip. 因此,JRE既不包含src.zip,也不包含javafx-src.zip。

Will it run in all java 8 VMs? 它将在所有Java 8 VM中运行吗?

VMs yes, JREs no. VM是,JRE是。 For example if you have an Oracle server JRE or an OpenJDK JRE distribution which does not include JavaFX client runtime code, then your JavaFX application will not run on those environments. 例如,如果您有一个不包含JavaFX客户端运行时代码的Oracle服务器JRE或OpenJDK JRE发行版,则您的JavaFX应用程序将无法在这些环境上运行。 All full (non-server only) distributions of Oracle Java SE 8 (except Solaris) include a compatible runtime for JavaFX 8, so you can execute a JavaFX 8 compatible application directly on the Oracle Java SE 8 JRE without any additional installations. Oracle Java SE 8的所有完整(仅非服务器)发行版(Solaris除外)都包含JavaFX 8的兼容运行时,因此您可以直接在Oracle Java SE 8 JRE上执行JavaFX 8兼容的应用程序,而无需进行任何其他安装。

To ensure that your target machine has a compatible JRE installed for executing your application, you may wish to package your application as a self-contained application . 为确保目标计算机安装了兼容的JRE以执行您的应用程序,您可能希望将应用程序打包为独立的应用程序

Yes as of JDK 7u6 JavaFX is included with the standard JDK and JRE bundles. 从JDK 7u6开始,是的。标准JDK和JRE捆绑包中包含JavaFX。 Source: http://www.oracle.com/technetwork/java/javafx/downloads/index.html 来源: http//www.oracle.com/technetwork/java/javafx/downloads/index.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM