I've downloaded and extracted the tar file, but when I try to run the webstorm.sh file, I get the error:
"No JDK found. Please validate either WEBIDE_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.
I have Java installed:
[root#local.host]# java -version
java version "1.7.0_51"
OpenJDK Runtime Environment (rhel-2.4.4.1.el6_5-x86_64 u51-b02)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
[root#local.host]# ls -lah /etc/alternative/java
lrwxrwxrwx. 1 root root 46 Jan 27 23:06 /etc/alternatives/java -> /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
I've also set the environment path, although I'm not 100% certain of it's correctness. Contents of .bash_profile:
PATH=$PATH:$HOME/bin
export PATH
export JDK_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin
export JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin
export PATH=$PATH:/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin
What am I missing/doing wrong?
If you check the System Requirements and Installation page of WebStorm's website, you will see the following requirements for Linux...
System Requirements
Intel Pentium III/800 MHz or higher (or compatible)
512 MB RAM minimum, 1 GB RAM recommended
1024x768 minimum screen resolution
Oracle (Sun) JDK 1.6 or higher. Open JDK is not supported.
GNOME or KDE desktop.
And as confirmed by your system...
OpenJDK Runtime Environment (rhel-2.4.4.1.el6_5-x86_64 u51-b02)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
This is why your WebStorm is complaining about a valid JDK installation.
As cited in WebStorm's website, the article Swapping OpenJDK for Sun JDK on Ubuntu can be useful to you.
The Sun JDK and OpenJDK are contained within the same installer. OpenJDK is used by default. After downloading and installing the JDK from the Oracle site, to specifically use Sun JDK, the following command must be run:
[root#local.host]# alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 200000
Related
I installed Oracle SQL Developer following an article online in my Virtual Box Ubuntu.
My Ubuntu has IBM ACE 11 Developer Edition installed. So when I type java -version at terminal (user), I got this:
java version "1.8.0_271"
Java(TM) SE Runtime Environment (build 8.0.6.20 - pxa6480sr6fp20ifix-20210224_01(SR6 FP20+IJ30974))
IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20210223_466229 (JIT enabled, AOT enabled)
OpenJ9 - 5b31a42
OMR - 4eb8f5f
IBM - b7e48f4)
JCL - 20201119_01 based on Oracle jdk8u271-b0
But in my root terminal , my java -version is
java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)
JAVA_HOME in both .bashrc and /etc/profile are set to usr/lib/jvm/jdk1.8.0_291 (newly downloaded JDK as per the article)
First question is why I have set those JAVA_HOME path to the same one, but java -version in user account is not the JDK that I installed newly.
# update-alternatives --list java
/opt/IBM/ace-11.0.0.12/common/jdk/jre/bin/java
/usr/lib/jvm/jdk1.8.0_291/bin/java
I have set to use the newly installed java (/usr/lib/jvm/jdk1.8.0_291/bin/java) using the sudo command update-alternatives --set java ....
I am able to start sqldeveloper using root. But not able to start sqldeveloper using user account where I have set the SetJavaHome to newly installed Java path.
I tried this https://askubuntu.com/questions/566721/sql-developer-runs-in-terminal-with-sudo-sqldeveloper-but-not-without-sudo where it asked to change the file ownership. But still it doesn't work
I got error when trying to start sqldeveloper
Oracle SQL Developer
Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
/usr/lib/jvm/jdk1.8.0_291/bin/java: relocation error: /usr/lib /jvm/jdk1.8.0_291/jre/lib/amd64/libnio.so:
symbol initInetAddressIDs version SUNWprivate_1.1 not defined in file libnet.so with link time reference
Second question is how can I approach to solve the error when starting sqldeveloper without using root?
The bashrc and other profile based scripts like bash_profile etc., that are executed on login are different for different users. Maybe the root users bashrc does not have this JAVA_HOME or might have a different version altogether. So make sure the files in the home directory of both these users are have the same version. For more information you can check What's the difference between .bashrc, .bash_profile, and .environment?
The error states that symbol initInetAddressIDs version SUNWprivate_1.1 not defined in file libnet.so. This might be an issue of java setup. The .so libraries being fetched might be mixed up. It might work once you fix up 1st issue.
I just tried to run Eclipse on a Mac Book Pro running OSX Mavericks. I've downloaded both, the 32 and the 64 bit version. Both end up in following Notification:
Version 1.6.0_65 of the JVM is not suitable for this product.
Version: 1.7 or greater is required.
I know that the question was already asked, but my Eclipse won't event start with the 64-bit version, which was the answer for a smiliar question. So I checked the version of my installed Java by running
java -version
In the terminal. The output really confirmed, that version 1.6.0_65 was installed. Here's the output:
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)
Now the problem is that when launching the Java Control panel, it says, that Java 7 Update 67 is installed, and there are no updates.
So where's my problem, how get I get Eclipse to run?
You can modify the eclipse.ini and add the path to your JDK7
For versions of Mac OS X 10.7+ the location has changed to
-vm
/Library/Java/JavaVirtualMachines/<''jdk_name_ver''>/Contents/Home/...
To be safer, determine the location for the JDK you intend to use via the utility /usr/libexec/java_home and put this value with .../bin/java appended into the eclipse.ini file.
See "How to install JRE 1.7 on Mac OS X and use it with Eclipse?"
I installed JDK, "Java SE Development Kit 8u101", in addition to JRE and eclipse started to work fine.
I downloaded JDK for Mac OS X 10.9.1 from Oracle, but I had to install another Java from Apple site once more, as I couldn't launch eclipse with it.
These are two pages that I referred.
Installing Java on OS X 10.9 (Mavericks)
http://support.apple.com/kb/DL1572?viewlocale=en_US
Now I have three java binaries installed in my computer.
Installation A
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
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)
Installation B
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
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)
Installation C
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin/java
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)
I found that I can easily remove Installation C, however I'm not sure if this is OK.
When I invoked java from command line, it points to Installation A.
java -version
java version "1.7.0_51"
ls -alF `which java`
lrwxr-xr-x 1 root wheel 74 Jan 15 09:12 /usr/bin/java# -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
Is there any way to use just one JDK 1.7 for Mavericks by removing two of them safely?
EDIT
After some setup and test, I have only one Java (1.6) installed.
I have Installation B, and now Installation C is linked to Installation A.
For using eclipse, I had to make Compiler Compliance level to 1.6 to use it (from the help java.lang.UnsupportedClassVersionError Unsupported major.minor version 51.0).
EDIT2
This seems to what happened.
Installation of Apple Java
Installation A
Installation B is a symbolic link to A
Installation of Oracle Java
Installation C
Changed the Installation B that
Created a /System/Library/Frameworks/JavaVM.framework/Versions/A
Copied files from Installation C (not symbolic link)
Make a symlink Current to Versions/A
I tried to install Oracle Java only by removing Apple Java, but I got installation error, so I guess Apple Java is needed to install Oracle Java.
Specify the JVM for Eclipse
You can specify JDK version for usage with Eclipse in eclipse.ini. This will resolve problem with starting Eclipse.
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin/java
Warning: Add this configuration before -vmargs.
Master your Java Environnement with jenv
It is much easier to maintain multiple JDK versions with jenv.
jenv is for a equivalent of rbenv, but for Java environnement. It allow to easily switch between several JDKs installations (already presents), and configure which one to use per project.
Eclipse JDK
Setting JDK in Eclipse
It seems like that the oracle JDK can be just removed. For eclipse, I could add Installation A as a default JRE from Java Build Path -> JRE System Library -> Installed JRES -> Add ...
I'm trying to install JDK 1.7 update 21 on Mac OSX 10.7 .
I downloaded the installer from oracle site (as dmg file). ran the installer which completed successfully.
Now I can't find the java SDK anywhere on the file system.
The output of /usr/libexec/java_home -V is :
***/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home***
which is the previous version installed.
also running java -version executes the same old 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)***
In the java control panel I do see that the JRE has updated to Java 1.7 for the browser but there aren't any details regarding the JDK there.
Where can I find the new JDK on the file system and how do I set it as default ?
Is there any log file for the installation that I can use to debug ?
Try adding this to your shell startup script (.bash_profile off of ~ if you are using bash):
export JAVA_HOME=`/usr/libexec/java_home -v '1.7*'`
The changeover from Apple providing the JDK to Oracle has been a complete disaster.
Ok, I'm trying to install Websphere (from IBM) on my Ubuntu 12.04 LTS Server.
But when it cames to install the .bin, it says no Java VM can be found on the server, but when I get the Java version it's fine.
Here's the response I get when I run this commands:
$ sudo path/*.bin
Preparing to install ...
Extracting the installation resources from the installer archive..
Configuring the installer for this system's environment...
no Java virtual machine could be found from your PATH environment variable. You must install a VM prior to running this program.
$ java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pxi3260sr12-20121025_01(SR12))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260sr12-20121024_126067 (JIT enabled, AOT enabled)
J9VM - 20121024_126067
JIT - r9 20120914_26057
GC - 20120925_AA)
JCL - 20121014_01
$ cat /etc/environment
JAVA_HOME="/opt/ibm/java-i386-60"
JRE="$JAVA_HOME/jre"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/imb/java-i386-60/bin:/opt/ibm/java-i386-60/jre/bin"
When you use sudo, the command is run as root and not as the current user. You need to configure root's $PATH to include Java.
Try sudo java -version to see if Java is property configured for root (it sounds like it isn't).