Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POL5 does not launch at all #1335

Closed
Zemogiter opened this issue May 10, 2018 · 29 comments
Closed

POL5 does not launch at all #1335

Zemogiter opened this issue May 10, 2018 · 29 comments

Comments

@Zemogiter
Copy link
Contributor

Expected behavior

The application's window should pop out.

Actual behavior

Aside from the log file, nothing happens

Steps to reproduce

Download the latest source via git command, compile it according to the instructions (https://phoenicisorg.github.io/phoenicis/build/), trying to run it with phoenicis-javafx command and got this:

Error: Could not find or load main class org.phoenicis.javafx.JavaFXApplication Caused by: java.lang.NoClassDefFoundError: javafx/application/Application

System information

  • software version 1c79b1d and scripts repositories version 1806814

  • Using Ubuntu 18.04 x64

  • used Java version (output of java --version):

    • openjdk 10.0.1 2018-04-17
    • OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1)
    • OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)

Link to the log file: https://pastebin.com/RvSWwMSG

@ImperatorS79
Copy link
Contributor

ImperatorS79 commented May 10, 2018

If you have multiple openjdk version installed, you will meet my issue -> #1304. Could you have only openjdk 8 installed and retest ?

@plata
Copy link
Collaborator

plata commented May 10, 2018

Should we maybe use javafx-maven-plugin?

@madoar
Copy link
Collaborator

madoar commented May 10, 2018

javafx-maven-plugin sounds indeed like a possible solution.
The only possible issue I can see is javafx-maven-plugin/javafx-maven-plugin#287, but this seems to only apply to a combination of Java 9 on windows.

@plata
Copy link
Collaborator

plata commented May 10, 2018

What I'm not sure about: we do not only have the JavaFX part but also the CLI. How do we want to handle this? I think the goal was to have the libraries and then the different UIs (currently JavaFX and CLI) using it.

@madoar
Copy link
Collaborator

madoar commented May 10, 2018

I guess this depends on if the plugin is able to create jar files.
If it can, we can use the plugin to create the jar for the JavaFX application, which we can then bundle with the CLI application in the dist project.
If the plugin creates its own installers, then we need to rethink either our approach or not use the plugin.

@plata
Copy link
Collaborator

plata commented May 11, 2018

It's configurable. It creates a jar and a lib folder so we could do what you suggest. It can also create .deb and .rpm but I don't like that because it installs to /opt and I don't think that's the way it should be done according to FHS.

@Zemogiter
Copy link
Contributor Author

I've managed to fix the problem. First I've used Synaptic to remove everything with "openjdk" in name then reset the computer. Installed openjdk 8 like on the build instruction page. It did not help so I've decided to start Synaptic again and upon searching "openjdk" I found two "default" JDK packages (default-jdk and default-jdk-headless) and removed them. Now the only jdk-related packages installed are openjdk-8-jdk, openjdk-8-jdk-headless, openkdl-8-jre and openjdk-8-jre-headless. The output of java -version is now:

  • openjdk version "1.8.0_171"
  • OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.18.04.1-b11)
  • OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)

@madoar
Copy link
Collaborator

madoar commented May 17, 2018

@plata I'm quite open to any solution that works, the easier to implement the better
@Zemogiter so basically you've fully replaced Java 10 by Java 8?

The huge question we need to answer is, does OpenJDK 10 provide its own JavaFX version?
If yes, how is it installed?

@Zemogiter
Copy link
Contributor Author

@madoar based on package information here https://packages.ubuntu.com/bionic/default-jdk it seems POL does not work under Java 10. Replacing it with java 8 allowed it to run. I dont have an anserw for your question.

@madoar
Copy link
Collaborator

madoar commented May 17, 2018

@Zemogiter I didn't mean to criticize, I just wanted to completely understand what changes you've done on your local system.

Have you tried other Java applications, that require JavaFX, with your Java 10 installation?
If yes do they work?

@plata
Copy link
Collaborator

plata commented May 17, 2018

@madoar I really don't know enough about Java deployment. From my understanding, however, the easiest solution is to provide the whole environment with the application (that's what the javafx-maven-plugin does). Alternatively/additionally, we could try to get snap/flatpak running.

@Zemogiter
Copy link
Contributor Author

@madoar I understand.
Also I haven't tried any other Java application with java 10.

@FibreFoX
Copy link

Just my two cents here (maintainer of the javafx-maven-plugin, got here by cross-reference from the linked issue): when running on Linux-systems, and when using OpenJDK, you ALWAYS have to install OpenJFX aswell!
The OracleJDK includes the JavaFX-part, but this mostly will get dropped since JDK 11 (which is a real pain, because the javafx-maven-plugin no more can rely on the javapackager ... it really is a long story, maybe you can find more insights here: FibreFoX/javafx-gradle-plugin#119 (comment)), but OpenJDK does NOT contain the JavaFX-parts. They are separated in two packages.

If I can assist here in any way, please let me know.

@plata
Copy link
Collaborator

plata commented May 22, 2018

@FibreFoX thanks for your input.

@madoar
Copy link
Collaborator

madoar commented Jun 14, 2018

After searching the net, I've stumbled over https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX#BuildingOpenJFX-IntegrationwithOpenJDK.

I'm not really an expert about the build process of OpenJDK and OpenJFX, but as far as I understand this article, the installation (and/or build process) of OpenJFX in combination with OpenJDK 9+ seems to be different compared to OpenJDK 8.

Maybe that's the problem?

@RattyDAVE
Copy link
Contributor

Linux Mint 19 has this same issue. Not surprising as that is built on Ubuntu 18.04

@FibreFoX
Copy link

To repeat: when using OpenJDK itself, you need to install OpenJFX too. The JavaFX-part is separated from the core-Java part. As the JDK by Oracle does INCLUDE the JavaFX-parts, this seems to be a bug, but in fact this isn't.

@RattyDAVE
Copy link
Contributor

OpenJFX is installed on my machine.

#dpkg --get-selections |grep openj
libopenjfx-java					install
libopenjfx-jni					install
libopenjp2-7:amd64				install
openjdk-11-jre:amd64				install
openjdk-11-jre-headless:amd64			install
openjdk-8-jdk:amd64				install
openjdk-8-jdk-headless:amd64			install
openjdk-8-jre:amd64				install
openjdk-8-jre-headless:amd64			install
openjfx						install

@FibreFoX
Copy link

When installing OpenJFX on Debian, it seems to only work for OpenJDK 8. The package puts some files aside of the OpenJDK8:
https://packages.debian.org/stretch/amd64/openjfx/filelist

/usr/bin/javafxpackager
/usr/lib/jvm/java-8-openjdk-amd64/bin/javafxpackager
/usr/lib/jvm/java-8-openjdk-amd64/bin/javapackager
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jfxrt.jar
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/javafx.properties
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfxswt.jar
/usr/lib/jvm/java-8-openjdk-amd64/lib/ant-javafx.jar
/usr/lib/jvm/java-8-openjdk-amd64/lib/javafx-mx.jar
/usr/lib/jvm/java-8-openjdk-amd64/man/ja_JP.UTF-8/man1/javafxpackager.1.gz
/usr/lib/jvm/java-8-openjdk-amd64/man/ja_JP.UTF-8/man1/javapackager.1.gz
/usr/lib/jvm/java-8-openjdk-amd64/man/man1/javafxpackager.1.gz
/usr/lib/jvm/java-8-openjdk-amd64/man/man1/javapackager.1.gz

So when using other OpenJDKs, the installed OpenJFX-part is just not visible as they are not installed. Maybe this is why this does not work with OpenJDK > 8

@RattyDAVE
Copy link
Contributor

RattyDAVE commented Jul 26, 2018

We have progress!

sudo /usr/bin/printf '\xfe\xed\xfe\xed\x00\x00\x00\x02\x00\x00\x00\x00\xe2\x68\x6e\x45\xfb\x43\xdf\xa4\xd9\x92\xdd\x41\xce\xb6\xb2\x1c\x63\x30\xd7\x92' > /etc/ssl/certs/java/cacerts
sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure
sudo apt-get -y install git maven openjdk-8-jdk openjfx libxext6:i386
mkdir -P ~/build
cd ~/build
git clone https://github.com/PhoenicisOrg/phoenicis.git
cd phoenicis
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
sudo update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-amd64
mvn clean package
cd phoenicis-dist/target
unzip phoenicis-dist.zip
./phoenicis-dist/phoenicis.sh

the key part is changing the default java

sudo update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-amd64

Now I am getting

image

So I guess another error to debug! LOL

@RattyDAVE
Copy link
Contributor

I have removed the ~/.Phoenicis directory and re run!

We are looking good!

@plata
Copy link
Collaborator

plata commented Jul 26, 2018

@RattyDAVE can you provide a pull request with the instructions for Ubuntu 18.04 in the documentation?

@RattyDAVE
Copy link
Contributor

Will do once happy. I am still having issues but not had time to progress them.

"Steam" window not displaying correctly issue.

@plata
Copy link
Collaborator

plata commented Jul 26, 2018

Ok. Thanks.

@RattyDAVE
Copy link
Contributor

@plata
Copy link
Collaborator

plata commented Jul 29, 2018

@Zemogiter can you check if @RattyDAVE's description solves your issue?

@Zemogiter
Copy link
Contributor Author

@RattyDAVE @plata When trying to purge wine from the OS I get (translated form polish):

Reading package lists... Done
Building dependency tree 
Reading information regarding the state... Done
E: Faild to find package wine.log
E: Couldn't find any package by glob 'wine.log'

But like I said just using java 8 instead of 10 solves the problem.

@plata
Copy link
Collaborator

plata commented Jul 30, 2018

So can we close this issue or do you think purging Wine should be removed from the description (@RattyDAVE said that it's really required)?

@Zemogiter
Copy link
Contributor Author

The issue is solved - POL5 for some reason does not work with opendk 10. No idea where to start fixing that imcompability though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants