Our Blog > Blog Detail

Web Content Viewer- Asponte Custom Skin

Actions

Enhancing the Developer Experience: Java Version Issues Developing for Portal 8 and 8.5

  • Created By: Chris Knight
  • Updated: March 17, 2016

Introduction

I recently ran into an issue where I was using my Rational Application Developer environment, along with build.xml to build an .ear file for a customer.  The custom code, once deployed, was not showing as available to the Portal Server.

 

Issue

After testing in multiple alternate environments, I finally realized that a difference between my test environments and the customers environment was that while I was using WebSphere Portal 8.5, the customer was running on 8.0.0.1.

 

More importantly, the version of WebSphere Application Server that they were running was using the 1.6 java environment.  My code was being compiled for the default JDK in my environment, which was 1.7.

 

I then found this information:

http://www.oracle.com/technetwork/java/javase/compatibility-417013.html

 

Which basically states that 1.7 compiled code is incompatible with running in the 1.6 environment.

Resolution

Since I was using the build.xml process as defined here:

 

Enhancing the Developer Experience Part 1: Leveraging build.xml

 

I was able to easily change the way that the class files were being generated. In the build.xml, I had a compile task, which was using the javac process within ant to build the .class files.  I leveraged the following:

<javac target="1.6" source="1.6" verbose="yes" destdir="${static.classes.dir}" debug="true" debuglevel="lines,vars,source">
            

By using the target and source parameters, I could properly compile the .classes for the 1.6 java runtime environment.

Contact Form- Asponte Custom Skin

Actions

Contact Us

*
*


Submit
Call Us 888-926-9434
Complementary Content
${loading}