I have my Java code compiled in jdk 1.6.
I am using MQ jar files (From MQ version 8.0) in my project build path.
My application server runs with jdk 1.6.
MQ version 8.0 installed in the server.
Now when I have deployed my application in the server, I am getting errors like :
java.lang.UnsupportedClassVersionError" and errors related to major
version 50, 51 etc.
I understand the concepts of the version here, but I am little confused as why in the runtime there is a version mismatch happening as in the classpath it is referring to the same JAR files as during the project build. Is it due to the fact that MQ jars has been compiled in 51 which is of a higher version than 50 ? Please advise what can be done here.
To use the jar files that come with IBM MQ v8 and later you must be at Java 7 or later. IBM Documents that from MQ v8 and later that the IBM MQ classes for Java and JMS are built with Java 7. Oracle documents that classes built with Java 7 cannot be used with Java 6. See below for references:
In the MQ v8.0 KC page: IBM MQ 8.0.0>IBM MQ>Product overview>What's changed in IBM MQ Version 8.0.0>Java: changes for Java 7
The IBM MQ classes for Java and IBM MQ classes for JMS are now built
with Java 7.
The Java 7 runtime environment supports running earlier class file
versions.
In the MQ v9.0 KC page: IBM MQ 9.0.x>IBM MQ>Technical overview>IBM MQ Java language interfaces
From IBM MQ Version 8.0, the IBM MQ classes for Java and IBM MQ classes for
JMS are built with Java 7. The Java 7 runtime
environment supports running earlier class file versions.
Oracle documents that Java 7 class files cannot be used with Java 6 in the following page:
Oracle Java SE 7 and JDK 7 Compatibility -> Binary Compatibility states the following:
The class file version for Java SE 7 is 51, as per the JVM
Specification, because of the invokedynamic byte code introduced by
JSR 292. Version 51 class files produced by the Java SE 7 compiler
cannot be used in Java SE 6.
#JoshMc has been absolutely correct with the explanations of version mismatch of java and mq jars and all.
I would like to add that though I could understand the error when it occurred by seeing the mismatch between 51 and 50, but my issue was to somehow connect to MQ and make the application running without changing the existing installations. That's why I could not upgrade my java to JDK 1.7.
However I solved my problem by using old MQ 7 jars in the classpath for Weblogic Server. Because as my application behaves like a client there won't be any problem while connecting to the MQ server which has version 8 using MQ jars which has been built with java 6. So I have just copied old MQ 7 jars in a folder and used that path in my Weblogic CLASSPATH reference and that solved my problem.
Related
Hey one of my client want an application and their JDK version is 1.7.0.28 and they are using weblogic 10.3.6 version.I want to know is there anyOne providing JDK 1.7.0.28??
WebLogic Server 10.3.6 supports Java 7. You should advice your customer to use the last Oracle JDK 7 version (Oracle JDK 1.7.0_261) to run its WebLogic server instances.
As Stultuske said, WebLogic 10.3.6 and JDK 7 are out of date. You may consider using recent versions (14c and Oracle JDK 11)
Recently, our online web service using tomcat 7.0.23.0 and JVM 1.7.0_51-b13 need to upgrade to java 8, which tomcat version is suitable for java 8 ?
See this link
http://tomcat.apache.org/whichversion.html
for details about which tomcat versions are supported on which java versions.
According to that link, tomcat 7.0.23.0 should work on java 8
Tomcat 7 is good and works well for Java 8 however, not recommended for Java8 as all features of Java 8 were not supported in tomcat 7.
Please use tomcat 9.x with Java 8 (Recommended from Tomcat Apache)
Please refer http://tomcat.apache.org/whichversion.html
Latest stable version supported on Java 8 is Tomcat 10 but the users of Tomcat 10 onwards should be aware that, as a result of the move from Java EE to Jakarta EE as part of the transfer of Java EE to the Eclipse Foundation, the primary package for all implemented APIs has changed from javax.* to jakarta.*.
I wanted to upgrade the JDK version of my WebLogic server (10.3.6) from 1.7 to 1.8. What can be the possible steps required to do this?
I have existing weblogic and JDK old versions on Windows platform. I want to update them. But when I search document about update steps on internet, I couldn't find anything. They just mention about installing process.
As you want to update weblogic and jdk version 1.7 to 1.8,
Then you can uninstall both of them.
Then download weblogic 12.2.1 and jdk 8 from following link.
Weblogic download link: weblogic download from here
JDK8 download link: jdk 8 download from here
Then install JDK8 first and then weblogic. Hope it is easy.
From Oracle blogs documentation,
WebLogic 12.2.1 requires Java 8 (JDK 8) as a runtime.
WebLogic 12.1.3 can be used with Java 7 or Java 8. Using WebLogic
12.1.3 with Java 7 caused warnings because of the permspace settings in the WebLogic start scripts. Permspace is removed from JDK 8, so
also these warnings are gone now with WebLogic 12.2.1 and JDK8.
JDK 8 comes with Nashorn JavaScript engine. Try the jjs command line
tool. Read the complete article here.
You can also follow the link: JRE 8 compatibility with weblogic 10.3.6 (11g
I thought the support for Java 1.8 has begun with WLS 12.1.3.
So I assume its not possible/realistic to get wls10.x.x work with a newer jdk as 1.7.x.
https://community.oracle.com/thread/3539686
I have to maintain a legacy web application and need to setup an test environment on a 32-bit Windows Notebook with a remote database. I have installed oepe-12.1.2.4-luna-distro-win32.zip from Orace and now want to setup the Oracle WebLogic Server (WLS) 12c (12.1.2) as an application server.
Maybe you can help me to answer following questions:
What Java 7 development kit do I need for WLS (Java EE or Java SE JDK) ?
Where do I get a 32-bit version for the Intel Core i5?
Is it possible to install WLS and JDK without extended (administrative) privileges?
Thanks in advance!
1.
You need only Java SE JDK, Java EE implementation is provided by WLS.
2.
you can download only 12.1.3 from oracle.com. To get a different version you must create an SR at support.oracle.com
3.
I remember installing without admin privileges, however I am not 100% sure.
I'm using Netbeans 7.2 with apache tomcat server of version 5.5.It is not supporting java 7 features and asking to set server level to 7? how can i do that? or should i use other server?which one will u recommend?
Apache Tomcat 7 does work with Java 7. You can check Tomcat 7 latest changelog at http://tomcat.apache.org/tomcat-7.0-doc/changelog.html
Note: Most of the times, it's good to start your development with latest server available (unless you have a very specific version requirements)
There is no Tomcat version that support Java 7 currently.All the currently supported Apache Tomcat versions (5.5.x, 6.0.x and 7.0.x) are known to run correctly on Java 6.