如何创建紧凑的配置文件 [英] How to create compact profiles
问题描述
我在google搜索在Java 1.8中创建Compact配置文件的方法。是否可以创建一个紧凑的配置文件,因为这里表示仅适用于嵌入式版本
I was googling to find a way to create a Compact profile in Java 1.8 .Is it possible to create a compact profile because Here is saying it is for embedded version only
推荐答案
简答
JEP 161 表示配置文件必须使用Java 8。他们是。要创建它们,请使用制作个人资料
Short answer
JEP 161 says that profiles must be in Java 8. They are. To create them, use make profiles
您怀疑配置文件可能仅存在于嵌入式平台上,@skiwi的评论让我感到困惑,我决定自己查看。
Your suspicion that profiles may exist on embedded platforms only and comment from @skiwi confused me a bit and I decided to check it myself.
为了检查配置文件的存在,我采用了OpenJDK。我在我的ubuntu x86上构建它(我读了这个和这个 README和过程很简单)。说明说完成 make all
命令。但是,之后没有紧凑的配置文件。然后我阅读Makefile帮助部分并调用 make profiles
。成功
To check profiles existence I took OpenJDK. I built it on my ubuntu x86 (I read this and this READMEs and process was simple). Instructions say finish with make all
command. However, there were not compact profiles after that. Then I read Makefile help section and invoke make profiles
. Success
$ hg clone http://hg.openjdk.java.net/jdk8/jdk8
$ cd jdk8
$ bash ./get_source.sh
$ bash ./configure
$ make all
$ make profiles
然后我找到'images'目录并去那里
Then I found 'images' directory and went there
$ cd build/linux-x86-normal-server-release/images/
$ export PATH=j2re-compact1-image/bin/:$PATH
$ java -version
openjdk version "1.8.0-internal"
OpenJDK Runtime Environment (build 1.8.0-internal-fasdaq_2014_03_22_20_17-b00, profile compact1)
OpenJDK Server VM (build 25.0-b70, mixed mode)
从输出中可以看出:
- 它作品
- 它没有嵌入
- 它是compact1个人资料
- 它是1.8.0版本
- It works
- It's not embedded
- It's compact1 profile
- It's 1.8.0 version
关于嵌入式和 link 您提供了
Ther e是 jrecreate 工具,可让您使用获得你想要的profile / vm / extensions的jre(并且不包括你不想要的这些)。
About embedded and link you provided
There is a jrecreate tool that allows you to get jre with profile/vm/extensions you want (and do not include these you don't want).
以便可以在小型设备上部署和运行不需要整个平台的应用程序(c) jep161
没有这样的OpenJDK中的工具。 Jrecreate是嵌入式Java的一部分,您可以从发行说明<中阅读/ A>。
对我来说这是个难题:你想要创建什么样的非嵌入式java的紧凑配置文件。但是,你有能力这样做:)
There is no such tool in OpenJDK. Jrecreate is a part of embedded java as you can read from release notes. It's hard question for me: what do you want to reach creating compact profile of non-embedded java. However, you're capable to do it :)
这篇关于如何创建紧凑的配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!