Command line error Exception in thread "main" java.lang.UnsupportedClassVersionError:

2010-07-23  来源:本站原创  分类:Java  人气:213 

Command line error Exception in thread "main" java.lang.UnsupportedClassVersionError: Filter (Unsupp
orted major.minor version 50.0).

Command line, enter: javac-version shows: javac 1.4.2

I installed the jdk 1.6's how it becomes 1.4, and generally find the problem, think carefully compiled with the high-low version of the JDK version. Class will report this error, then find the environment variable under the Path:

Copy out of a show: D: \ oracle \ product \ 10.1.0 \ db_1 \ bin; D: \ oracle \ product \ 10.1.0 \ db_1 \ jre \ 1.4.2 \ bin \ client; D: \ oracle \ product \ 10.1.0 \ db_1 \ jre \ 1.4.2 \ bin;% SystemRoot% \ system32;% SystemRoot%;% SystemRoot% \ System32 \ Wbem; C: \ Program Files \ Common Files \ Adobe \ AGL; C: \ Program Files \ IDM Computer Solutions \ UltraEdit-32; c: \ Program Files \ Microsoft SQL Server \ 90 \ Tools \ binn \; C: \ Program Files \ Microsoft SQL Server \ 80 \ Tools \ BINN;

How this is so, the culprit found, D: \ oracle \ product \ 10.1.0 \ db_1 \ jre \ 1.4.2 \ bin \ client; D: \ oracle \ product \ 10.1.0 \ db_1 \ jre \ 1.4.2 \ bin; Oracle actually put my environment variables into 1.4.2, so the% JAVA_HOME% \ bin; added to Oracle before, become

% JAVA_HOME% \ bin; D: \ oracle \ product \ 10.1.0 \ db_1 \ bin; D: \ oracle \ product \ 10.1.0 \ db_1 \ jre \ 1.4.2 \ bin \ client; D: \ oracle \ product \ 10.1.0 \ db_1 \ jre \ 1.4.2 \ bin;% SystemRoot% \ system32;% SystemRoot%;% SystemRoot% \ System32 \ Wbem;. . . . . . . . . .

Close the original command-line window, and then re-open one a try, really normal, compile, run, you want the results came out.
If you encounter this same problem, not against change as I say change, the problem is solved.

相关文章