简体   繁体   中英

Permission denied error running javafx:run in IntelliJ on Linux

I'm new to Linux (manjaro xfce) and this is my first maven/javafx project Im trying to setup. Everything seems to go smooth until I running javafx:run and get a permission error.

/home/ethan/.jdks/openjdk-14.0.1/bin/java "-Dmaven.multiModuleProjectDirectory=/home/ethan/Desktop/coding/java/projects/OpenFX VLCj Music Player" -Dmaven.home=/usr/share/idea/plugins/maven/lib/maven3 -Dclassworlds.conf=/usr/share/idea/plugins/maven/lib/maven3/bin/m2.conf -Dmaven.ext.class.path=/usr/share/idea/plugins/maven/lib/maven-event-listener.jar -javaagent:/usr/share/idea/lib/idea_rt.jar=34865:/usr/share/idea/bin -Dfile.encoding=UTF-8 -classpath /usr/share/idea/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar:/usr/share/idea/plugins/maven/lib/maven3/boot/plexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version2020.1.1 org.openjfx:javafx-maven-plugin:0.0.1:run
[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------< com.ethanmdev:OpenFX-VLCj-Music-Player >---------------
[INFO] Building OpenFX-VLCj-Music-Player 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- javafx-maven-plugin:0.0.1:run (default-cli) @ OpenFX-VLCj-Music-Player ---
[ERROR] Command execution failed.
java.io.IOException: Cannot run program "java" (in directory "/home/ethan/Desktop/coding/java/projects/OpenFX VLCj Music Player"): error=13, Permission denied

The error seems obvious that I just need to give the program "java" permission to run in this directory, but being new to Linux I don't want to jump in and try to change these permissions myself. Does anyone have a fix for this? And if it's neccecary to see the rest of the error stack let me know and I'll post the full thing.

If you have this problem, open a terminal and run "sudo idea", do the regular intellij setup, and open your project. Giving idea sudo perms fixed the issue just fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM