# Which version of openjdk and openjfx for JabRef 4?

**URL:** <https://discourse.jabref.org/t/which-version-of-openjdk-and-openjfx-for-jabref-4/1476>\
**Category:** Help\
**Created:** [January 11, 2019, 10:10pm UTC](https://discourse.jabref.org/t/which-version-of-openjdk-and-openjfx-for-jabref-4/1476 "2019-01-11T22:10:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stingray21](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@stingray21](https://discourse.jabref.org/u/stingray21)\
**Post date:** [January 11, 2019, 10:10pm UTC](https://discourse.jabref.org/t/which-version-of-openjdk-and-openjfx-for-jabref-4/1476/1 "2019-01-11T22:10:46Z")

</div>

I use JabRef (Version 4.3.1) under Ubuntu (18.04 back when I it worked), but the last time I tried to launch it, I got this error:

`Error: Could not find or load main class org.jabref.JabRefMain`

After some research, I think the problem might has to do with OpenJFX and the upgrade to Ubuntu 18.10.

According to this [post](https://github.com/JabRef/jabref/issues/2867) "JabRef explicit requires JDK8 and openjfx8 ".

18.10 comes with `openjfx 11+26-4`. I figured out how to install openjfx8 manually by downloading and running the .deb file from [https://packages.ubuntu.com](https://packages.ubuntu.com).  
But I still get the same error.

These are my currently installed versions:

```auto
$ java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-0ubuntu0.18.10.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

$ apt-show-versions openjfx
openjfx:amd64/cosmic 8u161-b12-1ubuntu2 upgradeable to 11+26-4
openjfx:i386 not installed

```

I read on another post that openjdk and openjfx needs to match (8u191 \<-\> 8u161).

What exact version of openjdk and openjfx do I need? And how can I install it?

---

<div class="post-metadata">

**Author:** ![Siedlerchr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/siedlerchr/32/216_2.png) [@Siedlerchr](https://discourse.jabref.org/u/Siedlerchr)\
**Post date:** [January 13, 2019, 4:52pm UTC](https://discourse.jabref.org/t/which-version-of-openjdk-and-openjfx-for-jabref-4/1476/2 "2019-01-13T16:52:54Z")

</div>

HI, you are right, JabRef still requires Java 8.  
I have no idea if the version of openjfx and openjdk must match, but you probably need to set it as default. No idea.  
`sudo update-alternatives --config java`

The easiest way is to install the oracle java 8 from the ppa:  
[https://launchpad.net/~webupd8team/+archive/ubuntu/java](https://launchpad.net/~webupd8team/+archive/ubuntu/java)

The installation instructions (still valid):

> **[Install Oracle Java 8 In Ubuntu Or Linux Mint Via PPA Repository \[JDK8\]](http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html)**
>
> The Oracle JDK License has changed for releases starting April 16, 2019. The new Oracle Technology Network License Agreement for Oracle J...

---

<div class="post-metadata">

**Author:** ![stingray21](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@stingray21](https://discourse.jabref.org/u/stingray21)\
**Post date:** [January 15, 2019, 4:54pm UTC](https://discourse.jabref.org/t/which-version-of-openjdk-and-openjfx-for-jabref-4/1476/3 "2019-01-15T16:54:30Z")

</div>

Thank you,

I had version 11 removed and only version 8 installed.

I will go with Oracle Java for now (that works for me) and switch back at a later point.

---

<div class="post-metadata">

**Author:** ![Siedlerchr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/siedlerchr/32/216_2.png) [@Siedlerchr](https://discourse.jabref.org/u/Siedlerchr)\
**Post date:** [January 19, 2019, 10:23pm UTC](https://discourse.jabref.org/t/which-version-of-openjdk-and-openjfx-for-jabref-4/1476/4 "2019-01-19T22:23:39Z")

</div>

We are currently in the progress of making JabRef compatible with java 9 and greater, but this is a more complicated process which also affects our used libraries. Any help is welcome,
