Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find Java 1.8 or higher #1787

Closed
FillyJ opened this issue Sep 25, 2017 · 74 comments
Closed

Error: Cannot find Java 1.8 or higher #1787

FillyJ opened this issue Sep 25, 2017 · 74 comments
Assignees

Comments

@FillyJ
Copy link

FillyJ commented Sep 25, 2017

EDIT: Since Gephi (0.9.3) Java is embedded into Gephi so there should not be any problem with Java anymore. You don't need to install Java separately.

Installed Gephi - 0.9.2 and the latest version of Java, the Java 8 - update 144. I still can't launch Gephi and it prompts an error message every time I try to do so.

  • Version used: Gephi 0.9.2
  • Java version: 8
  • Operating System: Windows 10 - Home, 1703

Any help?

@eduramiba
Copy link
Member

I recommend you try the workaround explained at https://stackoverflow.com/questions/29052219/cannot-find-java-please-use-the-jdkhome-switch (gephi.conf instead of netbeans)

@eduramiba eduramiba self-assigned this Sep 25, 2017
@schignel
Copy link

schignel commented Sep 26, 2017

I'm having the same issue as FillyJ. Here are my system specifications. I

Version used: Gephi 0.9.2
Java version: 8 Update 73
Operating System: Windows 7 - Professional

I attempted to follow the workaround from stackoverflow, but could not locate the netbeans.config file on my system...

Interestingly, I am able to run Gephi 0.9.1, but if I close the program it won't start again (the loading screen appears briefly and then disappears). At that point the only way I can get it to run is to restart the computer. I'm wondering if the issues are somehow both related to Java?

Any thoughts?

@eduramiba
Copy link
Member

Hi,
You should look for gephi.conf instead of netbeans.conf

@eduramiba
Copy link
Member

eduramiba commented Sep 26, 2017

@FillyJ did it work?

@FillyJ
Copy link
Author

FillyJ commented Sep 26, 2017

Hey, a classmate recommended that I try Java SE Runtime Environment 8 instead, and that is working for now. I can report back if it stops working again.

@schignel
Copy link

schignel commented Sep 26, 2017

Thank you @eduramiba! Changing the path in gephi.conf seems to have worked.

@eduramiba
Copy link
Member

Great!

@m2d511
Copy link

m2d511 commented Sep 26, 2017

Folks and @eduramiba
Could you please tell me how this line of code should look in gephi.conf?
#jdkhome="C:/Program Files (x86)/Java/jre1.8.0_131" nothing seems to work here.

Thanks in advance,

@eduramiba
Copy link
Member

Remove the '#' since that makes the line a comment.

@m2d511
Copy link

m2d511 commented Sep 26, 2017

same problem

@eduramiba
Copy link
Member

Does the path actually exist and point to a valid JRE/JDK?

@schignel
Copy link

schignel commented Sep 26, 2017

If it's helpful, here's what mine looks like:
image

@m2d511
Copy link

m2d511 commented Sep 27, 2017

..sorry for my late thanks! it worked!

@A000045
Copy link

A000045 commented Oct 22, 2017

Hi,
Just updated to gephi 0.9.2 => I get the "Cannot find Java 1.8 or higher" message.
I really don't understand the workaround here, could someone help please ?

Running Win 10
I don't really understand the purpose of the JRE or JDK, but apparently I have three different bersions of JRE installations (Java/about/Desktop Settings) :

  • jre-9.0.1 (amd64)
  • jre-9 (amd64)
  • jre1.8.0_144 (x86)

I think I've installed too many programs
(but Gephi was working earlier today anyway, just before the update...)
Also I just tried to install JDK following a tuto but I can't find it anywhere...

Basically, all I wanted was to see if I could visualize some text data and now it seems I won't be able to do it unless I own a PhD in IT... Should I drop it now or is there a chance that I'm able to use gephi without being a pro dev ?

Thanks for attention

@eduramiba
Copy link
Member

@A000045 if you have 64 bit Windows, just try to install 64 bit Java 8 instead of x86

@ghost
Copy link

ghost commented Oct 27, 2017

I was able to get it to work. So, I can verify that you have to add the line
jdkhome="C:/Program Files (x86)/Java/jre1.8.0_151"
to the gephi.conf file in C:\Program Files\Gephi-0.9.2\etc

However, I had some trouble with exactly WHERE to put it. As someone very new to this, I'll describe all the steps I went through. Hopefully it will save you some trouble.

First of all, when I open the gephi.conf in Notepad, the whole file is in one long line. Something like this:

#${HOME} will be replaced by user home directory according to platform default_userdir="${HOME}/.${APPNAME}/0.9.2/dev" default_mac_userdir="${HOME}/Library/Application Support/${APPNAME}/0.9.2/dev" # options used by the launcher by default, can be overridden by explicit # command line switches default_options="--branding gephi -J-Xms64m -J-Xmx512m -J-Xverify:none -J-Dsun.java2d.noddraw=true -J-Dsun.awt.noerasebackground=true -J-Dnetbeans.indexing.noFileRefresh=true -J-Dplugin.manager.check.interval=EVERY_DAY" # for development purposes you may wish to append: -J-Dnetbeans.logger.console=true -J-ea # default location of JDK/JRE, can be overridden by using --jdkhome

switch jdkhome="\path\here" # clusters' paths separated by path.separator (semicolon on Windows, colon on Unices) #extra_clusters=

Without the correct format, it's not clear when a comment ends or begins. So I decided to add the reference to java at the beginning. Like this:

jdkhome="C:/Program Files (x86)/Java/jre1.8.0_151" # ${HOME} will be replaced by user home directory according to platform default_userdir="${HOME}/.${APPNAME}/0.9.2/dev" default_mac_userdir="${HOME}/Library/Application Support/${APPNAME}/0.9.2/dev" blahh.....

And then I tried to open gephi again. And I got the message that they could not find the java file in "C:/Program Files (x86)/Java/jre1.8.0_151" # ${HOME}

Which means that somehow this ${HOME} was not commented out correctly.
When I added the correct spacing:

jdkhome="C:/Program Files (x86)/Java/jre1.8.0_151"
#${HOME} will be replaced by user home directory according to platform default_userdir="${HOME}/.${APPNAME}/0.9.2/dev" default_mac_userdir="${HOME}/Library/Application Support/${APPNAME}/0.9.2/dev" blahh.....

Then everything worked perfectly...

@pooja7b
Copy link

pooja7b commented Oct 29, 2017

update the path here
#jdkhome="\path\here"
to
jdkhome="C:\Program Files (x86)\Java\jre1.8.0_151"
note that you should remove the '#' symbol.
The above comments were really helpful. I was able to get mine working.

This was referenced Oct 31, 2017
@xiangchen-ee
Copy link

Hi guys, is there other reason for Gephi to stuck in the "starting modules" step?
I have changed the jdkhome but it doesn't work.

Gephi version: 0.9.2 x64
Java version: jre-8u151-windows-x64
jdkhome="C:\Program Files\Java\jre1.8.0_151"
OS: Windows 7 Professional SP1 x64

@wilchivs
Copy link

wilchivs commented Nov 13, 2017

I've just experienced the same problem with Gephi not finding Java 1.8 or higher (although I have no idea what caused this as v0.9.1 was working fine last week and the problem didn't resolve when I updated to 0.9.2).

But I can confirm pooja7b's solution works. I did have to double-check the relevant filename in the Java folder though, so instead of:
jdkhome="C:/Program Files/Java/jre1.8.0_151"
I had to input:
jdkhome="C:/Program Files/Java/jre1.8.0_131"

@j00nas
Copy link

j00nas commented Nov 14, 2017

Hi guys,

i got the same problem, but found another, very simple solution:
I just use "gephi.exe" in my ...\Gephi-0.9.2\bin folder instead of "gephi64.exe".
Maybe it will work for you, too!

@eduramiba
Copy link
Member

@JonasLohmueller That usually means your OS is 64 bit but your java installation is not.

@giugnomt
Copy link

Installing Java SE Runtime Environment 8 at http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html That Java error disappeared! Awesome!

@ThatAndresV
Copy link

@giugnomt fix worked for me too. Way simpler than noodling with config files.

@mattmattingly
Copy link

mattmattingly commented Sep 26, 2018 via email

This was referenced Oct 12, 2018
@wsamaral
Copy link

I had to install the 64bit version to work.

@mattmattingly
Copy link

mattmattingly commented Dec 12, 2018 via email

@leolle
Copy link

leolle commented Dec 26, 2018

add the following java path in gephi.conf works for me.

jdkhome="C:/Program Files (x86)/Java/jre1.8.0_191"

gephi.conf is located at C:\Program Files\Gephi-0.9.2\etc\gephi.conf

jdkhome="C:/Program Files (x86)/Java/jre1.8.0_191"
# ${HOME} will be replaced by user home directory according to platform
default_userdir="${HOME}/.${APPNAME}/0.9.2/dev"
default_mac_userdir="${HOME}/Library/Application Support/${APPNAME}/0.9.2/dev"

# options used by the launcher by default, can be overridden by explicit
# command line switches
default_options="--branding gephi -J-Xms64m -J-Xmx512m -J-Xverify:none -J-Dsun.java2d.noddraw=true -J-Dsun.awt.noerasebackground=true -J-Dnetbeans.indexing.noFileRefresh=true -J-Dplugin.manager.check.interval=EVERY_DAY"
# for development purposes you may wish to append: -J-Dnetbeans.logger.console=true -J-ea

# default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch
#jdkhome="/path/to/jdk"

# clusters' paths separated by path.separator (semicolon on Windows, colon on Unices)
#extra_clusters=

@so-sal
Copy link

so-sal commented Feb 1, 2019

I modified the file "C:/Program Files/Gephi-0.9.2/etc/gephi.conf"

#jdkhome="/path/to/jdk"
-> jdkhome="C:/Program Files/Java/jdk-11.0.2"

and it works!

@Tunacanunal
Copy link

Hey, a classmate recommended that I try Java SE Runtime Environment 8 instead, and that is working for now. I can report back if it stops working again.

it is working correctly, thanks for your advice

@Fankbai
Copy link

Fankbai commented Jun 5, 2019

go to the folder: ** \Gephi-0.9.2\bin** ,click to the Gephi.exe instead of Gephi64.exe, which works for me.

@mdf-github
Copy link

mdf-github commented Aug 30, 2019

Folks and @eduramiba
Could you please tell me how this line of code should look in gephi.conf?
#jdkhome="C:/Program Files (x86)/Java/jre1.8.0_131" nothing seems to work here.

Thanks in advance,

Did this without the "#" comment marker, but replaced the "/" with "\". It worked on Windows 10.

@Nico769
Copy link

Nico769 commented Sep 26, 2019

Folks and @eduramiba
Could you please tell me how this line of code should look in gephi.conf?
#jdkhome="C:/Program Files (x86)/Java/jre1.8.0_131" nothing seems to work here.
Thanks in advance,

Did this without the "#" comment marker, but replaced the "/" with "". It worked on Windows 10.

Works perfectly on Windows 10, thanks.

@smwikipedia
Copy link

smwikipedia commented Nov 14, 2019

Hi,
You should look for gephi.conf instead of netbeans.conf

This works for me. After I added below line, Gephi can start.

# default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch
jdkhome="C:/Program Files (x86)/Java/jre1.8.0_231"

@amcrobert
Copy link

Has anyone solved this on a Mac? MacOS Catalina 10.15 specifically... Thanks in advance

@AmericoAlves
Copy link

This was my solution:

# default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch
jdkhome="C:\Program Files (x86)\Java\jre1.8.0_231"

My Java shortcut was being addressed to a java.exe at
C:\Program Files (x86)\Common Files\Oracle\Java\javapath_target_25227140\

As all of you was ponting to /Program Files (x86)/Java/ ,
i went there and found 3 instalations. I simply pointed gephi.cong to the most recent one.

Thanks and wishes of a glorious and happy new year!

@NGOEntrepreneur
Copy link

I'm on Windows 10 64 bit and finally had success running Gephi after installing 64 bit Java from https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html as suggested above. Before this, modifying my .conf did not work.

@joshpowlison
Copy link

This should be a null issue. 0.9.0 started including the Java environment so separate installation wasn't necessary; 0.9.1 works fine as well without pre-installing Java. The issue started in 0.9.2.

Installing Java is a solution for the current version, but unless the code was purposefully changed to no longer include Java this is an error in the update, not a user error or problem. Just use 0.9.1 if you can and it will work without installing Java separately.

Also, this error is now listed in a few separate different reports; we need to merge these or remove some.

Error #2160
Error #2169
Error #2180

@najouamghazli
Copy link

I found a pretty useful video to solve this issue:
https://www.youtube.com/watch?v=3r3hU_gfcuA

Hope it helps

@heronoh
Copy link

heronoh commented Jul 1, 2020

solution for Windows

gephi is a 64-bit program, so it needs 64-bit java. The default java installation cofigures the java x86 ( java 32-bit).
In order to install the 64-bit version on must download the windows offline 64-bit installer (today at https://java.com/en/download/manual.jsp) and run it.

after the installation, one will have two javas, one at C:\Program Files (x86)\Java\jre_$version and another at C:\Program Files\Java\jre_$version.

once installed, edit the gehpi.conf file (C:\Program Files\Gephi-0.9.2\etc\gephi.conf) adding the path to java64, (C:\Program Files\Java\jre$version) on the correspondent line (#jdkhome=).

now you can run gephi!

(SOLVED)

@Agate13
Copy link

Agate13 commented Mar 11, 2021

solution for Windows

gephi is a 64-bit program, so it needs 64-bit java. The default java installation cofigures the java x86 ( java 32-bit).
In order to install the 64-bit version on must download the windows offline 64-bit installer (today at https://java.com/en/download/manual.jsp) and run it.

after the installation, one will have two javas, one at C:\Program Files (x86)\Java\jre_$version and another at C:\Program Files\Java\jre_$version.

once installed, edit the gehpi.conf file (C:\Program Files\Gephi-0.9.2\etc\gephi.conf) adding the path to java64, (C:\Program Files\Java\jre$version) on the correspondent line (#jdkhome=).

now you can run gephi!

(SOLVED)

Just downloaded java 64-bit, and installed, and the gephi opened. Didn't need to do anything else. Thanks

@mrRobot-95
Copy link

mrRobot-95 commented Jan 9, 2022

open "C:/Program Files/Gephi-0.9.2/etc/gephi.conf"
Remove # and edit jdkhome="/path/to/jdk" to jdkhome="C:/Program Files (x86)/Java/jre1.8.0_301"

@JBaezVal
Copy link

JBaezVal commented Feb 7, 2022

this tutorial helped me to solve the problem:

https://www.youtube.com/watch?v=3EQXC--GKVQ

@lchen1019
Copy link

Thanks, it really worked after change the location in conf!

@mbastian
Copy link
Member

mbastian commented Apr 8, 2022

Since Gephi (0.9.3) Java is embedded into Gephi so there should not be any problem with Java anymore. You don't need to install Java separately.

@junhobaby
Copy link

EDIT: Since Gephi (0.9.3) Java is embedded into Gephi so there should not be any problem with Java anymore. You don't need to install Java separately.

Installed Gephi - 0.9.2 and the latest version of Java, the Java 8 - update 144. I still can't launch Gephi and it prompts an error message every time I try to do so.

  • Version used: Gephi 0.9.2
  • Java version: 8
  • Operating System: Windows 10 - Home, 1703

Any help?

You just need to install 64 bit Windows offline from Java official site and that should solve the problem. The default Gephi could be running on a 32 bit which is why it is throwing an error. Works on mine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests