Neo4j 2.0 and Java compatibility - java

I am using neo4j 2.0.
echo $JAVA_Home shows me : /usr/lib/jvm/java-7-oracle/jre
java -version shows me : java version "1.7.0_25"
But When I starting my server then it shows me warning
WARNING! You are using an unsupported Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 7.
What else does Neo4j want ??
Any help
Thanks

JAVA_HOME is not set to point to the a Java7 JRE.
On OSX, where I first noticed this problem, my JAVA_HOME is set in ~/.bash as
export JAVA_HOME=`/usr/libexec/java_home -v 1.7`

Related

Appium Setup - Determining what jdk version I am using on mac

I am following a guide to set up Appium on my mac. It is asking me to set my JAVA_Home variables. They are using: export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home
They have instructed me to replace jdk1.8.0_192.jdk with my own version of JDK.
How would I find out what my JDK is?
I have tried using: java -version
java version "11.0.11" 2021-04-20 LTS
I am unsure how to translate that into the correct JDK.
Thanks in advance for any help
For the currently used jdk version;
/usr/libexec/java_home -V
You can use this command.
I was able to find the jdk version using the below command:
ls /Library/Java/JavaVirtualMachines

Elasticsearch: could not find java in bundled jdk at .../jdk/bin/java

When I try to run .bin/elasticsearch, I get the following error:
could not find java in bundled jdk at /home/ubuntu/Elastic
Search/elasticsearch-7.8.0/jdk/bin/java
I have absolutely no idea what's going on. I know this topic has been created before, but I haven't found a way to fix. For java -version I get:
openjdk version "1.8.0_265"
OpenJDK Runtime Environment (build 1.8.0_265-8u265-b01-0ubuntu2~20.04-b01)
OpenJDK 64-Bit Server VM (build 25.265-b01, mixed mode)
Can anyone help me please? Thank you!
The most probable reason for the above error is that JAVA_HOME is not set
To display JAVA_HOME variable path, run this command echo $JAVA_HOME
If nothing appears then follow the below steps:
To see all the java versions installed in Ubuntu, use this command:
sudo update-alternatives --config java
Set your java path using this. - export JAVA_HOME=<YOUR-JAVA-PATH>
I had the similar problem on linux, when I was running elasticsearch using
sh elasticsearch
I got the error
Elasticsearch: could not find java in bundled jdk at .../jdk/bin/java
Then I referred to the official document
and set ES_JAVA_HOME environment variable.
After running elasticsearch again, I got the following message and it ran successfully
ignoring JAVA_HOME=/project/jdkForElasticSearch/; using ES_JAVA_HOME
Note: After setting environment variable, restart your terminal to reflect the updated value in it.

Requirements check failed for JDK 8 ('1.8.*')! Detected version: 13.0.2

Help me please! I don't know what else to do ... I've read all the help that talks about it and so far I haven't been able to solve it!
Tiagos-iMac:app tiago$ cordova run android Checking Java JDK and
Android SDK versions ANDROID_SDK_ROOT=/Users/tiago/Library/Android/
(recommended setting) ANDROID_HOME=/Users/tiago/Library/Android/
(DEPRECATED) Requirements check failed for JDK 8 ('1.8.*')! Detected
version: 13.0.2 Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH
environment variables. Tiagos-iMac:app tiago$
How can I solve this? Please help!
.bash_profile
export JAVA_HOME=$(/usr/libexec/java_home)
PATH=$PATH:$HOME/Library/Android/Sdk/emulator
PATH=$PATH:$HOME/Library/Android/Sdk/tools
PATH=$PATH:$HOME/Library/Android/Sdk/tools/bin
PATH=$PATH:$HOME/Library/Android/Sdk/platform-tools
export ANDROID_SDK_ROOT=$HOME/Library/Android/
PATH=$PATH:$HOME/Library/Android/Sdk/emulator
PATH=$PATH:$HOME/Library/Android/Sdk/tools
PATH=$PATH:$HOME/Library/Android/Sdk/tools/bin
PATH=$PATH:$HOME/Library/Android/Sdk/platform-tools
export ANDROID_HOME=$HOME/Library/Android/
export ANDROID_AVD_HOME=~/.android/avd
export PATH=$PATH:/opt/gradle/gradle-6.1/bin
Java
Tiagos-iMac:~ tiago$ java -version
java version "13.0.2" 2020-01-14
Java(TM) SE Runtime Environment (build 13.0.2+8)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)
Tiagos-iMac:~ tiago$
Uninstall any previous Java versions, then install required JDK
If you are on MacOSX Catalina^ use brew to install JENV to switch your java environment; and you are using Zsh you may need to run this command:
echo 'eval "$(jenv init -)"' >> ~/.zshrc
and restart your session (Terminal / Hyper etc.) and then try switching your java version, eg:
jenv global 1.8
You can then test that out with
java -version
In my case, _JAVA_OPTIONS variable was set in the System Variables. Removing this fixed the issue.

Change JAVA_HOME variable in mac os for ionic

I have made changes by using below command to set JAVA_HOME
rajendras-mbp:demo username$ /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home
rajendras-mbp:demo username$ export JAVA_HOME="`/usr/libexec/java_home -v '1.8*'`"
rajendras-mbp:demo username$ java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
It sets JDK 1.8 when i checked java version
But after i hit the ionic cordova run android it's throwing below error
ANDROID_HOME=/Users/username/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home
(node:2191) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Requirements check failed for JDK 1.8 or greater
(node:2191) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[23:27:26] lint finished in 3.77 s
What to change? How to set 1.8 JDK to ionic ?
I know this is an old question but I would like to share how I solved this incase it might help others in the future.
I had both java 1.8 and the latest 14.0.2.
I solved this on Mac OS by setting the java_home version to 1.8
# Create a JAVA_HOME variable, determined dynamically
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
# Add that to the global PATH variable
export PATH=${JAVA_HOME}/bin:$PATH
Then source ~/.bash_profile and java -version
Output:
java version "1.8.0_271"
Add the following to both ~/.profile and ~/.bashrc (/etc/bashrc, then ~/.bashrc) for your USER:
export IDEA_SDK=$(/usr/libexec/java_home -v 1.8)

Setting Java home enviroment variable in OSX Mavericks

I am having issues with my Java path.
I have installed the latest version of Java 1.7.0_51. When I open the Java control panel it tells me "Your system has the recommended version of Java."
However when I go to terminal and type java -version I get
java version "1.6.0_32"
So after searching around I came across this SO Question which tells me that my Java home environment variable needs to be set.
I then opened the bash_profile file and added the below line to the top of the file, above my Python path info.
export JAVA_HOME=`/usr/libexec/java_home -v 1.7.0_51`
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
NOTE: I have tried this with both -v 1.7.0_51 and -v 1.7
I save the file and recheck in terminal but it is still showing
java version "1.6.0_32"
when I restart Terminal I do however see
Last login: Wed Feb 19 23:32:19 on ttys000
Unable to find any JVMs matching version "1.7".
localhost:/ user$
Note: Unable to find any JVMs matching version "1.7".
So it is trying to look for my 1.7, but just not finding it.
What am I doing wrong?
Check whether there is an old version existed in the path
echo $PATH
Then set the java 1.7 bin directory.
export PATH=/usr/libexec/java_1.7_home/bin:$PATH
Then try to type in "java -version" in terminal to check the version
Ok, I think this must be specific to me. As above the Java control panel was saying that java 7 was installed. Also when i tried
/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
I would get
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
But no mater what way I installed the JDK it would not work. It just didn't seem to appear anywhere on my machine. I still don't know why, but uninstalling (by simply deleting the 1.6 folder) the existing Java 6 from my machine and once again installing Java 7 JDK eventually fixed it.
Please give the up-votes to #diaz994 above.

Categories

Resources