命令行出错Exception in thread "main" java.lang.UnsupportedClassVersionError:

本文涉及的产品
云数据库 RDS SQL Server,独享型 2核4GB
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介:
+关注继续查看
今天运行自己写的java程序的时候突然出现如下的错误.
编译的时候能通过,但是运行的时候就出错.提示没有找到main函数的入口.
汗.找了个hello world!测试了下也是如此 就证明不是程序的错误了.
冥思苦想...检查了下环境变量..
才知道前几天装了Oracle数据库了的.
PATH 的值 给Oracle改了,把Oracle 的加到最前面去了...
 
 
命令行出错
Exception in thread "main"java.lang.UnsupportedClassVersionError: Filter(Unsupp
orted major.minor version 50.0).
 
之前的是
E:\oracle\bin;E:\oracle\jre\1.4.2\bin\client;E:\oracle\jre\1.4.2\bin;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\Program Files\PC Connectivity Solution\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;E:\Microsoft SQL Server\90\DTS\Binn\;E:\Microsoft SQL Server\90\Tools\binn\;E:\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\SinoVoice\jTTS 5.0 Desktop\Bin;E:\Java\jdk1.6.0_10\bin;%JAVA_HOME%\jre\bin;E:\MySQL\MySQL Server 5.0\bin
 
改成.下面的就行了.

E:\Java\jdk1.6.0_10\bin;%JAVA_HOME%\jre\bin;E:\oracle\bin;E:\oracle\jre\1.4.2\bin\client;E:\oracle\jre\1.4.2\bin;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\Program Files\PC Connectivity Solution\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;E:\Microsoft SQL Server\90\DTS\Binn\;E:\Microsoft SQL Server\90\Tools\binn\;E:\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\SinoVoice\jTTS 5.0 Desktop\Bin;E:\MySQL\MySQL Server 5.0\bin
 
经过测试.
发现OK了.
祝君好运!




 本文转自 w156445045 51CTO博客,原文链接:http://blog.51cto.com/enetq/319107,如需转载请自行联系原作者

相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
3月前
|
Java
java main方法不对错误
java main方法不对错误
|
4月前
|
缓存 NoSQL Redis
java.io.IOException: java.lang.RuntimeException: unable to find class for code 253
原因: 跟踪了一下所调用的底层接口,发现是redis缓存的问题,登录redis,刷新redis
|
5月前
|
Java 测试技术
已解决 java.lang.Exception: No runnable methods 异常
已解决 java.lang.Exception: No runnable methods 异常
62 0
|
11月前
|
Java
java中Error(UnsatisfiedLinkError)与Exception是有差异的
java中Error(UnsatisfiedLinkError)与Exception是有差异的
60 0
|
Java 测试技术
Cannot instantiate test(s): java.lang.SecurityException: Prohibited package name: java
Cannot instantiate test(s): java.lang.SecurityException: Prohibited package name: java
Cannot instantiate test(s): java.lang.SecurityException: Prohibited package name: java
Exception in thread “main“ java.lang.UnsupportedOperationException
Exception in thread “main“ java.lang.UnsupportedOperationException
|
SQL HIVE
Exception in thread “main“ java.lang.RuntimeException: java.lang.RuntimeException: The root scratch
Exception in thread “main“ java.lang.RuntimeException: java.lang.RuntimeException: The root scratch
154 0
Exception in thread “main“ java.lang.RuntimeException: java.lang.RuntimeException: The root scratch
|
SQL 分布式计算 Hadoop
Exception in thread “main“ java.lang.RuntimeException: java.lang.RuntimeException: Unable to instant
Exception in thread “main“ java.lang.RuntimeException: java.lang.RuntimeException: Unable to instant
665 0
Exception in thread “main“ java.lang.RuntimeException: java.lang.RuntimeException: Unable to instant
|
Java 数据库连接
Java报错Exception in thread “main“ java.lang.ExceptionInInitializerError
Java报错Exception in thread “main“ java.lang.ExceptionInInitializerError
881 0
Java报错Exception in thread “main“ java.lang.ExceptionInInitializerError
【错误记录】Groovy 运行报错 ( Exception in thread “main“ groovy.lang.MissingMethodException: No signature of )
【错误记录】Groovy 运行报错 ( Exception in thread “main“ groovy.lang.MissingMethodException: No signature of )
678 0
【错误记录】Groovy 运行报错 ( Exception in thread “main“ groovy.lang.MissingMethodException: No signature of )