Installation on ARM64 Lenovo (chrombook)

Hello there, I am using Lenovo Chromebook with Ubuntu 20.04 focal. I can not install any debian/Ubuntu package on my computer due to incompatibility architecture. Is there any solution for this issue ?
I could run Jabref 5 on Jar platform, but I can not connect it to Libreoffie 7.2 and it crashes whenever I push the cite/style bottom.

The error which I get for connection to Lireoffice is as follow:
java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader ‘bootstrap’)
at org.jabref.gui.openoffice.OpenOfficePanel.addURL(OpenOfficePanel.java:141)
at org.jabref.gui.openoffice.OpenOfficePanel.loadOpenOfficeJars(OpenOfficePanel.java:456)
at org.jabref.gui.openoffice.OpenOfficePanel$2.call(OpenOfficePanel.java:389)
at org.jabref.gui.openoffice.OpenOfficePanel$2.call(OpenOfficePanel.java:384)
at javafx.concurrent.Task$TaskCallable.call(Task.java:1425)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:830)

Any suggestion. I am running JRE 11 ,

Thanks a lot.
M. Reza

Hello M. Reza,

  1. Are you saying ANY debian/Ubuntu package does not work? So, not only JabRef, but also other programmes cannot be installed?

  2. Could you please try the portable version of JabRef? You can download it here. Alternatively if nothing helps, you could try the newest development version of JabRef, which can be found here

  3. There seems to be something going on with JDK. Maybe you would need to clarify your path to JDK 18/19, although JabRef should do that automatically, as it comes with a customized version of it.

  4. Connection issues with LibreOffice can surface if one of the two programmes are run as snap or flatpak. See Installation - JabRef

Dear ThiloteE,
Thanks a lot for your prompt reply.

    1. Are you saying ANY Debian/Ubuntu package does not work? So, not only JabRef, but also other programs cannot be installed?

Non of the Debian/Ubuntu package can not be installed , which I supposed they require amd64 architecture and not arm64 which is mine. If you have any suggestion for that, it would be great.
Instead, Jabref 4.x and 5.0 alpha can be run. I had Jabref 4.3 on my previous OS which was Xenial and it was working correctly but since I have upgraded to Focal (Ubuntu 20.4) the JDK 8 is not recognized by Jabref 4.

    1. Could you please try the portable version of JabRef? You can download it here. Alternatively, if nothing helps, you could try the newest development version of JabRef, which can be found here

I have already installed portable Jabref, but it sees the binary file can not be executed because it was written for x86-64 and does not work for aarch64. It was a discussion previously about it, but I could not make it work. If you have suggestion about it would be great and I appreciate it.

  1. There seems to be something going on with JDK. Maybe you would need to clarify your path to JDK 18/19, although JabRef should do that automatically, as it comes with a customized version of it.

So are you suggesting the usage of JDK 19 ? I wil try with this version too.

I let you know soon.

Thanks for your help.

All the best.
M. Reza

The newest development version will run JDK19
JabRef 5.7 runs JDK18

But it should not matter. You would NOT need to install JDK. As far as I am aware, JDK already comes with JabRef.

With the portable version, have you tried

  • either runbin/JabRef
  • or /lib/runtime/bin/JabRef .

Dear ThiloteE,

I have tried the file within /bin/JabRef
and also lib/runtime/bin/JabRef
for both, I get the error:
while executing /bin/JabRef
like : ./JabRef:
the error is :slight_smile: -bash: ./JabRef: cannot execute binary file: Exec format error
which I suppose is due to architecture difference.

However, I came across an older discussion about this issue (see below) and the solution for that was suggested like:

https://discourse.jabref.org/t/jabref-on-arm64/1860/6

#! /bin/sh
DIR="$SNAP/lib/runtime/bin"
"$DIR/java"  -p "$DIR/../app" -m org.jabref/org.jabref.gui.JabRefLauncher  "$@"

``you would need to replace DIR, so you could try running something like:
`java -p lib/app -m org.jabref/org.jabref.gui.JabRefLaunche` 


I tied also this inside /runtime/bin

java -p ./JabRef  -m org.jabref/org.jabref.gui.JabRefLaunche which I got this error:

loads_linux/JabRef/lib/runtime/bin$  java -p ./JabRef  -m org.jabref/org.jabref.gui.JabRefLauncheError occurred during initialization of boot layer
java.lang.module.FindException: Module format not recognized: ./JabRef

I can not figure out how to change the suggested script in JavbRef. The code is seems a bit trickt to me.

I appreciate your advice and your suggestions.
All the best

M.Reza

I have asked @koppor and @Siedlerchr if JabRef is compatible with ARM64 and they told me, in principle yes, JabRef could work for ARM64, but JPackage would require configuration changes. Right now, it depends. There is a build for Mac (M1), but no build for Linux.

@mrn56 You could try building JabRef from source.

You would need a jdk18 or jdk19 for https://adoptium.net/temurin/releases/?version=19
And then you can build JabRef locally from src (you need to clone the github repo)
using ./gradlew jpackage

Thanks for your quick reply.

I could use the version of 3.x and 4.3.1 of Jabref on my ARM 64. JabRef 4.3.1 was working fine,. Since I have upgraded my Ubuntu Xenial to Ubunto Focal, I got problem with JDK 8 which is necessary for JabRef. It is installed on my computer but I get error of MainClass.load.

I tried the version 5.0 independent platform for JAR and I got the error when I am trying to connect to Libreoffice document. (the error was mentioned above in our first discussion).

If you can help me to figure out how to make portable JabRef work or even to overcome the problem of JabRef 5.0 (Independent platform JAR, which is working on my ARM64) for connecting to my Libreoffice document it would be great.

Thanks a lot.

I appreciate all your effort and suggestions.

All the best.

M. Reza

@mrn56 Since some 5.x versions JabRef no longer comes as indepent jars, they are bundled with the jdk at runtime. This makes it easier as we do not depend on the installed jdk on the system

What I would suggest:
Install JDK18 or JDK19 for your architecture https://adoptium.net/temurin/releases/?version=19
Download a snapshot of the latest development version
https://github.com/JabRef/jabref/archive/refs/heads/main.zip

Then execute ./gradlew jpackage in the folder where the build.gradle is.
This will build a version for your system

Hi,

Here is my java version:
ava version “19.0.1” 2022-10-18
Java™ SE Runtime Environment (build 19.0.1+10-21)
Java HotSpot™ 64-Bit Server VM (build 19.0.1+10-21, mixed mode, sharing)

I did this command to build:
sudo ./gradlew jpackage ~/jabref-main/buildSrc/

I got these errors:

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘JabRef’.

Could not resolve all files for configuration ‘:classpath’.
Could not resolve org.javamodularity:moduleplugin:1.8.12.
Required by:
project : >

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 18s
3 actionable tasks: 3 up-to-date

Is there somthing I did wrong?
Thanks a lot

all the best.

There were lots of lines but I could not paste all of them here.

Hi you have to execute this in the root folder Jabref-main (buildSrc is an extra folder required)

Hi,
This is the command I execute in the root folder of jabref-main:
sudo ./gradlew jpackage /buildSrc/
that one makes the same error as before. Is that correct?

  • What went wrong:
    A problem occurred configuring root project ‘JabRef’.

Could not resolve all files for configuration ‘:classpath’.
Could not resolve org.javamodularity:moduleplugin:1.8.12.
Required by:
project : > org.javamodularity.moduleplugin:org.javamodularity.moduleplugin.gradle.plugin:1.8.12
Could not resolve org.javamodularity:moduleplugin:1.8.12.
Could not get resource
Could not GET ‘https://jcenter.bintray.com/org/javamodularity/moduleplugin/1.8.12/moduleplugin-1.8.12.module’. Received status code 403 from server: Forbidden
Could not resolve org.openjdk.jmh:jmh-core:1.27.

Could not resolve org.ow2.asm:asm-util:9.2.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

Thanks so much
all the best.

Hi,
Again I did

sudo ./gradlew jpackage ./buildSrc/

I got What went wrong:
A problem occurred configuring root project ‘JabRef’.

Could not resolve all files for configuration ‘:classpath’.
Could not resolve org.javamodularity:moduleplugin:1.8.12.
Required by:
project : > org.javamodularity.moduleplugin:org.javamodularity.moduleplugin.gradle.plugin:1.8.12
Could not resolve org.javamodularity:moduleplugin:1.8.12.
the line is continuing:

BUILD FAILED in 46s

Any suggestions ?
Thanks a lot.

All the best

thanks for the update, this is odd. This seems to be some gradle redirection to an old repo.
I will try to look for a solution how to solve this. You could test if this works: Plugins redirecting to jcenter - #11 by coopy - Plugin Portal - Gradle Forums

You need to modfiy settings.gradle to look like this:

pluginManagement {
    repositories {
        mavenCentral()
        maven {
            url 'https://oss.sonatype.org/content/repositories/snapshots'
        }
        gradlePluginPortal()
    }
}

rootProject.name = "JabRef"

and you don’t have to run with sudo and you don’t have to speficy buildSrc. Just './gradlew jpackage`.

Hi,
Thanks for your sugesstions, I add mavenCentral() to my settings.gradle and I run as just: “./gradlew jpackage”

I got this error:

Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

FAILURE: Build failed with an exception.

  • What went wrong:
    Gradle could not start your build.

Could not create service of type ChecksumService using BuildSessionScopeServices.createChecksumService().
java.io.FileNotFoundException: /home/mrn56/jabref-main/.gradle/7.6/checksums/checksums.lock (Permission denied)

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 24s

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not update /home/mrn56/jabref-main/.gradle/7.6/fileChanges/last-build.bin

/home/mrn56/jabref-main/.gradle/7.6/fileChanges/last-build.bin (Permission denied)

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 25s
(focal)mrn56@localhost:~/jabref-main$

Any suggestions with that.
Thanks a lot.
All the best.

just another update:
While running ./gredkew jpackage as a root with sudo, I got this error this time:

  • What went wrong:
    A problem occurred configuring root project ‘JabRef’.

Could not resolve all files for configuration ‘:classpath’.
Could not resolve org.javamodularity:moduleplugin:1.8.12.
Required by:
project : > org.javamodularity.moduleplugin:org.javamodularity.moduleplugin.gradle.plugin:1.8.12
Could not resolve org.javamodularity:moduleplugin:1.8.12.
Could not get resource
Could not GET
1.8.12.module’. Received status code 403 from server: Forbidden
Could not resolve org.javamodularity:moduleplugin:1.8.12.
Required by:
project : > org.openjfx.javafxplugin:org.openjfx.javafxplugin.gradle.plugin:0.0.13 > org.openjfx:javafx-plugin:0.0.13
Could not resolve org.javamodularity:moduleplugin:1.8.12.
Could not get resource 1.8.12.module’.
Could not GET 1.8.12.module’. Received status code 403 from server: Forbidden

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

All the best

Okay, something is still wrong… Can you please try again with the additional command line option:
sudo./gradlew build --refresh-dependencies
this should try to refresh the dependencies

And then afterwards the ./gradlew jpackage

Hi,

Thanks for your sugestions.
While running
“sudo ./gradlew build --refresh-dependencies”
I get these error (see below please)

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘JabRef’.

Could not resolve all files for configuration ‘:classpath’.
Could not resolve org.javamodularity:moduleplugin:1.8.12.
Required by:
project : > org.javamodularity.moduleplugin:org.javamodularity.moduleplugin.gradle.plugin:1.8.12
Could not resolve org.javamodularity:moduleplugin:1.8.12.
Could not resolve org.openjdk.jmh:jmh-core:1.27.
Required by:
project : > me.champeau.gradle.jmh:me.champeau.gradle.jmh.gradle.plugin:0.5.3 > me.champeau.gradle:jmh-gradle-plugin:0.5.3
Could not resolve org.openjdk.jmh:jmh-core:1.27.
Could not resolve com.google.gradle:osdetector-gradle-plugin:1.7.0.
Required by:
project : > org.openjfx.javafxplugin:org.openjfx.javafxplugin.gradle.plugin:0.0.13 > org.openjfx:javafx-plugin:0.0.13
Could not resolve com.google.gradle:osdetector-gradle-plugin:1.7.0.
Could not resolve org.javamodularity:moduleplugin:1.8.12.
Required by:
project : > org.openjfx.javafxplugin:org.openjfx.javafxplugin.gradle.plugin:0.0.13 > org.openjfx:javafx-plugin:0.0.13
Could not resolve org.javamodularity:moduleplugin:1.8.12.
Could not resolve org.slf4j:slf4j-api:1.7.32.
Required by:
project : > org.beryx.jlink:org.beryx.jlink.gradle.plugin:2.25.0 > org.beryx:badass-jlink-plugin:2.25.0
Could not resolve org.slf4j:slf4j-api:1.7.32.
Could not resolve org.ow2.asm:asm:9.2.
Required by:
project : > org.beryx.jlink:org.beryx.jlink.gradle.plugin:2.25.0 > org.beryx:badass-jlink-plugin:2.25.0
Could not resolve org.ow2.asm:asm:9.2.
Could not resolve org.ow2.asm:asm-commons:9.2.
Required by:
project : > org.beryx.jlink:org.beryx.jlink.gradle.plugin:2.25.0 > org.beryx:badass-jlink-plugin:2.25.0
Could not resolve org.ow2.asm:asm-commons:9.2.
Could not resolve org.ow2.asm:asm-tree:9.2.
Required by:
project : > org.beryx.jlink:org.beryx.jlink.gradle.plugin:2.25.0 > org.beryx:badass-jlink-plugin:2.25.0
Could not resolve org.ow2.asm:asm-tree:9.2.
Could not resolve org.ow2.asm:asm-util:9.2.
Required by:
project : > org.beryx.jlink:org.beryx.jlink.gradle.plugin:2.25.0 > org.beryx:badass-jlink-plugin:2.25.0
Could not resolve org.ow2.asm:asm-util:9.2.
Could not resolve org.ow2.asm:asm-analysis:9.2.
Required by:
project : > org.beryx.jlink:org.beryx.jlink.gradle.plugin:2.25.0 > org.beryx:badass-jlink-plugin:2.25.0
Could not resolve org.ow2.asm:asm-analysis:9.2.
Could not resolve org.fusesource.jansi:jansi:2.4.0.
Required by:
project : > com.adarshr.test-logger:com.adarshr.test-logger.gradle.plugin:3.2.0 > com.adarshr:gradle-test-logger-plugin:3.2.0
Could not resolve org.fusesource.jansi:jansi:2.4.0.
Could not get resource

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 49s
3 actionable tasks: 3 up-to-date

Damn, Something is seriously broken with the plugin resolution. Do you have any firewall or are you behind any other proxy server?