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

Problem running under Linux #3

Open
Sadi58 opened this issue Feb 22, 2020 · 3 comments
Open

Problem running under Linux #3

Sadi58 opened this issue Feb 22, 2020 · 3 comments

Comments

@Sadi58
Copy link

Sadi58 commented Feb 22, 2020

Tried both openjdk-8-jre and the default openjdk-11-jre, but received the same terminal output:
Error: Could not find or load main class application.Main

@cmabad
Copy link
Owner

cmabad commented Feb 28, 2020

Hi, thanks for trying Vihoma. That error raises when the JavaFX packages are not found (they are not installed by default alongside the Java Runtime Environment).

If you are on Linux, it can be installed with your distro package manager (e.g, apt install openjfx).

For other operating systems, visit the JavaFX webpage, where the package can be easily downloaded and installed. That should fix the problem.

@Sadi58
Copy link
Author

Sadi58 commented Feb 29, 2020

Thanks. Sorry for my oversight. However, I still can't make enough progress unfortunately. The terminal output now is:

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

By the way, I attempted to improve the file "vihoma.sh" in this way for Kubuntu - perhaps it may further be improved by also including a zenity dialog box, etc.:

#!/usr/bin/env bash
# get sudo password
sudo_password=$( kdialog --title "Authentication Required" --password "<b><big>ViHoMa</big></b><br><br>An application is attempting to perform an action that requires admin privileges. Authentication is required to perform this action." -- : 2>/dev/null )
# check for null entry or cancellation
if [[ ${?} != 0 || -z ${sudo_password} ]]
then
	exit 4
fi
if ! sudo -kSp '' [ 1 ] <<<${sudo_password} 2>/dev/null
then
	exit 4
fi
# begin
# readlink follows any symbolic links to get the real file
REALVIHOMAPATH=`dirname "$(readlink -nf $0)"`
sudo -Sp '' java -jar "${REALVIHOMAPATH}/vihoma.jar" "$@" <<<${sudo_password}

@Unlocked8235
Copy link

I also had the same problem. Turns out OpenJDK doesn't include the JavaFX Library. OracleJDK however does.
I tried manually setting up JavaFX for OpenJDK, but failed. Installed OracleJDK, set it as default in my terminal and now ViHoMa works like a dream by executing vihoma.sh

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

3 participants