概述
1、constantPoolOop.cpp文件错误
/srv/java/openJDK/JDK1.7/openjdk/hotspot/src/share/vm/oops/constantPoolOop.cpp: In static member function 'static methodOopDesc* constantPoolOopDesc::method_at_if_loaded(constantPoolHandle, int, Bytecodes::Code)':
/srv/java/openJDK/JDK1.7/openjdk/hotspot/src/share/vm/oops/constantPoolOop.cpp:272:39: error: converting 'false' to pointer type 'methodOop' [-Werror=conversion-null]
if (cpool->cache() == NULL) return false; // nothing to load yet
解决方案:constantPoolOop.cpp文件第272行代码改为:(methodOop)false
2、loopnode.cpp文件报错:
/srv/java/openJDK/JDK1.7/openjdk/hotspot/src/share/vm/opto/loopnode.cpp: In static member function 'static Node* CountedLoopNode::match_incr_with_optional_truncation(Node*, Node**, Node**, const TypeInt**)':
/srv/java/openJDK/JDK1.7/openjdk/hotspot/src/share/vm/opto/loopnode.cpp:896:49: error: converting 'false' to pointer type 'Node*' [-Werror=conversion-null]
if (expr == NULL || expr->req() != 3) return false;
解决方案:和上一个问题一样,loopnode.cpp文件第896行改为:(Node*)false;
3、libjvm.so文件未定义:
java full version "1.7.0_80-b15"
Using java runtime at: /opt/jdk1.7.0_80/jre
Error occurred during initialization of VM
Unable to load native library: /opt/jdk1.7.0_80/jre/lib/amd64/libjava.so: symbol JVM_SetNativeThreadName, version SUNWprivate_1.1 not defined in file libjvm.so with link time reference
解决方案:需要下载jdk1.6 rpm
https://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html
4、超过10年的问题:
Error: time is more than 10 years from present: 1136059200000
java.lang.RuntimeException: time is more than 10 years from present: 1136059200000
解决方案:将以下文件里面的日期都改为10年内,可以改为当年时间。
/usr/openjdk/jdk/src/share/classes/java/util/CurrencyData.properties
转载于:https://my.oschina.net/zhangdq/blog/2250314
最后
以上就是辛勤白昼为你收集整理的centos7编译openjdk7常见问题的全部内容,希望文章能够帮你解决centos7编译openjdk7常见问题所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复