Hello everyone. I'm developing a server on my computer and am eventually going to release it onto a real server, but I am getting an error and I know why I am getting it and I was wondering HOW I could fix it. I am getting the following error: I have done some research and found out that it is because I am using Java 7 plugins but I am running my server on Java 6. While searching I have been unable to find a solution to my problem. Please note that I am on Mac OSX. My start_server.command is:
This happens when you use code that isn't compatible with Java 6. You need to check for things such as lists using diamond operators, multiple exceptions being caught in a single catch statement, etc. For example, the following is acceptable in Java 7: Code:java ArrayList<String> list = new ArrayList<>(); try { blah();} catch (IOException | NumberFormatException e) { e.printStackTrace();} But for Java 6, it would have to be adjusted to the following: Code:java ArrayList<String> list = new ArrayList<String>(); try { blah();} catch (NumberFormatException e) { e.printStackTrace();} catch (IOException e) { e.printStackTrace();} If you're unsure, you could always post the code and we could try and find out what the issue is.
I have Java 7 on my computer, though. Is it possible to update my server to Java 7 instead of keeping it at Java 6?