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 · 70 comments
Closed

Error: Cannot find Java 1.8 or higher #1787

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

Comments

@FillyJ
Copy link

@FillyJ FillyJ commented Sep 25, 2017

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

@eduramiba eduramiba commented Sep 25, 2017

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 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

@eduramiba eduramiba commented Sep 26, 2017

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

@eduramiba
Copy link
Member

@eduramiba eduramiba commented Sep 26, 2017

@FillyJ did it work?

@FillyJ
Copy link
Author

@FillyJ 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 schignel commented Sep 26, 2017

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

@eduramiba
Copy link
Member

@eduramiba eduramiba commented Sep 26, 2017

Great!

@eduramiba eduramiba closed this Sep 26, 2017
@m2d511
Copy link

@m2d511 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

@eduramiba eduramiba commented Sep 26, 2017

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

@m2d511
Copy link

@m2d511 m2d511 commented Sep 26, 2017

same problem

@eduramiba
Copy link
Member

@eduramiba eduramiba commented Sep 26, 2017

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

@schignel
Copy link

@schignel schignel commented Sep 26, 2017

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

@m2d511
Copy link

@m2d511 m2d511 commented Sep 27, 2017

..sorry for my late thanks! it worked!

@A000045
Copy link

@A000045 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

@eduramiba eduramiba commented Oct 22, 2017

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

@boa1540
Copy link

@boa1540 boa1540 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 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.

@xiangchen-ee
Copy link

@xiangchen-ee xiangchen-ee commented Nov 13, 2017

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 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 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

@eduramiba eduramiba commented Nov 14, 2017

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

@aramis223
Copy link

@aramis223 aramis223 commented Jun 4, 2018

Hi,

  1. After you installed Java, find the main folder where the java is installed. for example mine is "C:\Program Files\Java\jre-10" and includes bin, conf, legal and lib folders.
  2. Install Gephi, and go to etc folder, "C:\Program Files\Gephi-0.9.2\etc".
  3. open notepad, drop gefi.conf into notepad
  4. look for the line, begins with jdkhome=
  5. if there is a # before the jdkhome, remove the #
  6. Add the address of Java folder after the jdkhome=, for example: jdkhome="C:\Program Files\Java\jre-10"
  7. save the file in notepad
  8. run gefi, it should work

@mattmattingly
Copy link

@mattmattingly mattmattingly commented Jun 5, 2018

@mattmattingly
Copy link

@mattmattingly mattmattingly commented Jun 5, 2018

@mattmattingly
Copy link

@mattmattingly mattmattingly commented Jun 6, 2018

@giugnomt
Copy link

@giugnomt giugnomt commented Sep 17, 2018

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

@ThatAndresV ThatAndresV commented Sep 26, 2018

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

@mattmattingly
Copy link

@mattmattingly mattmattingly commented Sep 26, 2018

@wsamaral
Copy link

@wsamaral wsamaral commented Dec 12, 2018

I had to install the 64bit version to work.

@mattmattingly
Copy link

@mattmattingly mattmattingly commented Dec 12, 2018

@leolle
Copy link

@leolle 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 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

@Tunacanunal Tunacanunal commented Feb 10, 2019

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 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 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 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 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

@amcrobert amcrobert commented Nov 22, 2019

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

@AmericoAlves
Copy link

@AmericoAlves AmericoAlves commented Jan 2, 2020

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

@NGOEntrepreneur NGOEntrepreneur commented Jan 3, 2020

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

@joshpowlison joshpowlison commented Apr 22, 2020

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

@najouamghazli najouamghazli commented May 21, 2020

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 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 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 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"

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

Successfully merging a pull request may close this issue.

None yet