Java 7 on OS X not displaying anywhere but in console [duplicate] - java

This question already has an answer here:
Installed Java 7, but interminal still Java 6 [closed]
(1 answer)
Closed 9 years ago.
Ok, I went through the steps to install Java 7 on my Macbook from http://java.com and the applet the FAQ has me run after the install to verify the version running indicates 1.7.0_17 should be what I'm running. The java console indicates the same however, it looks like both are just showing me what version of plug-in is running. When I run:
jave -version
From the terminal it is still showing 1.6.
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)
When I check the JavaVirtualMachines folder it only shows 1.6 and a find from root does not show 1.7 anywhere. I'm obviously new to os x and need some guidance as to what I am missing. I need to install the 7 jdk and set it as my default for all new dev.
Thank you!

Fixed. java.com is the WRONG place to get the JDK. (I should've noticed it!) Go here instead.
http://www.oracle.com/technetwork/java/javase/downloads/index.html

Related

Add/Make New JDK the default JDK on Mac OS [duplicate]

This question already has answers here:
set mac jdk version to 1.8
(2 answers)
Closed 1 year ago.
I am Currently using JDK 16 on my mac book pro so i wanted to run a fluuter project which i bought from Codecanyon and i noticed an error which i looked up and the solution was the JDK version that i need to install jdk 8 in-other to run the project, so i downloaded the JDK8 and installed but when i run
Java -version
i still get
java version "16.0.2" 2021-07-20 Java(TM) SE Runtime Environment
(build 16.0.2+7-67) Java HotSpot(TM) 64-Bit Server VM (build
16.0.2+7-67, mixed mode, sharing)
i have tried adding the file path to bash file by running
touch ~/.bash_profile; open ~/.bash_profile
and adding it to my path file like bellow
export PATH="$PATH:/Users/bright/Development/flutter/bin" export
PATH="$PATH:/Library/Java/JavaVirtualMachines
still when i run the
Java -version
i still see the version 16...
how do i set my Mac os to be seeing the JDK 8 or better still how to set it as the default JDK?
there are a few questions on stackoverflow like this.
In general to set java 1.8 as the shell enviroment try this:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
How to set or change the default Java (JDK) version on macOS?
set mac jdk version to 1.8

Java issue with h2o - not recognizing java version

I've always used a Mac and don't remember encountering this in the past so I'm not sure what I'm doing wrong. Theres a bit of q's on this on the internet already but I didn't find a solution yet for me.
I just got a new mac and I'm trying to use rJava & h2o specifically. Below is a couple of things I ran and the output from them. Can someone help me out?
Java --version
java --version java 10.0.1 2018-04-17 Java(TM) SE Runtime Environment
18.3 (build 10.0.1+10) Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
Javac --version
javac 10.0.1
/usr/libexec/java_home -V
Matching Java Virtual Machines (2):
10.0.1, x86_64: "Java SE 10.0.1" /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
1.8.0_171, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
Sys.getenv('JAVA_HOME')
"/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk"
library(h2o)
h2o.init()
H2O is not running yet, starting it now... Error in value[3L] : You have a 32-bit
version of Java. H2O works best with 64-bit Java. Please download the
latest Java SE JDK 7 from the following URL:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
I definitely have the 64 bit of java installed as I re-installed it to be sure and see above the x64 notification from the output. Also, I have gotten this to work on another computer and so I don't understand what is going on with this one.
I also did
vim ~/.bash_profile
EXPORT JAVA_HOME = "/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk"
but this doesn't seem to help me target the Java 8.
You have various problems.
H2O currently does not support Java 10 (that you are using). You need to use Java 8 or Java 7.
Supported versions include: Java 7 or later.
Note: Java 9 is released, but is not currently supported.
Java 9 support will be added in an upcoming version.h2o website
For rJava on Mac I send you to
Loading rJava on Mac OS High Sierra
I am running h2o on a mac with high sierra (and rJava, for a different project) with R v. 3.4.4 and Java 8. All good.

Error while starting eclipse spring boot. - Java was started but returned exit code=13 [duplicate]

This question already has answers here:
Cannot run Eclipse; JVM terminated. Exit code=13
(34 answers)
Closed 5 years ago.
I have download eclipse spring boot but it is not starting. On running STS.exe, it is throwing error. Please help.
Make sure that the JVM version (32/64 bit) you use matches the eclipse version (32/64 bit).
My Java Version is 64-bit JVM
and Spring Boot Eclipse Version is 32-Bit
If you get same check the version of both JVM and Spring Boot Eclipse Version both should be 32-bit or 64-bit
Java version can check by command prompt.
C:\Users\GHAR>java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
To check Spring Boot Eclipse verison, go to
D:\STS_64BIT\sts-bundle\sts-3.8.3.RELEASE\
open .eclipseproduct file in the folder,
check package= parameter
64-bit look like this
package=spring-tool-suite-3.8.3.RELEASE-e4.6.2-win32-x86_64.zip
32-bit look like this
package=spring-tool-suite-3.8.3.RELEASE-e4.6.2-win32.zip
I hope this will help some one future.

Java compile not working... installed JDK and it has worked before

OK... This is kind of odd. So, yesterday, on my new computer, I installed the latest JDK 8 for Windows 7. I input it to environmental variables, I did everything correctly, and I know it for sure because it worked yesterday. I compiled multiple .javas. But now today, I use the javac on any .java, and the CMD prompt just goes back to "C:\Users\Home Computer>"
I've restarted, hours of research, but this problem seems new. Even uninstalled and reinstalled JDK. Any ideas? Thanks in advance.
Command Prompt Screenshot
Open CMD, type in "java -version", press Enter & show us what you got there. Does it look like:
C:\Users\W>java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
C:\Users\W>
You can debug it step by step following the official guide of Oracle or external document:
https://docs.oracle.com/javase/tutorial/essential/environment/paths.html
https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html

Unable to install Java Runtime (6) on Mac

I'm having a problem of installing java SE runtime 6 on mac, without that, I can't open my eclipse or install Intellij. However, I download the .dmg through an Apple - Java link, but it just doesn't install!
And there's no error message, just the page of falling installation.
I really don't know how to solve it.
This is kind of an update of my problem... I used to have Java SE runtime 6 and tried to install jdk 1.8 and failed. Same picture appeared. Just said failed installing with no error messages. I guessed might be a conflicts? and deleted Java 6 and basically can't run eclipse & Intellij (this solved thought) I still have java 1.7 here.
I just can't figure out why I can't install (or reinstall) java 1.6 or java 1.8. What could be the problem?
Some system updates:
if I do: "which java":
/usr/bin/java
if "echo $JAVA_HOME":
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home
if java -version:
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
What could be possibly wrong?!!!????
God
You need to get Java directly from Oracle (http://www.oracle.com/technetwork/java/javase/downloads/index.html) as Apple stopped supporting Java some time ago. Unless you have pressing reasons for using Java 6 I suggest also installing at least Java 7, although you can have all three versions installed and select the appropriate version for the app you want to run/develop.
Edit Also, if you want to use Eclipse or IntelliJ (go for IntelliJ) you want to get the JDK and not the "runtime" (JRE).

Categories

Resources