0

I need to change the JRE used by my tomcat6 server, because I've a JSP App which has compiled classes whith JDK 1.8.0_45.

Then since I had JRE 1.8.0_40 (and being it used by tomcat), I got a faulire at runtime in my JSP App:

The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files

So I've installed JRE 1.8.0_45, just dowloading it, then extract and move to:

/usr/lib/jvm/jre1.8.0_45/

And then updated to use it (as you can see here, sorry since it's in Spanish):

Update-alternatives

So I just reboot the computer, and then looked for which JRE is using tomcat... but found something like this (sorry if it's not the best way to look at it, was the easier way I think):

ps -aux | grep tomcat

Tomcat6 execution

As you can see, the first "line" in the output of grep is the execution of tomcat (isn't it?) but it seems to be using JDK instead of JRE. And plus that, it's using JDK1.8.0_40, while I'm using JDK1.8.0_45 in this same PC when building my App:

JDK used by me

And if we check the JDK options, the selected one hasn't a version specified, so I don't know if there's something wrong about it:

Alternatives JDK

So this is my problem, I just wonder how can I change the JDK/JRE version used by tomcat to u45.

I need to fix all this mess.

1 Answer 1

0

You can probably fix this by setting the JAVA_HOME variable in /etc/default/tomcat6 (I'm assuming elementary OS still has the Debian/Ubuntu Tomcat package).

The error you're getting is rather surprising though, I wouldn't expect to have errors regarding Map$Entry when switching between JDK 1.8.0_40 and 1.8.0_45.

2
  • I've tried that already and didn't work. I'll try again and tell you if it does. Commented May 24, 2015 at 10:04
  • I've tried it again @StephenKitt. I think tomcat is starting with the new JDK but doesn't work fine don't know why. Anyway your answer is correct, so I will create another one in stackoverflow. Thanks so much Commented May 24, 2015 at 18:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .