[SOLVED] UnsupportedClassVersionError PLEASE HELP

Discussion in 'Spigot Plugin Development' started by AdrianPMC, Jun 27, 2015.

  1. Hi,

    I made a plugin about 2 weeks ago, and I had already tested it on my server and another persons server, but it seems when I finally gave it to who bought the plugin it got the error when it was starting up, what I know right now is that that error is caused if I make the plugin using Java 8 and the server is running anything below that, so I though oh ok... Mc pro hosting is using Java 7 so I'll just re compile the plugin using Java 7... Still got the same error... I really need some help with this not only for me but for the server owner only because he wants to release soon...

    Any help is greatly appreciated :)
     
  2. What IDE are you using?
     
  3. Just a stupid question since Im new to developing.
    Is the other person's Minecraft version compatible with your plugin?
     
    • Funny Funny x 1
  4. @ES359 im using Eclipse for Java EE, if thats what your asking, I dont use maven for my projects, I have tried it with 5 other eclipse versions and 1 other java versions and I can never get it to work, I have succesfully made 4 plugins with the same eclipse set up but for some reason this plugin doesnt want to run :/

    @Dimon6 if your new to plugin development dont answer peoples question, its like saying oh I dont know anything about this but here is the solution
     
  5. He was asking a question o_O
     
  6. Clean the project and make sure the libraries in the project are 1.7
     
  7. You're still compiling with Java 8. Check your settings, there's sometimes multiple places you must change the target version.
     
  8. If your plugin was compiled with Java 8 and the user is running Java 7, this could happen.

    This has happened to me before, also.
     
  9. You could switch to IntelliJ Idea. It makes switching JDKs extremely easy (it's just one setting).
     
  10. SOLVED: I hadn't installed Java 7... each time i clicked java 1.7 it was actually compiling with java 1.8... stupid of me not to notice anyway :p thanks for all the help and support :D i really do appreciate it