UnsupportedClassVersion error while trying to run simple Java code

前端 未结 2 451
别那么骄傲
别那么骄傲 2021-01-23 08:21

I\'m trying to compile my programs using the command prompt on Windows 7. I\'m having a problem when I during compile. I created a test program:

class test
{
            


        
相关标签:
2条回答
  • 2021-01-23 08:23

    It seems your JDK and JVM have different editions.

    0 讨论(0)
  • 2021-01-23 08:38

    You are using different versions of JDK. Check the versions on your javac vs java. This error is telling you that your java and compiled class are not same versions. Check your path for configuration, type "set" in dos to see details.

    Example: If you compiled your class with javac (version 7) and execute it with java (version 6)

    0 讨论(0)
提交回复
热议问题