Eclipse开发Axis service碰到的问题_java


 

 

eclipse日志中报错

E:\eclipse_space\scm2_space\.metadata\.log

 

!ENTRY org.eclipse.jface 4 2 2013-06-16 21:04:45.801

!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".

!STACK 0

java.lang.UnsupportedClassVersionError: com/axis/test/Axis2Test : Unsupported major.minor version 51.0

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClassCond(Unknown Source)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.defineClass(Unknown Source)

 

查了下原因 是因为编译class 的jdk版本不同导致的.

==================解决================

问题:

Eclipse开发Axis service碰到的问题_Source_02


 

第一步:

E:\eclipse_space\scm2_space\TestAxis\.settings

找到org.eclipse.wst.common.project.facet.core.xml  

看来service开发,还需要通过反射,来获取类中的方法.

 

<?xml version="1.0" encoding="UTF-8"?>

<faceted-project>

  <runtime name="Apache Tomcat v7.0"/>

  <fixed facet="wst.jsdt.web"/>

  <fixed facet="java"/>

  <fixed facet="jst.web"/>

  <installed facet="java" version="1.6"/>

  <installed facet="jst.web" version="3.0"/>

  <installed facet="wst.jsdt.web" version="1.0"/>

</faceted-project>

 

第二步:

Eclipse开发Axis service碰到的问题_java_03

第三步:

 

Eclipse开发Axis service碰到的问题_java_04


 

 

参考:http://www.blogjava.net/Jay2009/archive/2009/04/23/267108.html