I was running SQL workbench on my mac, and it is complaining that it needs java 8, but instead it found java 10.0.1 on my computer. So I need to locate the java executable and find ways to downgrade the java version. However, I got totally lost when I was looking for the java version.
When I run '/usr/libexec/java_home -V' from terminal, I get this:
Matching Java Virtual Machines (3):
9.0.4, x86_64: "Java SE 9.0.4" /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home
When I run 'java -version', I get below, which means that it is pointing to the java 9.0.4 listed above:
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
However, when I check java control panel under 'System Preferences', it shows that my current java version is 10.0.1 under the tab 'General'. Under tab 'Desktop Settings', the listed JRE path is '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java'. So, it looks like the software (SQL workbench) is complaining about this java version. But how come it is not the java version I got from terminal (9.0.4)? Which java is actually running on my Mac in this case? If I want to change the java 10 listed under java control panel, what should I do?
Thanks!
Related
I am new to Java programming. I have installed Java SE 11 (LTS) (JDK 11.0.8) on my OS. Note that former Java also has jre folder in it. But Java 11 onward there come only JDK folder.
So, I have set JAVA_HOME environment variable as well as, included jdk\bin in path as well.
By checking on cmd java version shows as follow:
C:\Users\user>java -version
java version "11.0.8" 2020-07-14 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.8+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.8+10-LTS, mixed mode)
Then I installed eclipse 2020 09 version. But by making a simple Hello World project does not work.
And shows this error multiple times.
Description Resource Path Location TypeThe project was not built due to "Failed to init ct.sym for C:\Users\Irfan Umar\AppData\Local\Temp\eoiE758.tmp\plugins\org.eclipse.justj.openjdk.hotspot.jre.minimal.stripped.win32.x86_64_14.0.2.v20200815-0932\jre\lib\jrt-fs.jar". Fix the problem, then try refreshing this project and building it since it may be inconsistent HelloWorld Unknown Java Problem
What is the solution, I believe it is related to JRE not provided in JDK now.
Eclipse uses Java in two ways. It runs Eclipse with Java, and it allows specifying Java Runtime Environments in Preferences. I rarely see any reason to set JAVA_HOME anymore, because I specify the paths to the JDKs I want to use. I always have multiple JDKs installed.
I specify which JDK to use to run Java by setting the "-vm" path in the "eclipse.ini" file (which points to the "bin" directory).
I specify which JDK to use to compile code by adding JREs in preferences, and sometimes editing the "Execution Environments" (subsection of "Java Runtime Environments") to point to specific JREs.
Good day,
I'm trying to install "Teradata Studio" on my Mac. This is a software for working with Teradata database.
However, at the end of installation I get an error "Java Runtime Environment 1.8 or 10 is required and should be installed before installing Teradata Studio Application."
Can anyone please tell me what can I do about it? I already installed Java 1.8.
output of terminal commands
"/usr/libexec/java_home -V"
Matching Java Virtual Machines (3):
14, x86_64: "Java SE 14" /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home
13.0.2, x86_64: "Java SE 13.0.2" /Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home
1.8.0_201, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home
java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home
.bash_profile content:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home
So, looks like I already have Java 1.8.
Any ideas why it's not working?
Step 1: Get Java
You can download and install many different versions of Java, including Java 11 for mac from here:
https://www.azul.com/downloads/zulu-community/?package=jdk
Step 2: Check your version
Use the command java --version to identify which version of Java is currently active.
Step 3: Remove other versions of Java
If the version you just installed isn't showing, you may have multiple versions of Java installed on your machine. In this case you may need to remove existing versions of Java that are not the version you want. For Mac, java is typically installed in this directory:
/Library/Java/JavaVirtualMachines
To delete a version of Java from your machine, use the command "sudo rm -r directory" where directory is the name of the directory you want to remove.
Step 4: Repeat until done
Repeat steps 2 and 3 until your desired version of Java shows up during step 2. then try installing your software.
I am using Windows XP 32 bit system. I have java directory in my C:
Also when I searched, I found that Java is installed in C:\Windows\system32\ directory.
When I run java -version command in my command prompt, I got below result:
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) Client VM (build 24.45-b08, mixed mode, sharing)
I am able to run Java program in eclipse in my system.
I installed BlueJ in my system. When I open it, I got a pop up informing me that "BlueJ could not find a Java Development Kit. A JDK must be installed to run BlueJ. Click browse to locate JDK." I am not able to locate JDK in my system.
Can someone help me to locate JDK in my system?
You have most probably installed Java Runtime Environment (JRE) and not Java Development Kit (JDK)
A simple explanation is that you need JRE to run Java Programs and JDK to create them. BlueJ is an IDE for developing Java programs, so it will need JDK.
You can download it from here:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Make sure you choose the correct version for you OS (Windows, x86)
I've recently installed netbeans 7.3 on my Mac (Lion 10.7.5, up-to-date).
At the command line, I would get:
[129]$java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06-451-11M4406)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01-451, mixed mode)
Today I went to the netbeans plugin window and found 18 updates to install. When I attempted to do this, I received a message that some of them require > Java 1.7, and I only have 1.6 (as indicated above). So I dutifully ran out to java.com and downloaded Java 1.7 Update 21 successfully.
When I run a Java version checker in various browsers I see a report that Java 1.7.0_21 is the installed version. In addition, the Mac's Java Control Panel also indicates that 1.7.0_21-b12 is the current version.
However, upon restarting netbeans, it still has the same complaint that Java 1.6 is in use. I've rebooted the machine and get the same result. And, the result of 'java -version' at the command line also still shows the same result as above (1.6.0_45).
And, finally, even if I try something like:
/usr/libexec/java_home -v 1.7.0_21 --exec java -version
I get:
Unable to find any JVMs matching version "1.7.0_21"
I'm baffled. Does anybody have any advice on this?
Thanks.
Doug
netbeans will be using it's own version of the the JDK try this
where-can-i-set-the-jre-jdk-which-is-used-to-run-netbeans-besides-the-command-line
I'm running on ubuntu 12.04 and when I put in the terminal java -version I got this message:
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
but despite that, if I put in the terminal javadoc I receive a message as it isn't installed in my machine.
The Java Runtime Environment (JRE) doesn't include javadoc. It includes only the things required to run Java programs, not to develop them.
You need the JDK (Java Development Kit) which includes developer tools like javadoc, in addition to everything found in the JRE.
See the Ubuntu Java documentation.