This question falls somewhere between Firebase Tools, MacOS and Java. Probably 75% Java, 20% Firebase Tools and 5% MacOS.
Starting with v10.5, firebase-tools started stating that 'Support for Java version <= 10 will be dropped soon in firebase-tools#11. Please upgrade to Java version 11 or above to continue using the emulators.'
I run macOS v11.6.5 on a Macbook Pro from mid-2014. When I go to Java's Downloads page, it recommends Java 'Version 8 Update 331'. Not Java 11.
Information on downloading Java 11 seems to be scarce. Oracle's page of certified configurations includes MacOS 11, but I can't find anywhere obvious where Java 11 can be readily downloaded.
A big part of the problem seems to be the terminology used. If I run java -version, I get:
java version "1.8.0_331"
Java(TM) SE Runtime Environment (build 1.8.0_331-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.331-b09, mixed mode)
Okay, I have build 1.8 of the Java Runtime Environment, aka the JRE if you are a Java enthusiast. That is apparently what is triggering the warning in Firebase Tools.
There is also a Java product out there called 'Java SE 11'. The product itself is ambiguous, but the checksums all say 'SDK'. (A Software Development Kit: a thing that enables developers to develop Java programs. The name doesn't imply a Runtime Environment: a thing that enables Java to run on an operating system.) There is an article out there which claims that, if you install Java SE 11 and run java -version, it will spit out java version "11.0.7". That will probably satisfy Firebase Tools.
But Oracle's release notes say: 'In Windows and macOS, installing the JDK in previous releases optionally installed a JRE. In JDK 11, this is no longer an option.' No longer an option... as in now you implicitly get JRE 11 with SDK 11? Or as in the SDK and JRE are now fully divorced, and the JRE must be ferreted out of its hiding like a wild beast?
UPDATE 6/5/22: Java's checksums page now says 'JDK', and I guess that is better than 'SDK' because it implies 'Java Development Kit', which this Wikipedia article claims to include both a JRE ('java') and SDK (most of the other files).
To install Java SE:
Go here.
Scroll down to find your product. I chose Java SE 11. (Oracle will probably list later versions as they are made available.)
Choose your operating system. I chose MacOS.
Choose your file set. I chose the DMG installer.
Download your chosen file set.
5. Do whatever is required by your platform to install Java SE using the downloaded file set from #5.
After installing Java SE 11, java -version now says "11.0.14" and Firebase Tools is now satisfied. My best guess is that JRE 11 was implicitly downloaded, and that developers need to start ignoring the main Download page used by everyone else. (Why didn't the main Download page recommend Java 11 from the start?) Hopefully someone will see this question and clarify whether in the future, the 'Java SE' product implicitly includes both the JRE and SDK, and that the numbering system will always encompass both. In other words, hopefully when someone says we need 'Java 11', it means that we need to download SE 11, containing JRE 11 and SDK 11.
This link has a JDK installer that solved my problem today. I needed to close and reopen all my VScode windows to get it to work.
https://www.oracle.com/java/technologies/downloads/
With latest versions this error appears: !! emulators: firebase-tools no longer supports Java version before 11. Please upgrade to Java version 11 or above to continue using the emulators.
You can download Java SE Development Kit 18 from this link. Just choose your operating system, download and install the file. When installation is complete you need to restart you terminal and voila it works now:
firebase emulators:start
But Oracle's release notes say: 'In Windows and macOS, installing the JDK in previous releases optionally installed a JRE. In JDK 11, this is no longer an option.' No longer an option... as in now you implicitly get JRE 11 with SDK 11? Or as in the SDK and JRE are now fully divorced, and the JRE must be ferreted out of its hiding like a wild beast?
With Java 8 and earlier, the end user of a Java application was responsible for providing a Java runtime environment for the application to run on. This is what the JRE was for. The user would have to install this runtime environment on their system in order to run Java applications. This is also why the https://www.java.com/en/download/ page recommends Java 8 (the JRE), which was the last version of Java where an end-user should concern themselves with installing a runtime environment.
Starting from Java 9, it is now the application distrubutor's responsibility to provide a Java runtime that can run the application. So, there are no more JREs.
The application developer should use jlink, which is a tool included in the SDK, to create a 'runtime image' (essentially a bespoke JRE to run a single application), that can be used to run the application, and bundle that runtime image with the application. The jpackage tool can also be used to create application images (including a runtime image), as well as installers.
I'm running s simple pyspark python script in Pycharm, whithin an anaconda env with Python 3.7 (pyspark version 2.4.4) and I got error :
pyspark.sql.utils.IllegalArgumentException: 'Unsupported class file major version 55'.
I've followed the potential solutions I found on stackoverflow but non of them works, I followed this one:
https://stackoverflow.com/a/54704928/12375559: I've added java1.8.0_221 in my system env variables:
but when I type java -version in Pycharm terminal it's still using java11.0.6:
>java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+8-b765.1)
OpenJDK 64-Bit Server VM (build 11.0.6+8-b765.1, mixed mode)
Then I found this:
Pyspark throws IllegalArgumentException: 'Unsupported class file major version 55' when trying to use udf switch boot jdk of Pycharm (2xshift -> jdk -> select jdk 1.8)
So I navigated to Pycharm Switch IDE Boot JDK:
I can see the second option is 1.8 but without anaconda plugin, so I'm not sure what to do now because I don't want to mess up with my settings, might someone be able to help me please? Many thanks!
The 55 error is caused by an older Java version trying to execute Java version 11 code (in a .jar or .class file). So it seems like an older Java version (for example Java 8 (a JVM 8)) is used, but it encounters a part compiled in Java 11 (see 55 is Java 11).
Since Java 8 is less well supported, you could try to use Java 11 or newer (see Java version history). You could try to use PySpark 3.0.1 with Python 3.8 and Java 11. That way, you have recent parts that should be able to work together.
These links might also be helpful:
Specify Java version in a Conda environment
Spark Error - Unsupported class file major version
I just wanted to have a discussion and get some clarification about a problem I am trying to solve. As of now I have followed this documentation in order to update java on my Cloudera Quickstart VM from Java SE 1.7 to Java SE 1.8. My goal from upgrading to this version is to implement spark 2 on my machine.
After I followed the directions I checked what java version is in the system by typing $ java -version in the terminal. The output though was still the default 1.7 version and not the 1.8 version that the Cloudera manger points to. Why is it that this is happening? Will this discrepancy effect performance at all?
Edit: Change phrasing
I understand that the Oracle Java Development Kit 11 (JDK) does no longer include a public JRE (Java Runtime Environment). However the documentation says it includes a private one (I actually don't understand what that means).
I installed the JDK 11 on Windows 10 64x according to the documentation and set the path system variable accordingly. When I type
java -version
at the command line I get informed that there is indeed a runtime environment in place.
However, when I now try to install e.g. a Plugin (Zotero) for LibreOffice that needs a JRE, it is NOT recognized ...
Why does this happen? Do I really need to install the separate JRE from Oracle to get it work?
I read the manual and the migration guide - sorry if this is a stupid question, but I'm stuck.
Thank you!
Andi
java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
Now I have a Java application which says
A different version of Java Runtime Environment (JRE) is required to use this application.
and it is 1.6.0_17...
What to do?
It's really strange that the software you are trying to run requires a very specific update release (such as Oracle Java 6 update 17). Update releases are compatible and there should not be a need to require a very specific release.
On this page you can download earlier versions of Oracle's Java implementation, including Java 6 update 17.
if you really want to have different version of the application running, then the keyword java needs to be fully provided with a path.
one good way is to export the java_home before you run the application and have the application always read the java home when starting the server.
export JAVA_HOME = c:\jdk7
JAVA_HOME/bin/java -server ...
export JAVA_HOME = c:\jdk6
You have to uninstall your current version of java and install the desired version.
You can found all previous version of java on this (Java Older versions) location.
If you are using windows you can directly uninstall and install the older version.
Note: we can use multiple versions in a system by changing the system or user environment variable to use some version as my current java version make or put the path as followed it should be pasted first in path
C:\Program Files\Java\jdk1.7.0_12\bin;.;
[;.;] this will indicate as current working directory and this version will only take as default version while installing java dependent sofware installations ex:netbeans,tomcat etc