This has been driving me insane and I have been researching this for hours.
I run a forge server for friends on my computer (Windows) but decided I have a decent MAC and it would be easier to run the server on there. I decided that a fresh install rather then trying to franckenstien the current server for MAC.
So I installed the latest version of Java (8) and downloaded forge, I created a new folder and used the installer to download it into the folder. I ran the default minecraft .jar, put true on the EULA and ran it again, then I ran the forge .jar and it worked so then I went to create the .command
I used this text
#!/bin/bash
cd "`dirname "$0"`"
java -Xmx7024M -Xms1024M -jar forge-1.11.2-13.20.1.2530-universal.jar nogui
I ensured it was saved correctly as .command and that it was plain text.
I then correctly gave it persimmon in the terminal by using chmod a+x and that all worked, when I launched it, it gave an odd error about java and I went through all the steps people had previously by trying to redirect the path the terminal uses as it said my version was 1.6 etc etc and eventually I seemed have got that error shifted. But it still didn't work as all it did now was this
So I decided to create a default Minecraft server to see if that worked, I did the normal process and it worked like a dream, with a .command as well.
Now I've reinstalled java several times and installed the latest JDK. I tried and create another forge server but this time with the latest rather then recommended and the same problem is happening.
Currently is I run java -version into terminal it returns with this
I have been at this for hours and have no idea why this is so bloody complicated, anyone have any ideas?
There are no logs I can include, sorry if I missed anything out. This is my first time I've posted.