Comments (6)
1、clone源码
因为我电脑已经预装了Mercurial Distributed SCM,所以直接使用hg即可以,这个过程比较长,我大约执行了40分种
hg clone http://hg.openjdk.java.net/jdk10/master openjdk10
from project.
大约的目录结构,./doc/building.html有很详细的build说明,和需要安装的环境,有问题可以看一下
-rw-r--r-- 1 staff 1522 Jan 25 13:57 ASSEMBLY_EXCEPTION
-rw-r--r-- 1 staff 19274 Jan 25 13:57 LICENSE
-rw-r--r-- 1 staff 2785 Jan 25 13:57 Makefile
-rw-r--r-- 1 staff 307 Jan 25 13:57 README
drwxr-xr-x 9 staff 288 Jan 25 13:57 bin
drwxr-xr-x 3 staff 96 Jan 25 14:40 build
-rw-r--r-- 1 staff 1649 Jan 25 13:57 configure
drwxr-xr-x 7 staff 224 Jan 25 13:57 doc
drwxr-xr-x 67 staff 2144 Jan 25 13:57 make
drwxr-xr-x 86 staff 2752 Jan 25 13:57 src
drwxr-xr-x 17 staff 544 Jan 25 13:57 test
from project.
2、configure
bash configure --with-debug-level=slowdebug --enable-dtrace --with-jvm-variants=server --with-target-bits=64 --enable-ccache --with-num-cores=8 --with-memory-size=8000 --disable-warnings-as-errors
执行这个的时候碰到个问题,因为我电脑是安装了jdk8和jdk11,boot jdk就提示我需要jdk9或者jdk10,然后我就先安装了jdk10,发现在boot jdk还是验证错误提示我missing javah,具体错误忘记截图了。
然后我google了一下在openjdk官网找到了答案
http://mail.openjdk.java.net/pipermail/build-dev/2018-January/020556.html
然后我更改了一下configure的文件,把javah的校验干掉了,然后重新autoconfigure一下,这个错误就过了。或者可以更换为jdk9作为boot jdk也是可以的。
from project.
然后还遇到了一个错误是找不到freetype,可是我brew list发现freetype是已经安装了的,这个比较简单,直接加上--with-freetype=/usr/local/Cellar/freetype/2.9.1就可以了
from project.
3、make
make命令可以带不同参数,我这里是make image,一切顺利make完成
Common Make Targets
Apart from the default target, here are some common make targets:
hotspot - Build all of hotspot (but only hotspot)
hotspot-<variant> - Build just the specified jvm variant
images or product-images - Build the JRE and JDK images
docs or docs-image - Build the documentation image
test-image - Build the test image
all or all-images - Build all images (product, docs and test)
bootcycle-images - Build images twice, second time with newly built JDK (good for testing)
clean - Remove all files generated by make, but not those generated by configure
dist-clean - Remove all files, including configuration
from project.
验证
➜ openjdk10 ./build/macosx-x86_64-normal-server-slowdebug/jdk/bin/java -version
openjdk version "10-internal"
OpenJDK Runtime Environment (slowdebug build 10-internal+0-adhoc.zengyuan.openjdk10)
OpenJDK 64-Bit Server VM (slowdebug build 10-internal+0-adhoc.zengyuan.openjdk10, mixed mode)
from project.
Related Issues (19)
- Spring-BeanFactory解读 HOT 1
- Spring容器启动过程的源码分析 HOT 7
- BeanDefinitions加载流程 HOT 3
- 三种工厂模式 HOT 1
- Spring一个bean的初始化过程
- 【转载】【深入理解JVM】:Java内存模型JMM
- 设计模式之单例模式
- 一致性hash算法 HOT 1
- 缓存一致性协议
- Spring源码之AOP的实现方式 HOT 2
- 几种排序算法
- Spring的事务传播机制
- 数据的事务隔离级别 HOT 3
- 数据结构之树
- 分布式事务常用解决方案
- spring-boot2.X之SpringBootApplication注解 HOT 7
- spring-boot2.X之AutoConfigurationImportSelector解析 HOT 8
- 偏向锁的paper
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from project.