Please define INSTALL4J_JAVA_HOME to point to a suitable JVM 的解决办法

版权声明:本文为博主原创文章,如果觉得写的不错需要转载,在转载时请注明博文出处! https://blog.csdn.net/Hello_World_QWP/article/details/82289633

问题描述:

关于这个问题,是在使用搭建私服的过程中遇到的,私服已经搭建成功,由于是基于最新的版本 nexus-3.13.0-01 实现,在进行配置系统服务时(配置添加成系统服务,通过命令 “ systemctl start nexus ” 启动并实现自启动),启动时出现异常,异常信息如下:

● nexus.service - LSB: nexus
   Loaded: loaded (/etc/rc.d/init.d/nexus; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sat 2018-09-01 06:09:15 EDT; 17s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 5124 ExecStart=/etc/rc.d/init.d/nexus start (code=exited, status=83)

Sep 01 06:09:14 localhost.localdomain systemd[1]: Starting LSB: nexus...
Sep 01 06:09:15 localhost.localdomain nexus[5124]: No suitable Java Virtual Machine could be found on your system.
Sep 01 06:09:15 localhost.localdomain nexus[5124]: The version of the JVM must be at least 1.8 and at most 1.8.
Sep 01 06:09:15 localhost.localdomain nexus[5124]: Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.
Sep 01 06:09:15 localhost.localdomain systemd[1]: nexus.service: control process exited, code=exited status=83
Sep 01 06:09:15 localhost.localdomain systemd[1]: Failed to start LSB: nexus.
Sep 01 06:09:15 localhost.localdomain systemd[1]: Unit nexus.service entered failed state.
Sep 01 06:09:15 localhost.localdomain systemd[1]: nexus.service failed.

如下图所示:

解决方案:

这个问题很简单,只需要修改一下 nexus 的配置文件就可以了,根据错误提示内容,在配置文件中找到 “ INSTALL4J_JAVA_HOME_OVERRIDE ” 项,取消其注解,并将地址指向本地的 Jre 环境即可,如下图:

 

关于这个问题需要解决方案的,还有其它问题的欢迎提问!

问题解决后,就可以通过一下命令进行停止/启动/状态 的操作了:

如下图:


好了,关于 Please define INSTALL4J_JAVA_HOME to point to a suitable JVM 的解决办法 就写到这儿了,如果还有什么疑问或遇到什么问题欢迎扫码提问,也可以给我留言哦,我会一一详细的解答的。 
歇后语:“ 共同学习,共同进步 ”,也希望大家多多关注CSND的IT社区。

猜你喜欢

转载自blog.csdn.net/Hello_World_QWP/article/details/82289633