I can't execute mcreator.jar if i'm not in its directory

Status
Works as designed
Product/platform
MCreator/Linux
Priority
Normal
Issue description

this is what i get in my terminal when i try to execute mcreator.jar when i'm not in its directory

gersomuzziel@GUs-PC:~$ java -jar /home/gersomuzziel/Zrograms_Files/launshers/"MCreator 1.7.9 [1.12.2] Mac-Linux 32-64bit"/mcreator.jar
Picked up _JAVA_OPTIONS:   -Dawt.useSystemAAFontSettings=gasp
[Tue Aug 14 22:46:26 CDT 2018] Exception in thread "main" [Tue Aug 14 22:46:26 CDT 2018] java.lang.NoClassDefFoundError: com/google/gson/Gson
[Tue Aug 14 22:46:27 CDT 2018]     at co.pylo.mcreator.preferences.g.<clinit>(Unknown Source)
[Tue Aug 14 22:46:27 CDT 2018]     at co.pylo.mcreator.Launcher.main(Unknown Source)
[Tue Aug 14 22:46:27 CDT 2018] Caused by: java.lang.ClassNotFoundException: com.google.gson.Gson
[Tue Aug 14 22:46:27 CDT 2018]     at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[Tue Aug 14 22:46:27 CDT 2018]     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[Tue Aug 14 22:46:27 CDT 2018]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
[Tue Aug 14 22:46:27 CDT 2018]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[Tue Aug 14 22:46:27 CDT 2018]     ... 2 more
gersomuzziel@GUs-PC:~$ 

the way that i have to execute mcreator.jar is to change directory to MCreator 1.7.9 [1.12.2] Mac-Linux 32-64bit

gersomuzziel@GUs-PC:~$ cd /home/gersomuzziel/Zrograms_Files/launshers/"MCreator 1.7.9 [1.12.2] Mac-Linux 32-64bit"/
gersomuzziel@GUs-PC:~/Zrograms_Files/launshers/MCreator 1.7.9 [1.12.2] Mac-Linux 32-64bit$ java -jar /home/gersomuzziel/Zrograms_Files/launshers/"MCreator 1.7.9 [1.12.2] Mac-Linux 32-64bit"/mcreator.jar
Picked up _JAVA_OPTIONS:   -Dawt.useSystemAAFontSettings=gasp
[Tue Aug 14 22:50:41 CDT 2018] [Launcher] Java specification version: 1.8
[Tue Aug 14 22:50:41 CDT 2018] [Launcher] Installation path: /home/gersomuzziel/Zrograms_Files/launshers/MCreator 1.7.9 [1.12.2] Mac-Linux 32-64bit
[Tue Aug 14 22:50:41 CDT 2018] [Launcher] User home of MCreator: /home/gersomuzziel/.mcreator/
[Tue Aug 14 22:50:43 CDT 2018] [WebIO] Reading from URL: https://mcreator.net/app
[Tue Aug 14 22:50:45 CDT 2018] [WebIO] Reading from URL: https://mcreator.net/app/motw
[Tue Aug 14 22:50:45 CDT 2018] [WebIO] Reading from URL: https://mcreator.net/app/news
[Tue Aug 14 22:50:45 CDT 2018] Skipping update message ...
[Tue Aug 14 22:50:50 CDT 2018] Checking Pylo user session
[Tue Aug 14 22:50:51 CDT 2018] Pylo sync status: true
[Tue Aug 14 22:50:52 CDT 2018] [GoogleAnalytics] GA tracked
gersomuzziel@GUs-PC:~/Zrograms_Files/launshers/MCreator 1.7.9 [1.12.2] Mac-Linux 32-64bit$ 

 

Issue comments

This is because if you are not, MCreator can't find required files, as MCreator.jar can't work on its own. We plan to improve the setup and use procedure for Unix systems in near updates, but for now, you will need to run MCreator from its own folder.



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.