Ask Your Question

Setting $JAVA_HOME in Fedora-26/Gnome?

asked 2017-08-06 22:31:18 -0500

x27qb8 gravatar image

updated 2017-08-06 22:33:13 -0500

I'm trying to install a P2P app that uses:

openjdk-8-jdk maven libopenjfx-java

There are no rpm binaries availabe; so I am having to build from source.

The build instructions state that $JAVA_HOME needs to be set. The build instructions are as follows; but the SET $JAVA_HOME part isn't working out.* Any assistance appreciated.

*[The file path on my system is different than the example; and there may be other issues]

Building From Source

This guide will walk you through the process of building bisq from source.

NOTE: For most users, building from source is not necessary. See the releases page, where you'll find installers for Windows, Linux and Mac OS X.

There is an install script (2 parts) for setup (JDK, git, maven, Bitcoinj, bisq) on Linux in that directory (,

System requirements

The prerequisite for building bisq is installing the Java Development Kit (JDK), version 8u131 or better (as well as maven and git). In Debian/Ubuntu systems with OpenJDK you'll need OpenJFX as well, i.e. you'll need the openjfx package besides the openjdk-8-jdk package.

$ sudo apt-get install openjdk-8-jdk maven libopenjfx-java
1. Check the version of Java you currently have installed

$ java -version
If java is not found, or your version is anything less than 1.8.0_121, then follow the next steps, otherwise you can skip to step 2:

1.1 Debian based systems (Ubuntu)

You can use either OpenJDK or Oracle JDK.

To install OpenJDK use:

$ sudo apt-get install openjdk-8-jdk maven libopenjfx-java
Unfortunately, Ubuntu 14.04 & Linux Mint 17.3 are missing OpenJdk 8 and OpenJFX, so this might be useful:

If openjdk-8-jdk is not found you can add this ppa, update, then try again:

$ sudo apt-add-repository ppa:openjdk-r/ppa && sudo apt-get install openjdk-8-jdk
If libopenjfx-java is not found you can build & install it yourself:

How to install OpenJFX on Ubuntu 14.04 or Linux Mint 17.3
To install the Oracle JDK use:

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get -y install oracle-java8-installer
Check if $JAVA_HOME is set:

$ echo $JAVA_HOME
If $JAVA_HOME is not present, open your .bashrc file:

$ touch ~/.bashrc
$ gedit ~/.bashrc
For OpenJDK add: export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 For Oracle JDK add: export JAVA_HOME=/usr/lib/jvm/java-8-oracle Save and close the file.

Reload the file in your shell:

$ . ~/.bashrc
$ echo $JAVA_HOME
1.2 Other systems

Download and install the latest Oracle JDK for your platform.

For Mac OSX, you will need to set JAVA_HOME as:

$ echo 'export JAVA_HOME=$(/usr/libexec/java_home)' >> ~/.bashrc
$ . ~/.bashrc

Note that Bisq use protobuf during maven build. Installation is done via the maven build.

2.1 Increase the Intellij Idea Code insight limit, because it breaks on the generated protobuffer files:

Go to Help > Edit custom properties => paste the following line: idea.max.intellisense.filesize=12500 Source:

At IntelliJ 14 you need to edit the in the app container: /Applications/IntelliJ\ IDEA\ 14\ ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-08-07 01:07:57 -0500

rookieoz gravatar image

updated 2017-08-07 01:11:52 -0500

$ echo $JAVAHOME If $JAVAHOME is not present, open your .bashrc file:

$ touch ~/.bashrc $ gedit ~/.bashrc For OpenJDK add: export JAVAHOME=/usr/lib/jvm/java-8-openjdk-amd64 For Oracle JDK add: export JAVAHOME=/usr/lib/jvm/java-8-oracle Save and close the file.

What this is saying is to create a file called .bashrc (the "." means it will be hidden by default in a file-manager) in your home folder. The home folder is the /home/username folder.

Then write either export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 or export JAVA_HOME=/usr/lib/jvm/java-8-oracle in the that text file.

Instructions specific to Fedora and Java generally say to use a file named .bash_profile (So if .bashrc doesn't work try .bash_profile as the name of the file.)

edit flag offensive delete link more


There path is also different:


also there are other options for the final folder:

java, java-1.8.0, java-1.8.0-openjdk-, java-openjdk, etc, etc, etc...

This is really ambiguous. The only one of these that's not a symlink is:


Is this the one I should try???

x27qb8 gravatar imagex27qb8 ( 2017-08-08 14:34:53 -0500 )edit

Try the java-1.8.0 that should work. If not the one you mentioned.

rookieoz gravatar imagerookieoz ( 2017-08-18 20:25:50 -0500 )edit

Question Tools

1 follower


Asked: 2017-08-06 22:31:18 -0500

Seen: 6,711 times

Last updated: Aug 07 '17