简体   繁体   中英

Can I install java but not Java SE?

I've got a little question (just for a cultural purpose).

Would it be possible to download and install Java but not the standard edition ?

I know that Java SE contains basic and usefull functions / librairies (such as input /output). Installing java without the "SE" is maybe useless and without any interest, but is it possible? if yes how ?

Many thanks,

Installing java without the "SE" is maybe useless and without any interest, but is it possible?

It is not possible. Oracle don't distribute a form of Java without libraries.

In fact, there is no such thing as Java without the libraries (SE or ME). The libraries are part of Java(tm) platform. If you managed to create something with the Java language and a JVM, but with partial, missing or incompatible libraries you couldn't call it Java 1 . Oracle owns the Java trademark, and they dictate the terms under which you are allowed to use it. If you used "Java" for a JVM / Library combination that doesn't pass the standard Java compatibility tests, you would likely get a "cease and desist" letter from Oracle's lawyers!

But more importantly, there is a significant subset of the Java SE runtime libraries that are essential for bootstrapping a JVM. If you were to build your own (ahem) Java build that left out critical classes, your JVM wouldn't work.

(And you cannot just simply 2 write your own replacement for the Java SE library subset that the JVM depends on. There are many places where the C / C++ codebase for the OpenJDK JVM has intimate knowledge of the implementation details of the Java libraries. Figuring it all out ... from scratch ... would be challenging.)

Having said that, in Java 9 they introduced a tool called jlink which will produce a cut-down Java SE runtime for an application that only contains the libraries that are required by the application. Your can read about it here .


1 - For example, the Sun vs Microsoft lawsuit over Microsoft's attempt to "embrace and extend" Java 1.1. See What does Sun's lawsuit against Microsoft mean for Java developers?

2 - It's not impossible. Just a lot of really hard work.

The java command is traditionally from a SE installation. Typically in the JRE form, but occasionally I the JDK variation for advanced users. Others exist but are not for desktop usage.

So in that view you cannot install java without SE.

(note: Java EE is not a distribution as such but an API typically provides by big web servers)

Can I install Java but not Java SE?

Install? No. Not from any "official" distributions provided by Oracle, at least.

Why not?

Because Oracle doesn't package it that way. They offer 1) a Java SE development kit (JDK) which lets you create Java programs for yourself, or 2) a Java SE JRE which just lets you run Java programs that someone else created. There is no 3) Java without SE.

But couldn't they have given us option #3?

Could they have? Probably. Well, OK, maybe . Did they? No.

But theoretically it's possible, right?

Theoretically , I don't see why not. Theoretically , it ought to be possible to come up with a "Java" that's little more than a virtual machine and a compiler. Then, theoretically , using only this non-Java-SE Java language, you could either replicate the Java SE environment or develop an entirely new Java-based development platform.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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