简体   繁体   English

不支持的major.minor 52.0版Servlet

[英]Unsupported major.minor version 52.0 Servlets

I'm trying execute my java application in my server but always i'm facing the problem below: 我正在尝试在服务器中执行我的Java应用程序,但始终遇到以下问题:

HTTP Status 500 - br/webi/servlets/ServletEnviarMensagemDireta : Unsupported major.minor version 52.0 (unable to load class br.webi.servlets.ServletEnviarMensagemDireta) HTTP状态500-br / webi / servlets / ServletEnviarMensagemDireta:不受支持的major.minor版本52.0(无法加载br.w​​ebi.servlets.ServletEnviarMensagemDireta类)

At my server the java is the 1.8.0_66 and i developed my application with the same version. 在我的服务器上,Java是1.8.0_66,我用相同的版本开发了我的应用程序。 Follow the screenshots of my project and my server. 按照我的项目和服务器的屏幕截图。

在此处输入图片说明

在此处输入图片说明

I already Google and i've found that this problem happens because i'm compiling my project with the different version of the my server... But for me it seems ok. 我已经在Google上发现了这个问题,因为我正在使用服务器的不同版本来编译我的项目。但是对我来说,这似乎还可以。

Observation: My project was not made using MAVEN. 观察:我的项目不是使用MAVEN进行的。

Thanks for all help. 感谢您的所有帮助。

From the command line you can run 从命令行可以运行

jcmd {pid} VM.version

This will tell you which version it is actually using. 这将告诉您它实际使用的版本。 I suspect it's not Java 8. 我怀疑不是Java 8。

https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/tooldescr006.html https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/tooldescr006.html

I solved my problem... 我解决了我的问题

I made what is in this link: AskUbuntu 我做了这个链接中的内容: AskUbuntu

And reinstall Tomcat7 + oracle-java8-installer . 并重新安装Tomcat7 + oracle-java8-installer。

After this i just appoint the $JAVA_HOME again and everything works fine. 之后,我再次指定$ JAVA_HOME,一切正常。

Thanks for all help. 感谢您的所有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM