Parameterized types are only available if source level is 1.5 or greater

Discussion in 'Plugin Development' started by LandonTheGeek, May 18, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    LandonTheGeek

    Code:
    ArrayList<String> frozenArrayList = new ArrayList<String>();
    I recently updated to JDK 8 and am having some issues dealing with Arrays. it wants me to switch my workspace down to 1.5, but I do not want that. How can I write this without the issue?

    Thanks.
     
  2. Maybe just go back to 1.6 or 1.7, and you don't need jdk for plugins. Some servers don't use jdk and you're plugin can cause errors. So just use the normal java 1.7
     
  3. Offline

    LandonTheGeek

    You do not need the Java Development Kit to program?
     
  4. Offline

    garbagemule

    Don't listen to Bram0101, he's drunk or something. Of course you need a JDK (or at least a compiler)...

    Sounds like an IDE issue more than anything. The given piece of code is valid Java 8, and it compiles just fine with JDK 8 (I just tested on JavaREPL, which runs JDK 8). Your IDE is probably telling you to switch up to JDK 5, because it thinks you're using an older JDK. Make sure you've properly installed JDK 8 and that your IDE knows where it is.
     
    caseif likes this.
  5. Offline

    LandonTheGeek

    garbagemule
    Thanks for the confirmations. I was about ready to get the truth ;) I'll see what I can do.
     
Thread Status:
Not open for further replies.

Share This Page