Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use JRE in Java 8

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces how to use JRE in Java 8, the content is very detailed, interested friends can use for reference, I hope it can be helpful to you.

Oracle released the official version of Java 8 as scheduled! Did not disappoint the majority of javaer. For a person, the age of 18 is a turning point in life, from immature to mature, the law means that you are a person with full civil capacity and no longer benefit from the juvenile protection law. So far this year, java has also gone through 18 years. Java8 is a new milestone, bringing many features of *, lambda expressions, Stream API, new Date time api, multi-core concurrent support, major security improvements, etc. I believe java will become better and better. Rich class libraries and huge open source environment are not available in other languages. Speaking of rich class libraries, many students complain that it is time for java to lose weight, and java8 has a good feature, that is, JEP161 (http://openjdk.java.net/jeps/161), which defines some subsets of the Java SE platform specification, so that java applications do not need the entire JRE platform to deploy and run on small devices. Developers can choose an appropriate JRE runtime environment based on the available resources of the target hardware.

Benefits

1. A smaller Java environment requires less computing resources.

two。 A smaller runtime environment can better optimize performance and startup time.

3. It's always good to eliminate unused code from a security perspective.

4. These packaged applications can be downloaded faster.

Concept

There are three kinds of compact JRE, which are compact1, compact2 and compact3. Their relationship is compact1 java.io compact1-> java.lang compact1-> java.util compact1 * VERBOSE * * jdeps-v Deps.class Deps.class-> / Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar Deps (Deps.class)-> java.io.PrintStream-> java.lang.Math-> java.lang .object-> java.lang.String-> java.lang.System-> java.util.HashSet * RECURSIVE * * jdeps-R Deps.class Deps.class-> / Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar (Deps.class)-> java.io-> java.lang-> java.util / Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/jce.jar-> / Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar javax.crypto (jce.jar)-> java.io -> java.lang-> java.lang.reflect-> java.net-> java.nio- > java.security-> java.security.cert-> java.security.spec-> java.util-> java.util.concurrent -> java.util.jar-> java.util.regex-> java.util.zip-> javax.security.auth -> sun.security.jca JDK internal API (rt.jar)-> sun.security.util JDK internal API (rt.jar)-> sun.security.validator JDK internal API (rt.jar) javax.crypto.interfaces (jce.jar)-> java.lang-> java.math-> java.security javax.crypto.spec (jce.jar)-> java.lang -> java.math-> java.security.spec-> java.util / Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/ Home/jre/lib/rt.jar-> / Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/jce.jar java.security (rt.jar)-> javax.crypto JDK internal API (jce.jar) sun.security.util (rt.jar)-> javax.crypto JDK internal API (jce.jar)-> javax.crypto.interfaces JDK internal API (jce.jar)-> javax.crypto.spec JDK internal API (jce.jar) build profile$ hg clone http://hg.openjdk.java.net/jdk8/jdk8/ $cd jdk8 $make images profiles on linux: # # Finished profiles (build time) 00:00:27)-Build times-Start 2013-03-17 14:47:35 End 2013-03-17 14:58:26 00:00:25 corba 00:00:15 demos 00:01:50 hotspot 00:00:24 images 0000Vl0021 jaxp 00VOGO 31 jaxws 00VOONING jdk 00VOUGO 43 langtools 00PLO 0018 nashorn 00R000RAPHY profiles 0010 TOTAL 51- -Finished building Java (TM) for target 'images profiles' $cd images $ls-d * image j2re-compact1-image j2re-compact2-image j2re-compact3-image j2re-image j2sdk-image the approximate footprint of compact after compilation

Summary

Nowadays, the Internet of things is in vogue. We see a large number of different devices on the market, each of which is updated faster and faster. Java needs a JRE running environment with less resources, the emergence of compact JRE features, hoping to bring the future development of the Internet of things, and even a large number of java applications will appear on the Internet of things. At present, oracle has also released JRE for raspberry pi.

In addition, this feature is also a preparation for java9's modularization project, which is expected by javaer. It is a sharp tool to solve the complexity of business systems, of course, OSGI is also quite excellent. But osgi is too complicated for new scholars.

About how to use JRE in Java 8 to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report