I installed Cassandra 4 on vm, then I want to use jconsole to monitor it, but I can't find the jconsole directory.
According to the documentation, it is located at /usr/lib/jvm/java-8-oracle/bin/jconsole. After I searched it was not there.
This is my java -version:
openjdk version "1.8.0_262"
OpenJDK Runtime Environment (build 1.8.0_262-b10)
OpenJDK 64-Bit Server VM (build 25.262-b10, mixed mode)
Can someone help me?
The documentation you're referring to is talking about Oracle Java, whereas you've installed OpenJDK. jconsole will be living in a different folder.
at the commandline, try ls -la $(which jconsole) to see where it is located. assuming the JDK installed the binaries in the "usual" places.
Related
Following the posts here and here, I had to have two different versions of Java/OpenJDK installed
brew install java
brew cask install java
now I have openjdk 13.0.2
openjdk 13.0.2 2020-01-14
OpenJDK Runtime Environment (build 13.0.2+8)
OpenJDK 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)
in two different locations
/usr/local/opt/openjdk/bin
/usr/local/opt/openjdk/libexec/openjdk.jdk/Contents/Home/bin/
and openjdk 14
openjdk 14 2020-03-17
OpenJDK Runtime Environment (build 14+36-1461)
OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)
also in two different locations
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/
/Library/Java/JavaVirtualMachines/openjdk-14.jdk/Contents/Home/bin/
so my questions are
why there are two different locations for each installation of OpenJDK?
how to find out if there are more installations of JDK on my system? Ran sudo find / -name java which nuked my terminal (see log here).
How to know how those different versions of java are installed?
I understand that JDK is Java SDK and JRE (Java Runtime Environment) is an oracle thing which I think OpenJDK doesn't have (?) but looking at OpenJDK download page what are "JMC" and "Java SE"?!
what you are seeing is the way that a JDK works on macOS. but basically what you should know that we have two entities called JDK and JRE. JDK is a tool for java developers to compile and run their applications. JRE is a runtime for clients to run java applications. JDK is containing a JRE, so you don't need to install JRE when you have JDK.
A JDK is a folder that you can have based on your OS and copy paste it every where that you need and just add the bin folder to your PATH . so you might have lot of JDK folders but only the one that is added to your PATH is your current working JDK, and they are not working at the same time in one environment but you can have multiple Java versions on different user profiles.
what you have is one installation with its meta data and links all over the macOS.
you can have multiple JDK folders all around your hard disk but only one of them at the current time is working and that would be the one that you have in the user profile.
I don't know a way to find out how they are installed. you can query the tools like brew in your os to find out that if they installed any java or not but not from JDK itself.
JMC is java mission control which is a monitoring application for java application. JRE, as I said, is a runtime for running the applications and OpenJDK also includes a runtime in itself. JavaSE is the specification of Java for Standard edition since we have other editions too.
I am beginner in linux (running Linux Mint 18.3), and trying to set-up my environment for Java development. I've done this several times on my Windows machine, and it always worked, but couldn't make it work for linux.
Running command java-version returns the following:
openjdk version "1.8.0_162"
OpenJDK Runtime Environment (build 1.8.0_162-8u162-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.162-b12, mixed mode)
Still, when I open IntelliJ, it says that Project SDK is not defined. When I am trying to set it up to the folder /usr/lib/jvm/java-8-openjdk-amd64/jre/bin (being the location I found digging into my filesystem starting with command whereis java) it says that "The selected directory is not a valid home for JDK". I've added manually the path also to $JAVA_HOME and '$PATH' but the problem persists.
The path you posted says "jre" in it, you need the JDK.
You need shoose JDK path
without BIN folder, like D:\java\jdk\jdk1.8.0_162
So, I had always thought there was no difference between the java.exe located in the jdk\bin and that in the jdk\jre\bin folders. Apparently, that is not the case, certainly not with java8 anyway.
I was testing the maverick ssh library and found that it would not auto-negotiate an encryption cipher from the list offered by the sshd server when using the java.exe from jdk\bin. Changing the java.exe used to that from the jre supplied with jdk (in the jdk\jre\bin folder) let the test app work fine.
So... what could possibly explain the difference - why would one java.exe work and the other not, if they are both the same?
They appear the same on the surface:
C:\Program Files\Java\jdk1.8.0_20>dir bin\java.exe
08/22/2014 03:35 PM 190,856 java.exe
C:\Program Files\Java\jdk1.8.0_20>dir jre\bin\java.exe
08/22/2014 03:35 PM 190,856 java.exe
But must be different under the hood:
C:\Program Files\Java\jdk1.8.0_20>diff bin\java.exe jre\bin\java.exe
Files bin\java.exe and jre\bin\java.exe differ
EDIT:
I did review the question which is suggested as a duplicate, however it did not address my question.
The versions of the binaries appear the same:
C:\Program Files\Java\jdk1.8.0_20>bin\java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
C:\Program Files\Java\jdk1.8.0_20>jre\bin\java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
I did not adjust the classpath or anything else on my commandline, other than the path to java.exe.
Compared the two using WinMerge... there are a few diffs nr the start and end (moreso) of the two files. All binary gobble-de-gook to me.
Re using that library and getting different results, that's almost certainly not anything to do with java.exe, but something to do with the classpath and jars used by the JDK install vs. the JRE install.
Re your different files, it's not just you: I dug up a Windows 8.1 machine with (an old copy of) Oracle's Java8 on it, and it's the same thing: Sizes, dates, and versions match, contents don't quite. This isn't true of my Linux box with Oracle's Java8 on it, where the jdk/bin/java and jdk/jre/bin/java files are identical (and not just symlinked). My guess is it relates to optimization defaults, but doesn't relate to your ssh library issue.
I have installed Oracle Java 7 in my /home directory by following steps given here (by just changing the path of installation). But still I cannot see the plugin listed in the chrome://plugins tab.
I also cannot see it running in JavaTester or here. I have tried enabling by following steps provided here but nothing works.
Some specifications:
Operating System: Ubuntu 14.04
output of java -version:
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
Please comment if anything more is needed for resolving the problem
Just pull it from webupd8 servers. Follow the directions at the following link.
http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
Also, this belongs on a different forum. This forum is for programming questions, installing a chrome plugin isn't really what we do. Next time post to the Ubuntu stack exchange located here.
My intention is to do a bit of modding of Minecraft using MCP. For that, my Java JDK needs to be specified in the system PATH and working. Unfortunately, it isn't working as typing "java -version" returns the version I use for running Minecraft (JRE7), not the one I've specified in the PATH (JDK6). (Note: JDK6 is supposedly what's needed for this, and the JRE obviously wouldn't work for development anyway.)
Here's my full PATH:
C:\Program Files\Java\jdk1.6.0_45\bin;C:\Program Files (x86)\OpenVPN\bin;C:\Program Files (x86)\Google\google_appengine\
The specified JAVA_HOME:
C:\Program Files\Java\jdk1.6.0_45
And here's the result of "java -version", even after a full system restart since installing the JDK and setting the PATH:
java version "1.7.0_45"
java(TM) SE Runtime Environment (build 1.7.0_45-b18)
java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
Help would be massively appreciated, thanks!
x_a_horse_with_no_name's comment got it! I simply renamed java.exe and javaw.exe in C:\Windows\System32 (& in \SysWOW64), thereby forcing Windows to instead read from the PATH. My guess is that the JDK6 install refused to overwrite the JRE7 files as they were newer or something. Regardless, problem solved, thanks!