Currently my server is running of the Tomcat 5.5.26 and JDK 1.5.15.
Now I want to change to tomcat 6.0.29 and JDK 1.6.29.
There was many application running of the current environment so if I can change to new environment the required to compile all the application again and upload on the new environment or existing war file is working with new environment?
The applications should just work. However, you should do thorough testing of each one before inflicting them on your users, just to make sure. Your apps may be unintentionally relying on Tomcat 5-specific behaviour.
Furthermore, there should be no need to recompile under java 6 to make them work. However, you should check that the apps do still compile under Java 6. Again, they should, but it's worth checking.
Incidentally, why Tomcat 6? Tomcat 7 is current stable version of Tomcat; if you're going to migrate, you should migrate to that.
Related
we are using one java application in wildfly server which uses java 1.8.0_202, now we want to migrate the java from oracle jdk to adoptopenjdk. I changed the path of new openjdk in management console of wildfly server.
Now the question is do we need again rebuild the application using adoptopenjdk or can i use the old war which is deployed.
Thanks in advance!..
As I cannot comment because of lack of reputation as an answer:
Normally you can run a Java Application without knowledge of the Java it was built with if the versions match. Second: Why don't you just try it? If you have these strong concerns you should try it in a test environment.
You should not need to do anything to migrate from an Oracle JDK to OpenJDK. Just change the path to the JAVA_HOME and that's it. The only possible issues would be if you use Oracle specific API's which one should not be doing anyway :)
I have an application running on jdk7 and jboss and i would like to extract all the batch code from it to make it cleaner.
I want to create executable spring boot 2 jars and run them separately or at least upgrade to spring boot and the jdk version to 8.
Is it possible to run a spring boot 2 application that requires jdk 8 on a machine that also runs a jboss application on jdk 7 ? how can I specify the jdk version at runtime for an executable jar or war ?
I would like to use a container to solve this but our production team doesn't want that right now. I know there is "setenv" in a tomcat or weblogic servers but i would like to know if there is a spring boot solution for that (I didn't find any)
Thank you in advance.
You can have as many JVMs as you like on your machine. you just need to have the settings for the java version you need to be loaded.
ie if your java 8 is in c:\programs\java\jdk8\bin and your java 7 is in c:\programs\java\jdk7\bin, then you need to specify the java.exe absolutely as in c:\programs\java\jdk8\bin\java.exe you also need to set the environment variables for that session, like set JAVA_HOME=c:\programs\java\jdk8\bin\.
My example is using a windows machine as a base. You will need a startup script, or similar for the environment that you are using.
Note that if you just use java.exe in your startup script, then the JVM will be started with the first JVM found in your %PATH%, so you may want to remove Java from the path to be sure that you are getting the exact version you require.
We are using IBM WAS 7 as the server for our application. But the organization's rules do not allow us to have servers installed in workstations. I have this J2EE web project that uses WAS 7 as the target server runtime.
At first, I installed WebSphere® Application Server V7.0 tools for Eclipse. I thought it will provide the runtime along with it as well. Now I can see the option of WAS 7 in server runtime, but on selecting it I have to provide the path where WAS 7 is installed. And I don't have that.
Can I use any other server runtime and expect that it will work within WAS 7? If not, is there any way to just get the runtime without installing the server?
If you are using fully standard Java EE APIs (and no special WebSphere classes), you can simply add the Java EE API jars to your project classpath.
Since WebSphere 7 is Java EE 5 compliant, you could go to maven and download the Java EE 5 API jar and add it to your classpath. This will allow you to compile your code in eclipse.
If you need some WebSphere specific APIs, then you need to tell your development organization that you need to have access to the Jars somehow so that you can compile your code against them. Have your legal team investigate if you can distribute the WebSphere jars to developers for compiling purposes.
Another option is downloading WebSphere Liberty (which is free for development useage) and using Liberty to compile and run your code locally. Note that you will have to install a really old version of Liberty to have it match up with the Java EE 5 WebSphere version 7 (currently Liberty is EE 7 compliant).
Disclaimer: I am a developer for both WebSphere Traditional and WebSphere Liberty. The reason I am suggesting Liberty instead of other app servers is because the askers org is ultimately using WebSphere Traditional, and Liberty will have the closest match in behavior.
It depends a little on the meaning "But the organization's rules do not allow us to have servers installed in workstations".
Often this is due to licencing constraints, in which case you can install an open-source J2EE server like Tomcat or JBOSS. So long as your apps do not call IBM-specific libraries, the same binary should run on any of these environments.
I've been on a very old version of GAE for a long time. Every time I try to update to the latest version I get this error when deploying it to GCP:
java.lang.IllegalArgumentException: Class file is Java 8 but max supported is
Java 7: org/eclipse/jetty/http/BadMessageException.class in C:\Users\XXXXXXXXXXX\
backendservlet\build\exploded-app\WEB-
INF\lib\jetty-http-9.3.2.v20150730.jar
I think jetty comes with GAE so how do I fix this? When I deploy it locally it runs without errors. It also builds without error. This only happens when deploying to GCP.
My appengine instance is on JAVA 7 runtime so maybe that's the issue? How do I change that? I tried deplying with a different version and name and it still didn't work.
Please help.
Looks like jetty (or at least the version you're using) needs Java 8, which is not supported on GAE: Does Google App Engine support Java 8?.
GAE does not yet support Java 8. If jetty is a dependency of your project, you need to use a version that has source 1.7. Otherwise delete C:\Users\XXXXXXXXXXX\
backendservlet\build\exploded-app\WEB-
INF\lib\jetty-http-9.3.2.v20150730.jar
I have 2 separate Java installations on my machine. I have 5.0 to support an older Enterprise app I develop on, and I have the latest JVM installed for other things. I need to keep the old version on my machine, but I am now trying to use Play! 2.0 for some of my own projects.
When I try to run it from the Play! directory I get a "UnsupportedClassVersionError" since the 5.0 version is getting picked up. What is the best way to point play to my 7.0 jdk installation? It is important that JDK5 remain the default.
The play executable you run is a launch script that starts sbt with the Java version that is on the path. You can either change the path when you start it, like so:
PATH="/my/jdk7/path:$PATH" play
This assumes you are using some kind of unix shell. If you aren't, you can modify the launch script itself.
If you mean in production as in play start, you can run once you have compiled your application using play dist :
java -jar yourappname.jar
And thus specify the java version, you want to use;