koma-im / continuum-desktop

Matrix client in kotlin
GNU General Public License v3.0
66 stars 8 forks source link

Update docs to help people coming from zero Java installations to get koma running #4

Closed benparsons closed 4 years ago

benparsons commented 6 years ago

When I run the jar, I see:

benp-matrix-mbp:Downloads benp$ java -jar koma-0.7.3-standalone.jar 
Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)

I guess this means JavaFX is not installed. I installed Java SE 11.0.1(LTS) from https://www.oracle.com/technetwork/java/javase/downloads/index.html, but it seems that is not enough/correct.

druig commented 6 years ago

@benparsons Thanks for your interest in the project! I'll try my best to do research. I don't have a Mac, but I'll try Java 11 on all my machines and virtual machines.

aaronraimist commented 6 years ago

Not sure if this is related or not. I also have Java 11 on a Mac.

~/Downloads
⟩ java -jar koma-0.7.3-standalone.jar
Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
    at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:801)
    at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:699)
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:622)
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
    at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:801)
    at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:699)
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:622)
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    at koma.koma_app.MainKt.main(main.kt:14)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 19 more

~/Downloads
⟩ java --version
java 11 2018-09-25
Java(TM) SE Runtime Environment 18.9 (build 11+28)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11+28, mixed mode)

I also can't mvn package.

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[3,29] package javafx.beans.property does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[4,29] package javafx.beans.property does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[5,29] package javafx.beans.property does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[6,29] package javafx.beans.property does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[7,29] package javafx.beans.property does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[8,29] package javafx.beans.property does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[9,26] package javafx.collections does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[10,26] package javafx.collections does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[11,26] package javafx.collections does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[12,20] package javafx.event does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[13,20] package javafx.event does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[14,20] package javafx.event does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[15,20] package javafx.scene does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[16,26] package javafx.scene.input does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[17,26] package javafx.scene.input does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[18,26] package javafx.scene.input does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[19,19] package javafx.util does not exist
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[38,50] cannot find symbol
  symbol: class EventHandler
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[38,63] cannot find symbol
  symbol: class Event
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[38,33] cannot find symbol
  symbol: class Node
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[48,19] cannot find symbol
  symbol:   class ObservableList
  location: class koma.gui.element.control.inputmap.InputMap<N>
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[50,19] cannot find symbol
  symbol:   class ObservableList
  location: class koma.gui.element.control.inputmap.InputMap<N>
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[507,52] cannot find symbol
  symbol:   class Event
  location: class koma.gui.element.control.inputmap.InputMap<N>
[ERROR] /Users/aaronraimist/Development/matrix/koma/src/koma/gui/element/control/inputmap/InputMap.java:[53,23] cannot find symbol
  symbol:   class EventType

... and goes on

rinfuyu commented 5 years ago

@aaronraimist thanks for your feedback! There are some significant changes in jdk 11. I just added the dependencies and a module-info.java and now it works on Linux with openjdk-11. javafx is now just another dependency, by packaging it in the jar, only jre will be needed. The bad news is the packaged jar becomes four times larger, nearly 50 megabytes, which should usually be okay nowadays. Though when I figure out how to package it for Linux distributions, the app itself is probably just a few megabytes and dependencies can be shared with other programs.

The next step is to figure out how to compile for different platforms. Now when I compile it on Linux, javafx pulls in native modules that seem to be Linux-specific.

rinfuyu commented 5 years ago

@aaronraimist continuous integration has finally been set up and releases for Mac and Linux are available. Though the Mac version isn't tested

aaronraimist commented 5 years ago

@rinfuyu the latest Mac build opens and I can login but I can't seem to be able to view any rooms.

Is there a Matrix room for koma/continuum where we can discuss it? Didn't see any room mentioned in the README.

yuforia commented 5 years ago

There is one at #koma-im:matrix.org