文章目录
- 一、如何安装
- 二、遇到的坑
-
- 2.1 Unsupported major.minor version 52.0
- 2.2 Checksum onbuild/jaxp/drop/bundles/jaxp145_01.zip is d41d8cd98f00b204e9800998ecf8427e, not 32394c780c8fb5e29775f623525993c0,
- 2.3 echo "*** This OS is not supported:" `uname -a`; exit 1;
- 2.4 C++11 requires a space between literal and string macro [-Werror=literal-suffix]
- 2.5 error: "__LEAF" redefined [-Werror]
- 2.6 error: 'int readdir_r(DIR*, dirent*, dirent**)' is deprecated [-Werror=deprecated-declarations]
- 2.7 error: unable to find string literal operator 'operator""tag' with 'const char [58]', 'long unsigned int' arguments
- 2.8 error: cannot convert 'bool' to 'methodOop {aka methodOopDesc*}' in return if (cpool->cache() == NULL) return false; // nothing to load yet
- 2.9 /usr/bin/ld: cannot find -lstdc++;/usr/bin/ld: cannot find -ljvm
- 2.10 Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
- 三、参考文献
一、如何安装
跟着这个老哥做,它写得很清晰。地址
二、遇到的坑
2.1 Unsupported major.minor version 52.0
原因:
ant-1.10.3需要jdk1.8的支持
解决办法:
吧ant改为ant-1.7.1就行了(应该还有些版本也行)。
参考
2.2 Checksum onbuild/jaxp/drop/bundles/jaxp145_01.zip is d41d8cd98f00b204e9800998ecf8427e, not 32394c780c8fb5e29775f623525993c0,
原因:
发生这个问题时,我查看了所谓的jaxp145_01.zip,说的是zip可它根本就没下载,而且是一个纯文本的文件。
我查了下,出现这个原因要嘛文件被损坏了,要么文件被人篡改了。
解决办法:
- 于是在/etc/profile下将下载改为了false:
export ALLOW_DOWNLOADS=false- 且设置了drop下来的包的路径(你自己设,实现把所需要的包下下来)
export ALT_DROPS_DIR=/home/fengli/Downloads/MyOpenJdk7/drops- 我将需要的包下载来放在了/home/fengli/Downloads/MyOpenJdk7/drops目录下。也就是这四个文件:
我是参考这个网站搞的,参考
2.3 echo “*** This OS is not supported:” uname -a
; exit 1;
解决方法:
sudo vim openjdk/hotspot/make/linux/Makefile
注释掉以下三行
#ifeq ( ( D I S A B L E H O T S P O T O S V E R S I O N C H E C K ) (DISABLE_HOTSPOT_OS_VERSION_CHECK) (DISA