Page 1 of 1

Installing JabRef in Mageia-5

PostPosted: Feb 6th, '16, 03:37
by rmag
I tried to install JabRef (http://www.jabref.org/) in Mageia-5 but failed. It does not seem to there in repositories:
Code: Select all
$ urpmq -Y jabref
No package named jabref

I tried to download the jar file from http://sourceforge.net/projects/jabref/files/v3.2/ and run it. Following was the error:
Code: Select all
$ java -jar JabRef*.jar
Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
        at java.awt.Window.<init>(Window.java:536)
        at java.awt.Frame.<init>(Frame.java:420)
        at java.awt.Frame.<init>(Frame.java:385)
        at javax.swing.JFrame.<init>(JFrame.java:189)
        at net.sf.jabref.gui.JabRefFrame.<init>(JabRefFrame.java:529)
        at net.sf.jabref.JabRef.openWindow(JabRef.java:654)
        at net.sf.jabref.JabRef.lambda$start$30(JabRef.java:168)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Then it gets stuck and has to be stopped with control-c.

I also tried to download the binary file from http://pkgs.org/fedora-rawhide/fedora-i ... h.rpm.html and install it but it failed:

Code: Select all
# urpmi jabref*.rpm
A requested package cannot be installed:
jabref-2.10-1.fc24.noarch (due to unsatisfied glazedlists)
Continue installation anyway? (Y/n)
To satisfy dependencies, the following packages are going to be installed:
  Package                        Version      Release       Arch   
(medium "Core Release")
  aether-api                     1.0.0        3.mga5        noarch 
  aether-connector-basic         1.0.0        3.mga5        noarch 
  aether-impl                    1.0.0        3.mga5        noarch 
  aether-spi                     1.0.0        3.mga5        noarch 
  aether-transport-wagon         1.0.0        3.mga5        noarch 
  aether-util                    1.0.0        3.mga5        noarch 
  ant                            1.9.4        5.mga5        noarch 
  antlr-tool                     2.7.7        30.mga5       noarch 
  aopalliance                    1.0          12.mga5       noarch 
  apache-commons-cli             1.2          14.mga5       noarch 
  apache-commons-codec           1.9          2.mga5        noarch 
  apache-commons-compress        1.8.1        5.mga5        noarch 
  apache-commons-io              2.4          8.mga5        noarch 
  apache-commons-lang            2.6          15.mga5       noarch 
  apache-commons-logging         1.1.3        8.mga5        noarch 
  apache-commons-net             3.3          9.mga5        noarch 
  apache-parent                  14           2.mga5        noarch 
  apache-resource-bundles        2            17.mga5       noarch 
.....
  java-1.8.0-openjdk             1.8.0.72     1.b15.1.mga5  i586   
  java-1.8.0-openjdk-devel       1.8.0.72     1.b15.1.mga5  i586   
  java-1.8.0-openjdk-headless    1.8.0.72     1.b15.1.mga5  i586   
...

A long list of packages need to be downloaded including openjdk, although I have it installed:
Code: Select all
$ java -version
openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK Server VM (build 25.65-b01, mixed mode)

How can I solve this problem? Thanks for your help.

Re: Installing JabRef in Mageia-5

PostPosted: Feb 6th, '16, 15:20
by doktor5000
There are three approaches I see:
  • you could google for workarounds on how to use it with the openjdk that we use by default - although the FAQ recommends oracle java: http://www.jabref.org/faq/ (scroll down to the blue "JabRef and Linux" section, first question)
    Nevertheless it seems to be possible with openjdk, see https://github.com/JabRef/jabref/issues/393 and https://github.com/JabRef/jabref/issues/168 so try switching the look and feel like suggested in https://github.com/JabRef/jabref/issues ... -160094634 if jabref opens
  • you could install Java from Oracle and try the .jar with that again - see https://wiki.mageia.org/en/Install_java_oracle (for the installation, the version numbers are outdated but the instructions in general are the same)
  • you could try with the fedora version, although to install it, you need to tell urpmi to ignore dependencies that cannot be fulfilled (e.g. because the packages are named slightly differently for Mageia).
    Use urpmi --allow-nodeps --allow-force jabref*.rpm multiple times (the first times urpmi will only install all dependencies it can resolve) until you finally get the jabref package from fedora installed

Re: Installing JabRef in Mageia-5

PostPosted: Feb 9th, '16, 13:34
by magfan
I had the same problem with JabRef-3.2.jar (downloaded from http://www.jabref.org) until I upgraded to openjdk version "1.8.0_72" and selected this java version as root:

Code: Select all
# update-alternatives --config java


I have just tried it on a different mga5 system with openjdk version "1.8.0_65" installed. Only after selecting the java version with "update-alternatives" I could use JabRef-3.2 with this version of java. But on that system I have only one java version installed. So, maybe some paths are not set correctly during normal java installation via mcc?

Re: Installing JabRef in Mageia-5

PostPosted: Feb 9th, '16, 16:17
by doktor5000
@rmag: If there's an issue with the default alternatives symlinks, before you do any changes it would be appreciated if you could also post the output as root of

Code: Select all
alternatives --list java
alternatives --display java
find /etc/alternatives -type l -xtype l -ls

Re: Installing JabRef in Mageia-5

PostPosted: Feb 9th, '16, 16:55
by magfan
@doktor5000: I am sorry, but I did not know how to check the current configuration. So, I immediately called "update-alternatives". Now it is working and I cannot figure out any more what was wrong...

Re: Installing JabRef in Mageia-5

PostPosted: Feb 9th, '16, 17:43
by doktor5000
Well the output of the commands posted above would have been sufficient.

Anyways, please mark the thread accordingly by editing the topic of the first post and prefix it by [SOLVED], thanks

Re: Installing JabRef in Mageia-5

PostPosted: Feb 9th, '16, 18:20
by magfan
Maybe rmag did not try my solution, yet, and can still show us the output of those commands. But I cannot mark rmags topic as solved.

magfan

Re: Installing JabRef in Mageia-5

PostPosted: Feb 9th, '16, 18:31
by doktor5000
Whoops - rmag, magfan, seems mistook you for one another :)

Re: Installing JabRef in Mageia-5

PostPosted: Feb 14th, '16, 06:50
by rmag
I had to be away for some time. There is only one version of java installed on my system:
Code: Select all
$ sudo update-alternatives --config java

There is only 1 program which provides java
(/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.72-1.b15.1.mga5.i386/jre/bin/java). Nothing to configure.

Now, the command "java -jar JabRef-3.2.jar" just gets stuck, without any output. It has to be stopped by control-c. I do not want to install rpm file using force.

Re: Installing JabRef in Mageia-5

PostPosted: Feb 15th, '16, 11:51
by magfan
I am using just the downloaded file JabRef-3.2.jar:
Code: Select all
java -jar JabRef-3.2.jar

There was no need for an rpm-package. Does the output of
Code: Select all
java -verbose -jar JabRef-3.2.jar

show some warnings or errors?

Re: Installing JabRef in Mageia-5

PostPosted: Feb 15th, '16, 12:39
by ozky
Yes you don't need rpm to run java program.You can also use non system default java to start program without set it to system default,this would be best when you install oracle non rpm version of java to local folder you don't need root rights at all.
https://wiki.archlinux.org/index.php/ja ... va_version