不要急着编译, 先看看源代码有没有使用1.5有而1.4没有的特性, 如果有, 升级jdk吧.

解决方案 »

  1.   

    用IDE.
    jbuilder, jdeveloper, eclipse, 到处都能下,官方网都有免费下.打命令编译? 类库多起来, 整死人~
      

  2.   

    Jbuilder也可以到处都下吗?牛人就牛人,不怕“枪毙”。eclipse是倒是到处可以下
      

  3.   

    诸位,看来我没说清楚啊,实在是抱歉!
    是这样的,在windows下,我是在window xp/eclipse/jdk1.5/tomcat下,编译运行测试都没问题!
    但跑到aix/jdk1.4.2/WebSphere6.0下就出问题了!
    首先是jdk1.42不支持1.5的一些新特性,那么好,我现在改了一些代码,在window下编译也都没问题了,实际上改动的地方很少!
    其次,我发现最简单的东西你得拿到aix下重新进行编译才行,否则会抱错,错误提示来看,显然与websphere有关,因为是利用websphere自带的javac编译的,我想和J2EE容器有关吧?
    我感觉现在的问题不是我的代码,这是没问题的,而是如何在aix下编译?
    我甚至用JCREATOR 结合jdk1.4.2编译后放在aix下还是不行,看来真得在aix下编,但aix下没有什么IDE工具,难道说把eclipse放到aix下?可行吗?
      

  4.   

    亲爱的楼主, WAS6.1才支持JDK5.0 及 JSP2.0。
    IF  你的页面中有用到JSP2.0的元素, 那么恭喜你可以升级WAS了
    ELSE 貌似得配置一个复杂配置文件, 我们的项目里的给你看下,我贴上,呵呵~~--------------------------------------------------------
    <?xml version="1.0" encoding="GB2312"?>
    <web-app version="2.4" 
    xmlns="http://java.sun.com/xml/ns/j2ee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

        <display-name>Container Tally Information System</display-name>
        <context-param>
         <param-name>springContext</param-name>
         <param-value>
         /WEB-INF/classes/applicationContext-hibernate-common.xml,/WEB-INF/classes/applicationContext-hibernate-pxx.xml,/WEB-INF/classes/applicationContext-hibernate-ag.xml,/WEB-INF/classes/applicationContext-service-common.xml,/WEB-INF/classes/applicationContext-service-pxx.xml,/WEB-INF/classes/applicationContext-service-ag.xml
         </param-value>
        </context-param>
        <!-- filter config -->
        <filter>
            <filter-name>Set Character Encoding</filter-name>
            <filter-class>com.hisys.java.common.service.listener.SetCharacterEncodingFilter</filter-class>
            <init-param>
                <param-name>encoding</param-name>
                <param-value>GBK</param-value>
            </init-param>
        </filter>    <filter-mapping>
            <filter-name>Set Character Encoding</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>
        <!-- action config -->
        
        <!--
    <servlet>
            <servlet-name>context</servlet-name>
            <servlet-class>com.hisys.tally.util.ContextLoaderServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
    <servlet-mapping>
            <servlet-name>context</servlet-name>
            <url-pattern>*.never</url-pattern>
        </servlet-mapping>
       -->
       
    <servlet>
            <servlet-name>context</servlet-name>
            <servlet-class>com.hisys.tally.util.ContextLoaderServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
    <servlet-mapping>
            <servlet-name>context</servlet-name>
            <url-pattern>*.never</url-pattern>
        </servlet-mapping> 
        
      <servlet>
            <servlet-name>action</servlet-name>
            <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
            <init-param>
                <param-name>config</param-name>
                <param-value>
                 /WEB-INF/struts-config-pxx.xml,
                 /WEB-INF/struts-config-ag.xml,
                </param-value>
            </init-param>
            <init-param>
                <param-name>debug</param-name>
                <param-value>3</param-value>
            </init-param>
            <init-param>
                <param-name>detail</param-name>
                <param-value>3</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>action</servlet-name>
            <url-pattern>*.do</url-pattern>
        </servlet-mapping>    
        <jsp-config>    
    <taglib>
        <taglib-uri>
           http://java.sun.com/jsp/jstl/core
        </taglib-uri>
        <taglib-location>
           /WEB-INF/c.tld
        </taglib-location>
    </taglib>   
    <taglib>
        <taglib-uri>
           http://java.sun.com/jsp/jstl/fmt
        </taglib-uri>
        <taglib-location>
           /WEB-INF/fmt.tld
        </taglib-location>
    </taglib>   
    <taglib>
        <taglib-uri>
           http://java.sun.com/jsp/jstl/fn
        </taglib-uri>
        <taglib-location>
           /WEB-INF/fn.tld
        </taglib-location>
    </taglib>   
    <taglib>
        <taglib-uri>
           http://struts.apache.org/tags-html
        </taglib-uri>
        <taglib-location>
           /WEB-INF/struts-html.tld
        </taglib-location>
    </taglib>   
    <taglib>
        <taglib-uri>
           http://hisys.com.cn/tags-app
        </taglib-uri>
        <taglib-location>
           /WEB-INF/app.tld
        </taglib-location>
    </taglib>
    <taglib>
        <taglib-uri>
           http://hisys.com.cn/tally
        </taglib-uri>
        <taglib-location>
           /WEB-INF/tally.tld
        </taglib-location>
    </taglib>

        </jsp-config> 
         
    <welcome-file-list>
    <welcome-file>userManagement/employeeLogin.jsp</welcome-file>
    </welcome-file-list>

    <!-- session config -->
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    </web-app>