I have compiled and created the jar file for my project made in Java Swing with JavaFX.
Now I want to run the project on Linux . For it I have to run my setup on Linux and it picks the directory path from the windows with System.getProperty("user.dir");
I want the equivalent command in Linux.
How to run Java Swing jar on Linux?
System Properties is common for all operating systems.
System.getProperties("user.dir");return your execution directory (where you run the main class) in execution.Answer for you comment :
/home/userName.jarhas a main class and that can run without any parameters, just double on the jar to get swing UIshfile likerun.shwithjava -jar yourjarName.jar argument1 argument2 ...sh run.sh