Error occurred during initialization of VM 附oracle官网解决方式

 java 命令

Error occurred during initialization of VM 
java.lang.NoClassDefFoundError: java.lang.Object

我解决的操作步骤

右击管理员方式 重新安装JDK软件

然后重新设置了一遍环境变量 JAVA_HOME CALSSPATH和path这些,就好了

我估计是我电脑没有执行管理员命令的原因。

 

另外附上FQ的一些截图和复制过来的文字(自行翻译吧),希望其他方式可以帮助到你

https://support.oracle.com/knowledge/Middleware/1006790_1.html

 

My Oracle Support Banner

Java[TM]:Error occurred during initialization of VM java.lang.NoClassDefFoundError: java.lang.Object (Doc ID 1006790.1)

Last updated on NOVEMBER 06, 2018

APPLIES TO:

Java SE JDK and JRE - Version 1.3.1 to 8
All Platforms

SYMPTOMS

When trying to run a Java[TM] application, you get the following error message:

Error occurred during initialization of VM
java.lang.NoClassDefFoundError: java.lang.Object

CHANGES

Actions that are known to trigger this problem:

1. Trying to run a 64-bit JVM[TM] on Solaris (SPARCv9 or x64) when the required 32-bit JVM is not installed(does not apply to JDK 8 and later since starting with JDK 8 there is No 32 bit JVM anymore).

2. Removing the file rt.jar from the JVM installation folder, implicitly or explicitly. Third-party anti-virus software has been known to cause this problem on Microsoft Windows platforms. 

3. Lack of read access rights to the file rt.jar.

4. Using the JVM's -Xbootclasspath: switch to modify the search path of the bootstrap class loader and Not including the file rt.jar on the search path.

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
鉴于引用\[1\]和引用\[2\]提供了关于"Error occurred during initialization of VM Could not reserve enough space for object heap"错误的解决方法,我可以给出以下答案: 这个错误通常是由于虚拟机的内存不足引起的。解决这个问题的方法有两种。一种是通过在代码中设置足够的内存空间,比如使用Spark的代码中的.set("spark.testing.memory","2147480000")来分配足够的空间给Spark。另一种是检查环境变量,确保JAVA_HOME配置正确,并重新加载SDK,然后重启IDEA。这样就可以解决这个问题了。\[2\] 另外,如果在Eclipse上运行出现了这个错误,可以尝试按照引用\[3\]中提到的排查环境配置是否正确的方法来解决。 #### 引用[.reference_title] - *1* [启动tomcat,报错 Error occurred during initialization of VM Could not reserve enough space for ...](https://blog.csdn.net/CNCDXX_88/article/details/107730005)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [IDEA Error occurred during initialization of VM](https://blog.csdn.net/retire123/article/details/123767950)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [Error occurred during initialization of VM Java虚拟机初始化失败](https://blog.csdn.net/qq_41755616/article/details/125805716)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值