`
fucepeng
  • 浏览: 20989 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

WebSphere Application Server 8.5 配置JAVA 7

 
阅读更多

      使用WAS启动项目报错:java.lang.UnsupportedClassVersionError: JVMCFRE003 主要版本错误;类=org/apache/solr/client/solrj/SolrClient,偏移量=6

      发现was8.5默认的是Java 6,而项目中需要用到Java 7。

      在IBM官网查找发现was8.5配置Java 7的文章:

      http://www.ibm.com/developerworks/cn/java/j-lo-java7was8/

      但是文章中Intallation manager安装Java 7需要的三个资源库文件却找不到:

      这三个安装包整整浪费了我一天时间也没找到在哪里下载,放弃以上方法。

 

      最后发现:http://www.ibm.com/developerworks/java/jdk/     可以下载到ibm-java-x86_64-sdk-7.1-3.10.bin,但这个不是Installation Manager的资源库文件,在成功安装后发现使用managesdk命令无法识别出java 7,一番纠结后终于发现正确的解决方法。

 

      设:当前was8.5安装路径为/opt/IBM/WebSphere/AppServer

           cd /opt/IBM/WebSphere/AppServer

           ls

          可以看到有个java文件夹

          cd java/bin

          ./java -version

          看到以下信息:

java version "1.6.0"
Java(TM) SE Runtime Environment (build pxa6460_26sr5fp1ifix-20130408_02(SR5 FP1+IV38399+IV38578))
IBM J9 VM (build 2.6, JRE 1.6.0 Linux amd64-64 Compressed References 20130301_140166 (JIT enabled, AOT enabled)

        这是默认安装的Java 6.

 

      1、把下载的ibm-java-x86_64-sdk-7.1-3.10.bin上传到/opt/IBM。

      2、安装Java 7:

                   cd /opt/IBM

                   ./ibm-java-x86_64-sdk-7.1-3.10.bin

            一步一步往下安装,在选择安装路径时输入:/opt/IBM/WebSphere/AppServer/java_1.7
            下一步至安装成功。
cd /opt/IBM/WebSphere/AppServer/java_1.7/bin
./java -version
输出以下信息:
java version "1.7.0"
Java(TM) SE Runtime Environment (build pxa6470_27sr3fp10-20150708_01(SR3 FP10))
IBM J9 VM (build 2.7, JRE 1.7.0 Linux amd64-64 Compressed References 20150630_255653 (JIT enabled, AOT enabled)
说明Java 7安装成功。
      3、增加Java 1.7 配置文件
cd /opt/IBM/WebSphere/AppServer/properties/sdk
cp 1.6_64.properties 1.7_64.properties
vi 1.7_64.properties
可以看到内容:
com.ibm.websphere.sdk.version.1.6_64=1.6
com.ibm.websphere.sdk.bits.1.6_64=64
com.ibm.websphere.sdk.location.1.6_64=${WAS_INSTALL_ROOT}/java
com.ibm.websphere.sdk.platform.1.6_64=linux
com.ibm.websphere.sdk.architecture.1.6_64=x86_64
com.ibm.websphere.sdk.nativeLibPath.1.6_64=${WAS_INSTALL_ROOT}/lib/native/linux/x86_64/
修改为:
com.ibm.websphere.sdk.version.1.7_64=1.7
com.ibm.websphere.sdk.bits.1.7_64=64
com.ibm.websphere.sdk.location.1.7_64=${WAS_INSTALL_ROOT}/java_1.7
com.ibm.websphere.sdk.platform.1.7_64=linux
com.ibm.websphere.sdk.architecture.1.7_64=x86_64
com.ibm.websphere.sdk.nativeLibPath.1.7_64=${WAS_INSTALL_ROOT}/lib/native/linux/x86_64/:
3、修改默认JDK为Java 7
 进入ibm界面,在右侧菜单栏中:服务器---服务器类型---WebSphere Application Server
在左侧的  您可以管理以下资源: 选择你的服务器,
在配置选项卡中选择 Java SDK,
可以看到刚刚添加的java 7,并且路径为${WAS_INSTALL_ROOT}/java_1.7
勾选,点击 用作缺省值 按钮。
4、重启was,使Java 7生效
cd /opt/IBM/WebSphere/AppServer/bin
./stopServer.sh server1        把server1换成你的服务器名字
./startServer.sh server1  
完成。
 
                 

            

  • 大小: 16.9 KB
分享到:
评论

相关推荐

    xxx银行系统-WebSphere-was8.5原厂安装配置调优实战手册

    IBM WAS 的全称是IBM WebSphere Application Server,即 IBM 的 WebSphere 应用服务器,和 Weblogic 一样 ,是当前主流的 App Server (应用服务器)之一是Java Platform, Enterprise Edition(Java EE)和 Web 服务...

    wxs-examples:WebSphere eXtreme Scale 示例

    在 WebSphere Application Server Version 8.5.5.3 Liberty Profile 和 WebSphere eXtreme Scale V8.6 for Developers 上运行 - Liberty Profile。 用法 安装 WebSphere Application Server 版本 8.5.5.3 Liberty ...

    sample.osgi.blueprint-cm:在 Liberty 中演示 blueprint-cm 支持

    即将的 WebSphere Application Server V8.5.5.6 Liberty Profile 将完全支持此示例中演示的所有内容。 该示例说明了以下内容的使用,所有内容均在 Liberty 上运行的 OSGi 应用程序中: 实现和调用自定义蓝图命名...

    JDBC 3.0数据库开发与设计

    8.5 从XML到Java代码的数据绑定 8.5.1 访问方式选择 8.5.2 数据绑定 8.5.3 约束数据 8.5.4 从XML获得Java 8.5.5 生成Java代码 8.5.6 完成包 8.6 使用JSP技术生成动态XML 8.6.1 JSP技术概述 8.6.2 使用JSP...

    精通websphere MQ

    客户端和服务器端 (Client & Server)................................................... 27 1.2.10 操作界面 (MQ Interface)..................................................................... 27 ...

    using-liferay-portal-6.2.pdf

    8.3 Using Application Display Templates . . . . . . . . . . . . . . . . . . . 191 8.4 Using Liferay’s rules engine . . . . . . . . . . . . . . . . . . . . . . . . 196 8.5 Summary . . . . . . . . . . ...

    db2数据库入门教程(官方中文版)

    1.9.5 WebSphere Application Server – Community Edition............................................18 第 2章 – DB2相关特性和产品.........................................................................

    db2数据库入门官方教程(中文版)

    1.9.5 WebSphere Application Server – Community Edition............................................18 第 2章 – DB2相关特性和产品.........................................................................

    spring-framework-reference4.1.4

    3.3. Java 8 (as well as 6 and 7) ............................................................................... 17 3.4. Java EE 6 and 7 ..................................................................

    spring-framework-reference-4.1.2

    3.3. Java 8 (as well as 6 and 7) ............................................................................... 17 3.4. Java EE 6 and 7 ..................................................................

Global site tag (gtag.js) - Google Analytics