Are Java versions really different from each other? In fact, to better reflect the significance of these changes, Sun's adopting a new naming convention. Instead of going from JDK 1.4 to JDK 1.5, they are now also referring to JDK 1.5 as JDK 5.0. Comparing JDK 1.3 to JDK 1.4 http://java.sun.com/j2se/1.4.2/docs/relnotes/feat
'); // -->
ures.html Looking at that page, the list of major areas of change in moving from JDK 1.3 to JDK 1.4 covers the following: The list of what HASN'T changed would be shorter. This list DOESN'T include all the Java 2 Enterprise Edition (J2EE) changes for Web application servers such as JBoss, WebSphere Express and Apache Tomcat. Those versions also change significantly between releases. For instance, Java Server Pages (JSP) changed radically from J2EE 1.3 to J2EE 1.4 with the addition of Expression Language changing how Web developers build Web pages. I've also occasionally found small differences between Sun JREs and IBM JREs for the same Java version. That can create additional problems for a developer. What about the new JDK 1.5 (or as Sun says, JDK 5.0)? While it's available from Sun now, WDSC and Eclipse are not designed to work with it. I haven't tried loading it in WDSC, but I wouldn't expect it to work. There are again many changes from JDK 1.4, even some in the virtual machine that may create incompatibilities with WDSC. Can you mix Java versions? Types of problems I've hit when accidentally mixing the wrong version of a framework with a JRE on a project include the following: How do you change a Java version in WDSC? The Java version (JRE level) is set in two places in WDSC: the workspace level and the project level. By default, all projects use the workspace settings for the JRE for compiling and running applications, including the Java scrapbook pages. To view the current JRE level, on the main menu, do the following: [TABLE]To set a different JRE level for your workspace, do the following: What's the impact of changing a JRE level in WDSC? You'll need to test your Java applications to see the impact of the update. In my case, I wanted to use a new feature of JDK 1.4, Java Regular Expressions for parsing Strings. It's part of a new package, java.util.regex. While there are plenty of good third-party Regular Expressions packages that run in JDK 1.3 (see Jakarta Commons REGEX project), I wanted to try out the standard one included with 1.4. In hindsight, it was more work than it was worth in WDSC, since most of my other projects are written to JRE 1.3 and have compile errors in 1.4. Next time I'll use an Apache regular expression jar file, which is easy to add to a JRE 1.3 project (about one minute's work). Having moved my workspace to 1.4, I tested the Java Regular Expression functions both in the Java scrapbook and some Java classes. The regular expression functions really cut the work down to parse character streams. One feature of WDSC that doesn't work is the ability to set a compliance level for a project DIFFERENT than the compliance level for the WDSC workspace. Having set my workspace to JRE 1.4, I set my project properties for Java compiler > compliance level to JRE 1.3. After rebuilding my project and retesting my Java classes and scrapbook with the Regular Expression features, they should have generated errors. They didn't. If IBM has a fix for this, I'm not aware of it. Recommendations on managing Java versions in WDSC In the future, I'd like to see a version of WDSC that does support project overrides for JRE levels and allows you to pull in more recent versions of the JDK than those shipped with WDSC. --------------------------------------- About the author: Jim Mason works at ebt-now, an iSeries Web integration company, providing QuickWebServices for iSeries customers: Web planning, WebSphere, WebFacing, Web development, Web networking, Web support, Web security and training services. Jim is creating a self-study course for RPG programmers that teaches "hands-on" rapid visual development with WDSC for all types of iSeries and e-business applications without the need to become a Java expert. The course will be published by Rochester Initiative. You can reach Jim at jemason@ebt-now.com.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| iSeries Security - Security Tools, Physical Security and System Security |
| About Us | Contact Us | For Advertisers | For Business Partners | Site Index | RSS |
|
|
|
|||||||