How to get Java 6 JDK on mavericks - java

I am trying to get the Java 6 JDK on my mac. I've tried downloading this http://support.apple.com/kb/DL1572
But I can't find it in /Library/Java/JavaVirtualMachines
I already have Java 8 installed, and I don't want to remove it or replace it, I just want to have the Java 1.6 JDK that I can work with on my computer. (Need it to do my mandatory assignemtns for class. Studying Computer Science)
What do I have to do? Thanks in advance!

It installs in a different location.
$ uname -a
Darwin Yoyo-2.local 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64 i386 MacBookPro11,3 Darwin
$ /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

Related

How to change the default version of java by command line in Manjaro?

I use Manjaro operating system
I have installed OpenJDK version 11 and 18 (version 11 is installed first) and when I type java --version command in terminal it shows version 11.
java --version
openjdk 11.0.15 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+3)
OpenJDK 64-Bit Server VM (build 11.0.15+3, mixed mode)
How should I change the default Java version?
Is it possible to install update-alternatives on Manjaro?
in archlinux based distros you could use archlinux-java instead of update-alternatives.
use archlinux-java status to view the list of installed java versions and default one; then use archlinux-java set <JAVA_ENV>.

java command not running from JAVA_HOME on Mac Caralina

I installed java 8 and openjdk 11 on my Mac. JAVA_HOME is set to java 8, but when running java --version, it points to openjdk 11. Why is it happens and how can I make java command point to java 8?
running the command
echo $JAVA_HOME
java --version
output is
/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home
openjdk 11.0.8 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+11)
OpenJDK 64-Bit Server VM (build 11.0.8+11, mixed mode)
It is so wired.
export PATH=${JAVA_HOME}:${PATH}
Add this to ~/.zshrc. JAVA_HOME will be the first choice when running java.

How to set JDK 8 for Jenkins and JDK 14 for build job?

I am use Jenkins 2.222.4 on Windows 2016 server.
How to set JDK 8 for Jenkins and JDK 14 for build job?
Thank you! Because I really need this type of configuration.
C:\Users\Administrator>java -version
Java version "14.0.1" 2020-04-14
Java(TM) SE Runtime Environment (build 14.0.1+7)
Java HotSpot(TM) 64-Bit Server W (build 14.0.1+7, mixed mode, sharing)
C:\Users\Administrator>javac -version
javac 14.0.1
C:\Users\Administrator>

why java version not updated on mac machine?

I checked my java version from terminal .I got this information
Last login: Sun Mar 15 08:46:08 on ttys000
localhost:~ naveenkumar$ java -version
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
localhost:~ naveenkumar$
I install new java 1.8 JRE .close my terminal .Agan i type java -version .I found the same version .
why ? how to upgrade java version.
You installed Java 8 but it didn't overwrite this: /usr/bin/java
The easiest way for you to solve this problem is to install Java 8 JDK, not JRE. After install JDK, your path should be automatically updated.

Determine JRE architecture 32-bit vs 64-bit [duplicate]

This question already has answers here:
How can I tell if I'm running in 64-bit JVM or 32-bit JVM (from within a program)?
(13 answers)
Closed 6 years ago.
The thing I'm trying to find out is if my JRE is for 32-bit or 64-bit.
And yes, I have tried java -version / -showversion / -fullversion but it doesn't say anything useful (at least not to me).
This is what I get when I do java -version:
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode)
So all I have access to is a zipped JRE's bin-folder, a different JRE is installed and setup, that's not the one I'm trying to check the version of.
Any ideas?
System.getProperty("sun.arch.data.model");
If you're trying to do it from the command line, file is your friend:
$ cat `which java` | file -
/dev/stdin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for
GNU/Linux 2.6.32, BuildID[sha1]=440c433f29884a88f874e6d8260f156f4b352818,
stripped
(Using cat because in my case java is a symlink.)
I get the following when I run the command on my 64-bit machine. The java -version always gets you the on which is set in Environment properties or whatever is chosen from Java icon in JRE. There may be others as well installed on your machine. Look up on "arch".
C:\Users\nyera>java -version
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)

Categories