Following the method from this post I was able to pin Eclipse to the dock, but after trying to launch it from there I got an error stating "The Eclipse executable launcher was unable to locate its companion shared library." I was able to find this "solution" and now after running
sudo chmod 775 -R /root/ opening Eclipse from dock causes my whole system to run like it would on first generation Intel Pentium (meaning it lags immensly).
If I open Eclipse with
sudo /eclipse/java-oxygen/eclipse/eclipse everything works fine.
How can I fix the dock launcher of Eclipse? And why does it behave like this right now?
(I'm on ElementaryOS)