I'm a little bit confused about the various ways to run Java programs on the Raspberry Pi.
As I see it there are the following possibilities:
Java 6:
Java SE 6 Embedded
Java 7:
OpenJDK 7
Java SE 7 Embedded
JDK 7.40 (and greater)
Java 8:
JDK 8
This brings us to the following questions:
Is there a difference between the JVM shipped with JDK and Java SE?
Is there no ARM version of OpenJDK 6 or 8?
What are the benefits of Java SE 7 Embedded over the regular Java SE 7 VM (included in JDK 7)?
I could only find the following points:
Low memory footprint
No AWT/Swing
Java SE 7.40 for Raspberry Pi
The Oracle homepage only lists downloads for an ARM v6/v7 Soft Float ABI and an v7 Hard Float ABI version.
As the Raspberry Pi uses the v6 architecture I guess you have to use the Soft Float version.
So there should be no speed improvements over the Java SE 7 Embedded VM which also uses the Soft Float ABI, right?
Is there no embedded version of Java SE 8?
Does JDK 8 always use the Hard Float ABI or is there also a Soft Float ABI version?
To sum up:
If you want to use the Hard Float ABI use the developer preview of JDK 8
If you want a stable Java version with a low memory footprint use Java SE 7 Embedded
If you want a stable Java version and want to use Swing/Awt use JDK 7.40 (and greater)
Since September all the Raspbian images will ship (by default) with Oracle Java which is supposed to be optimized for Raspberry
Related
I'm having problems understanding Java versioning. I'm seeing lots of versions like 1.4.2, 1.5 and 1.6, but I also stumble upon 5.0 and 6.0. I don't understand this versioning or the progression.
I'm pretty new to Java, and I've read a bit about OpenJDK vs Sun, and I think I understand it. Are these versions the difference between OpenJDK and Sun? For example, OpenJDK's latest is 1.6 and Sun's is 6.0?
All these versions are pretty confusing to someone new to Java.
The versioning is simply a mess:
Java 1.0 and 1.1 were normal
Then came Java 1.2, but you were supposed to call it "Java 2, JDK 1.2"
This continued until 1.4 (There were also minor releases like 1.4.2)
The next version was then supposedly "Java 5.0", but there was still "1.5" all over the place in the file names and URLs.
Starting with Java 6, they've dropped the minor version and mostly (but not completely, see output of java -version) eliminated the traces of the old versioning scheme, but people have gotten used to it and continue to use it colloquially.
Starting with Java 9 or 10, the 1.X notation also disappeared from the output of java -version (which caused some code that depended on parsing it to break), and people have pretty much stopped using it. We now have Java 15, Java 16, Java 17, etc.
Note also that when this question was asked, Sun JDK and OpenJDK were separate codebases (whith a large overlap), and Sun JDK was the official reference implementation.
In the more than 10 years since then, Java was sold to Oracle, OpenJDK became the official Java reference implementation, and Oracle stopped maintaining the Oracle JDK as a separate codebase. Instead, they just provide OpenJDK builds and provide commercial long term support for them with bugfixes and security patches. But you can also get builds for free from AdoptOpenJDK (which recently rebranded as "Adoptium"), they just aren't supported as long.
This is explained (cough) in Java SE Naming and Versions:
The current release is Java Platform,
Standard Edition 6 (Java SE 6). The
previous release was Java 2 Platform,
Standard Edition 5.0 (J2SE 5.0).
Sun Microsystems simplified the
platform name in 2006 to better
reflect the level of maturity,
stability, scalability, and security
built into the Java platform. Sun
dropped the "2" from the name and
deleted the "dot number" (the number
following the period). Any updates to
Java platforms will simply be noted as
updates rather than adding a "dot
number" at the end of the platform
name.
Due to significant popularity within
the Java developer community, the
development kit has reverted back to
the name "JDK" from "Java 2 SDK" (or
"J2SDK"). The runtime environment has
reverted back to "JRE" from "J2RE."
(Note that "JDK" stands for "J2SE
Development Kit" in version 5.0.)
For more information on platform names
and version numbers, see the following
pages:
Java SE 6 Platform Name and Version Numbers
J2SE Version 1.5.0 or 5.0?
J2SE SDK/JRE Version String Naming Convention
And quoting Java SE 6 Platform Name and Version Numbers:
At this release, the platform name has changed from J2SETM to JavaTM SE. The official name is JavaTM Platform, Standard Edition 6.
Both version numbers (1.6.0 and 6) are used to identify this release of the Java Platform. Version 6 is the product version, while 1.6.0 is the developer version. The number 6 is used to reflect the evolving level of maturity, stability, scalability and security of Java SE.
And J2SE Version 1.5.0 or 5.0?:
Both version numbers "1.5.0" and "5.0" are used to identify this release of the Java 2 Platform Standard Edition. Version "5.0" is the product version, while "1.5.0" is the developer version. The number "5.0" is used to better reflect the level of maturity, stability, scalability and security of the J2SE.
The number "5.0" was arrived at by dropping the leading "1." from "1.5.0". Where you might have expected to see 1.5.0, it is now 5.0 (and where it was 1.5, it is now 5).
So, to summarize, the whole naming is a mess but this is finally over and the current platform name is JavaTM Platform, Standard Edition 6 (abbrev. JavaTM SE 6). Two Products are delivered under the platform: the JDKTM 6 and the JRETM 6.
OpenJDK 6 is an open-source implementation of the Java SE 6 Platform, it's different from Sun's JDK.
Java 1.5.x is the same as Java 5.x
Java 1.6.x is the same as Java 6.x
Basically throw away the 1. part of the version number.
Both 1.6 and 6 are used to refer to the same version (and similarly for 1.5 and 5).
The only difference is the single digit numbers are usually used in conjunction with Java SE 5 and Java EE 6.
The 1.5 and 1.6 versions are what the Java compiler says using java -version and sometimes 'the minor release' is used as a version string, like SunOS 5.8 was called Solaris 8 as a product name.
Guide to java versions is the best blog for any new person to understand java versioningSince 2019, Java releases new version every 6 months, i.e. March and September. It's October 2021, and Java 17 is already released. Here is the link to download OpenJDKCouple of noteworthy points
you can use always use the latest version of java, it will execute the code written using previous versions
previously JRE and JDK were separately distributed, now there is a trend to only distribute JDK
There are two distributions: OpenJDK (free) and OracleJDK (paid)
java JDK 8 for arm and java SE embedded both are mainly developed to develop
the applications in embedded systems.
what is the exact difference between these both JDK??
You can find the difference here
The JDK includes a Java runtime environment (JRE) for ARM platforms
and tools such as the compilers and debuggers necessary for developing
applications. Java SE Embedded is a subset of the JDK and includes
only the JREs.
JDK 8 for ARM includes tools for developing application for the ARM Platforms and Java SE Embedded includes the runtime only.
As the Oracle site says:
Java SE Embedded derives from JDK, but provides specific features and support for the embedded market on a limited set of supported platforms. The embedded-specific features and support include additional platforms, small footprint JREs (optional files removed), headless configurations, and memory optimizations.
Source here. This FAQ might be interesting too.
Is Java 1.4 64 bit supported in Windows 7 (x64)?
I installed it and installer says it cannot be installed.
The earliest supported Java Development Kit supported in Windows 7 was SE 6.18.
From the Wikipedia article:
No security fixes; Hotspot VM 16; support for Ubuntu 8.04 LTS Desktop Edition, SLES 11, Windows 7, Red Hat Enterprise Linux 5.3, Firefox 3.6, VisualVM 1.2; updated Java DB; many performance improvements
As far as I can see the 64 bits Windows version of JDK 1.4 offered on Sun's(now Oracle) website is for the Itanium architecture (filename suffix ia64). The 64 bits processors produced by Intel that are most popular today use another architecture (filename suffix x64).
Binaries for an Itanium will not run on eg Xeon processors.
You should use JDK 1.7. Its only a way better for Win 7
I have a intel core i3 (not the 2nd generation i3) processor and windows 7 64 bit OS.
Which j2se 1.4 should i install from http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase14-419411.html#j2sdk-1.4.2_30-sol-JPR this website
There's Windows versions available of update 19 here: http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase14-419411.html#j2sdk-1.4.2_19-oth-JPR
They were never designed to work on Windows 7 though, let alone 64 bit - so I can't guarantee they'll work (and if they don't then Oracle won't do anything to try to make them work because of the age!)
I'd also seriously question your motive for requiring 1.4, and recommend you migrate to a current, supported version of the JDK. If nothing else remember there's no security updates, so any exploits that are found won't be patched.
You shouldn't be installing JDK 1.4 at all - it's well past its supported life.
I took a peek at the link you provided. It looks to me like Oracle will only make older versions of the JDK available for Solaris. I doubt that there was ever a version that ran on that version of Windows. Why port it now?
You're out of luck.
I'd recommend an upgrade to JDK 6 or higher. JDK 7 is the latest standard. You should be keeping up with your JDK, just as you are with your operating system.
You can download a 32-bit version of Java from http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase14-419411.html
I use such a 32-bit Java on a regular basis under Windows 7 64-bit directly from the command line.
That said, newer versions of Java perform better and you should only use Java 1.4 if you need to support it or have software that explicitly requre Java 1.4.
The latest version of Java 7 supports 64-bit and is tested under Windows 7.
I'm having problems understanding Java versioning. I'm seeing lots of versions like 1.4.2, 1.5 and 1.6, but I also stumble upon 5.0 and 6.0. I don't understand this versioning or the progression.
I'm pretty new to Java, and I've read a bit about OpenJDK vs Sun, and I think I understand it. Are these versions the difference between OpenJDK and Sun? For example, OpenJDK's latest is 1.6 and Sun's is 6.0?
All these versions are pretty confusing to someone new to Java.
The versioning is simply a mess:
Java 1.0 and 1.1 were normal
Then came Java 1.2, but you were supposed to call it "Java 2, JDK 1.2"
This continued until 1.4 (There were also minor releases like 1.4.2)
The next version was then supposedly "Java 5.0", but there was still "1.5" all over the place in the file names and URLs.
Starting with Java 6, they've dropped the minor version and mostly (but not completely, see output of java -version) eliminated the traces of the old versioning scheme, but people have gotten used to it and continue to use it colloquially.
Starting with Java 9 or 10, the 1.X notation also disappeared from the output of java -version (which caused some code that depended on parsing it to break), and people have pretty much stopped using it. We now have Java 15, Java 16, Java 17, etc.
Note also that when this question was asked, Sun JDK and OpenJDK were separate codebases (whith a large overlap), and Sun JDK was the official reference implementation.
In the more than 10 years since then, Java was sold to Oracle, OpenJDK became the official Java reference implementation, and Oracle stopped maintaining the Oracle JDK as a separate codebase. Instead, they just provide OpenJDK builds and provide commercial long term support for them with bugfixes and security patches. But you can also get builds for free from AdoptOpenJDK (which recently rebranded as "Adoptium"), they just aren't supported as long.
This is explained (cough) in Java SE Naming and Versions:
The current release is Java Platform,
Standard Edition 6 (Java SE 6). The
previous release was Java 2 Platform,
Standard Edition 5.0 (J2SE 5.0).
Sun Microsystems simplified the
platform name in 2006 to better
reflect the level of maturity,
stability, scalability, and security
built into the Java platform. Sun
dropped the "2" from the name and
deleted the "dot number" (the number
following the period). Any updates to
Java platforms will simply be noted as
updates rather than adding a "dot
number" at the end of the platform
name.
Due to significant popularity within
the Java developer community, the
development kit has reverted back to
the name "JDK" from "Java 2 SDK" (or
"J2SDK"). The runtime environment has
reverted back to "JRE" from "J2RE."
(Note that "JDK" stands for "J2SE
Development Kit" in version 5.0.)
For more information on platform names
and version numbers, see the following
pages:
Java SE 6 Platform Name and Version Numbers
J2SE Version 1.5.0 or 5.0?
J2SE SDK/JRE Version String Naming Convention
And quoting Java SE 6 Platform Name and Version Numbers:
At this release, the platform name has changed from J2SETM to JavaTM SE. The official name is JavaTM Platform, Standard Edition 6.
Both version numbers (1.6.0 and 6) are used to identify this release of the Java Platform. Version 6 is the product version, while 1.6.0 is the developer version. The number 6 is used to reflect the evolving level of maturity, stability, scalability and security of Java SE.
And J2SE Version 1.5.0 or 5.0?:
Both version numbers "1.5.0" and "5.0" are used to identify this release of the Java 2 Platform Standard Edition. Version "5.0" is the product version, while "1.5.0" is the developer version. The number "5.0" is used to better reflect the level of maturity, stability, scalability and security of the J2SE.
The number "5.0" was arrived at by dropping the leading "1." from "1.5.0". Where you might have expected to see 1.5.0, it is now 5.0 (and where it was 1.5, it is now 5).
So, to summarize, the whole naming is a mess but this is finally over and the current platform name is JavaTM Platform, Standard Edition 6 (abbrev. JavaTM SE 6). Two Products are delivered under the platform: the JDKTM 6 and the JRETM 6.
OpenJDK 6 is an open-source implementation of the Java SE 6 Platform, it's different from Sun's JDK.
Java 1.5.x is the same as Java 5.x
Java 1.6.x is the same as Java 6.x
Basically throw away the 1. part of the version number.
Both 1.6 and 6 are used to refer to the same version (and similarly for 1.5 and 5).
The only difference is the single digit numbers are usually used in conjunction with Java SE 5 and Java EE 6.
The 1.5 and 1.6 versions are what the Java compiler says using java -version and sometimes 'the minor release' is used as a version string, like SunOS 5.8 was called Solaris 8 as a product name.
Guide to java versions is the best blog for any new person to understand java versioningSince 2019, Java releases new version every 6 months, i.e. March and September. It's October 2021, and Java 17 is already released. Here is the link to download OpenJDKCouple of noteworthy points
you can use always use the latest version of java, it will execute the code written using previous versions
previously JRE and JDK were separately distributed, now there is a trend to only distribute JDK
There are two distributions: OpenJDK (free) and OracleJDK (paid)