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 says that profiles must be in Java 8. They are. To create them, use make profiles
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.
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
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)
As you can see from output:
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).
so that applications that do not require the entire Platform can be deployed and run on small devices (c) jep161
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 :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With