You are not logged in.

#1 2018-07-28 15:44:34

Gede
Member
Registered: 2009-09-03
Posts: 28

[solved] Building a Java project

Hello all. I am trying to build package filebot from AUR (https://aur.archlinux.org/packages/filebot/). Unfortunately, Java is not my thing so I got stuck somewhere in the process.

The list of dependencies looks long, but I got confused with this bit:

makedepends=('unzip' 'apache-ivy' 'jdk>=9')

How do I satisfy jdk>=9? The obvious bit was to look for the latest Java packages available. These were the ones I found and looked relevant:

extra/jdk10-openjdk 10.0.1.u10-1 [installed]
extra/jre10-openjdk 10.0.1.u10-1 [installed]
extra/jre10-openjdk-headless 10.0.1.u10-1 [installed]
% archlinux-java status
Available Java environments:
  java-10-openjdk (default)
  java-8-openjdk

Still, PKGBUILD was not giving the "go" signal, I have no idea why. What else do I need to satisfy the "jdk>=9" it complained about?
The Package Details page lists "java-runtime>=9" and "jdk>=9" and I clearly satisfy those!

I decided to comment out that verification and try it anyway. I would not be posting this here had it gone well.

Half-way through compilation it complains with a long message starting with what follows:

build:
    [javac] Compiling 395 source files to /tmp/filebot/src/filebot/build
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 9
    [javac] /tmp/filebot/src/filebot/source/net/filebot/util/ui/SwingUI.java:58: error: package javafx.application does not exist
    [javac] import javafx.application.Platform;
    [javac]                          ^
    [javac] /tmp/filebot/src/filebot/source/net/filebot/util/ui/SwingUI.java:59: error: package javafx.embed.swing does not exist
    [javac] import javafx.embed.swing.JFXPanel;
    [javac]                          ^
    [javac] /tmp/filebot/src/filebot/source/net/filebot/ui/GettingStartedStage.java:10: error: package javafx.animation does not exist
    [javac] import javafx.animation.Interpolator;
    [javac]                        ^
    [javac] /tmp/filebot/src/filebot/source/net/filebot/ui/GettingStartedStage.java:11: error: package javafx.animation does not exist
    [javac] import javafx.animation.KeyFrame;
    [javac]                        ^
    [javac] /tmp/filebot/src/filebot/source/net/filebot/ui/GettingStartedStage.java:12: error: package javafx.animation does not exist
    [javac] import javafx.animation.KeyValue;
    [javac]                        ^
    [javac] /tmp/filebot/src/filebot/source/net/filebot/ui/GettingStartedStage.java:13: error: package javafx.animation does not exist
    [javac] import javafx.animation.Timeline;
    [javac]                        ^

It looks like a bunch of Java FX problems. I tried looking for a Java FX package but I found only a few (looks like) old ones.

extra/java-openjfx 8.u172-1 [installed]

Perhaps OpenJFX comes as part of OpenJDK, I'm not sure. What do know is that adding java-openjfx 8.u172-1 did nothing to solve this issue.

Questions:
- JRE >=9  was not satisfied. Why and what should I have done to adequately address this restriction?
- If it was not my fault above, how can I solve my problem and compile the project?

Thank you for your interest.

Last edited by Gede (2018-07-29 23:24:15)

Offline

#2 2018-07-28 16:01:56

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,718
Website

Re: [solved] Building a Java project

Gede wrote:

How do I satisfy jdk>=9? The obvious bit was to look for the latest Java packages available. These were the ones I found and looked relevant:

extra/jdk10-openjdk 10.0.1.u10-1 [installed]
extra/jre10-openjdk 10.0.1.u10-1 [installed]
extra/jre10-openjdk-headless 10.0.1.u10-1 [installed]

The Package Details page lists "java-runtime>=9" and "jdk>=9" and I clearly satisfy those!

In terms of packages, no, you do not satisfy those requirements. Check the "provides" for the packages you have listed:

$ expac -S "%n: %P" jdk10-openjdk jre10-openjdk jre10-openjdk-headless 
jdk10-openjdk: java-environment=10  java-environment-openjdk=10
jre10-openjdk: java-runtime=10  java-runtime-openjdk=10
jre10-openjdk-headless: java-runtime-headless=10  java-runtime-headless-openjdk=10

None of these provide "jdk". There is an AUR package called "jdk" which provides the Oracle version of Java, and whether rightly or wrongly, the package you are trying to build depends on it. You can try editing the PKGBUILD to remove this dependency, and see how far you get (seems you already tried this!), or you can install the "jdk" package and try building with it.

Last edited by WorMzy (2018-07-28 16:06:32)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2018-07-28 16:20:07

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [solved] Building a Java project

There is java-openjfx but that is for jre8-openjdk see also https://wiki.openjdk.java.net/display/O … ng+OpenJFX

Offline

#4 2018-07-28 17:06:26

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

Re: [solved] Building a Java project

Gede wrote:

How do I satisfy jdk>=9?

I think you're over complicating things a little. Just install the AUR jdk package (https://aur.archlinux.org/packages/jdk/), which is what the filebot maintainer intended.

Offline

#5 2018-07-29 16:49:53

Gede
Member
Registered: 2009-09-03
Posts: 28

Re: [solved] Building a Java project

twelveeighty wrote:
Gede wrote:

How do I satisfy jdk>=9?

I think you're over complicating things a little. Just install the AUR jdk package (https://aur.archlinux.org/packages/jdk/), which is what the filebot maintainer intended.

Oh, its in AUR! That is why I could not find it. Silly me! :-)
Thanks, I'll try and do that.
I was thinking that OpenJDK was a complete drop-in replacement for Oracle's system.

I have been having some trouble with my Arch Linux. Hopefully, in the next few (many?) weeks (and with the help of the forum community) I'll get to solve them and learn a lot in the process. One forum thread at a time. :-)

Downloading JDK now.

EDIT: And it worked like a charm! Thank you.

Last edited by Gede (2018-07-29 23:24:51)

Offline

Board footer

Powered by FluxBB