鍦∕ac OS X Yosemite涓婄紪璇慜penJDK 九
鍦∕ac OS X Yosemite涓婄紪璇慜penJDK 9
聽 聽 聽 鍛ㄦ湯鍦ㄥ鏃犱簨锛屾兂灏濊瘯鑷繁鍔ㄦ墜缂栬瘧涓媜penjdk锛岋紙浣滀负涓€涓猨ava绋嬪簭鍛橈紝杩欎箞澶氬勾杩樻槸绗竴娆″姩鎵嬬紪璇憃penjdk锛屾兂璧锋潵璁╀汉姹楅锛夛紝涓棿鍚勭鏇叉姌锛屽ソ浜嗭紝搴熻瘽涓嶅璇达紝寮€濮嬫棰樸€?/div>
聽 聽 聽聽 聽棣栧厛鎴戝畨瑁呬簡mercurial锛屾寜鐓с€婃繁鍏ョ悊瑙ava铏氭嫙鏈恒€嬩竴涔︿腑鐨勮娉曪紝鍙互浠巗ource bundle release椤甸潰涓嬭浇鎵撳寘濂界殑婧愮爜锛宩dk7鍦板潃涓猴細http://jdk7.java.net/source.html銆備絾鏄垜鑰冭檻鍒皁penjdk涓湁jdk9浜嗭紝鎵€浠ユ斁寮冨皾璇曠紪璇慾dk7锛屽喅瀹氬皾璇昷dk9锛屽彲鎯渟ource bundle release椤甸潰骞舵病鏈夋彁渚沷penjdk9鐨勬墦鍖呬笅杞斤紝浜庢槸鍙兘閫夋嫨浣跨敤mercurial鏉ヤ笅杞芥簮鐮併€?/div>
濡傛灉杩樻病鏈夊畨瑁卪ercurial鐨勮瘽锛岃鑷涓嬭浇锛堟垜浣跨敤濡備笅鏂瑰紡瀹夎锛歜rew聽install mercurial锛夈€傚ソ浜嗭紝鐜板湪鎴戝氨鍙互浣跨敤mercurial聽 clone涓€涓猨dk9鐨勬簮鐮佷簡銆?/div>
鍦ㄧ粓绔緷娆′娇鐢ㄥ涓嬪懡浠わ細
hg clone http://hg.openjdk.java.net/jdk9/dev
chmod 755 get_source.sh
./get_source.sh
灏卞彲浠ヤ笅杞給penjdk9鐨勬簮鐮佷簡銆備笉鐭ラ亾鏄笉鏄鐨勫師鍥狅紝鎴戝閲岀殑缃戜竴鐩翠笅涓嶄笅鏉ワ紝鍚庢潵鎴戠敵璇蜂簡涓€涓厤璐逛竴骞寸殑浜氶┈閫婁簯鏈嶅姟鍣紙缇庡浗鐨勶級鏉ヤ笅杞斤紝閭i€熷害锛岀湡鏄笉鐢ㄥ璇翠簡銆傦紙濡傛灉澶у涔熸湁鍏磋叮鐨勮瘽锛屽彲浠ヨ嚜琛岀敵璇凤紝缃戜笂鍏充簬杩欐柟闈㈢殑鏂囩珷涓嶅皯锛岃google锛?/div>
聽 聽鎴戜篃浠庣綉涓婃煡浜嗕簺璧勬枡锛岄兘璇寸紪璇戞槸闇€瑕乆11锛屾墍浠ユ垜涔熻浜嗕竴涓?a href="http://xquartz.macosforge.org/landing/">XQuartz锛岃繖涓渶鏂扮増鐨勬槸2.7.7锛屾垜鎺ㄨ崘瀹夎2.5.5锛屽洜涓烘渶鏂扮増鐨勫ソ鍍忎笉璧蜂綔鐢紝鍏蜂綋鍙互鍙傝€?a href="http://gvsmirnov.ru/blog/tech/2014/02/07/building-openjdk-8-on-osx-maverick.html">Building OpenJDK 8 on Mac OS X Mavericks锛堣繖鏂囩珷杩樻槸寰堝叿鏈夊弬鑰冧环鍊肩殑锛夈€傞櫎姝や箣澶栬繕闇€瑕佷笅杞戒竴涓獂code锛屾垜鏈湴鐨勭増鏈槸Version 6.1.1锛圷osemite涓笉闆嗘垚xcode锛屾墍浠ラ渶瑕佷笅杞斤紝寤鸿鐗堟湰5浠ヤ笂锛夈€?/div>
聽 聽 聽濂戒簡锛屽熀鏈殑宸ュ叿閮藉凡鍑嗗瀹屾瘯锛屽彲浠ュ紑濮嬬紪璇戜簡,鎴戠洿鎺uild fastdebug鐗堟湰鐨勩€?/div>
jdk9-dev quinn$ chmod 755 configure聽
jdk9-dev quinn$ ./configure --enable-debug --with-target-bits=64
寰楀埌缁撴灉
A new configuration has been successfully created in
/Users/quinn/study/jdk9-dev/build/macosx-x86_64-normal-server-fastdebug
using configure arguments '--enable-option-checking=fatal --enable-debug --with-target-bits=64'.
璇存槑鎴愬姛浜嗭紝涓嬮潰鎴戜滑缁х画make銆?/div>
jdk9-dev quinn$ make
Building OpenJDK for target 'default' in configuration 'macosx-x86_64-normal-server-fastdebug'
Compiling 8 files for BUILD_TOOLS_LANGTOOLS
璀﹀憡: [options] 鏈笌 -source 1.6 涓€璧疯缃紩瀵肩被璺緞
1 涓鍛?br> 璀﹀憡: [options] 鏈笌 -source 1.6 涓€璧疯缃紩瀵肩被璺緞
1 涓鍛?br> Parsing 1 properties into enum-like class for jdk.compiler
Compiling 20 properties into resource bundles for jdk.compiler
Compiling 5 properties into resource bundles for jdk.dev
Compiling 10 properties into resource bundles for jdk.javadoc
Compiling 8 files for BUILD_TOOLS_LANGTOOLS
璀﹀憡: [options] 鏈笌 -source 1.6 涓€璧疯缃紩瀵肩被璺緞
1 涓鍛?br> 璀﹀憡: [options] 鏈笌 -source 1.6 涓€璧疯缃紩瀵肩被璺緞
1 涓鍛?br> Parsing 1 properties into enum-like class for jdk.compiler
Compiling 20 properties into resource bundles for jdk.compiler
Compiling 5 properties into resource bundles for jdk.dev
Compiling 10 properties into resource bundles for jdk.javadoc
Compiling 820 files for BUILD_INTERIM_LANGTOOLS
[...]
铏界劧杩囩▼涓巻缁忔洸鎶橈紙涓棿浼氭湁寰堝璀﹀憡锛夛紝浣嗘垜浠緷鐒跺緱鍒版渶濂界殑缁撴灉
----- Build times -------
Start 2015-01-19 18:00:21
End 聽 2015-01-19 18:13:52
00:13:31 TOTAL
Start 2015-01-19 18:00:21
End 聽 2015-01-19 18:13:52
00:13:31 TOTAL
-------------------------
濂斤紝澶у姛鍛婃垚浜嗭紒
鎴戜滑鏉ョ畝鍗曟祴璇曚竴涓嬶紝鎵撳紑build鐩綍
jdk9-dev quinn$ cd build/macosx-x86_64-normal-server-fastdebug/
macosx-x86_64-normal-server-fastdebug quinn$ ls
Makefile聽聽聽聽聽聽聽聽聽聽聽 build.log聽聽聽 compare.sh*聽 config.status*聽 hotspot-spec.gmk聽 make-support/聽 support/
Makefile聽聽聽聽聽聽聽聽聽聽聽 build.log聽聽聽 compare.sh*聽 config.status*聽 hotspot-spec.gmk聽 make-support/聽 support/
bootcycle-spec.gmk聽 buildtools/聽 config.log 聽 hotspot/聽聽聽聽聽聽聽 jdk/聽聽聽聽聽聽聽聽聽聽聽聽聽 spec.gmk
macosx-x86_64-normal-server-fastdebug quinn$ cd jdk/bin/
bin quinn$ ls
appletviewer*聽 java* 聽聽聽 javap* 聽聽聽 jdeps* 聽 jjs* 聽聽聽聽聽聽聽 jsadebugd*聽 keytool* 聽聽聽聽聽 policytool* 聽 schemagen* 聽 unpack200*
idlj*聽聽聽聽聽聽聽聽聽 javac*聽聽聽 jcmd*聽聽聽聽聽 jhat*聽聽聽 jmap*聽聽聽聽聽聽聽 jstack* 聽聽聽 native2ascii*聽 rmic* 聽聽聽聽聽聽聽 serialver* 聽 wsgen*
jar* 聽聽聽聽聽聽聽聽聽 javadoc*聽 jconsole*聽 jimage*聽 jps* 聽聽聽聽聽聽聽 jstat*聽聽聽聽聽 orbd*聽聽聽聽聽聽聽聽聽 rmid* 聽聽聽聽聽聽聽 servertool*聽 wsimport*
idlj*聽聽聽聽聽聽聽聽聽 javac*聽聽聽 jcmd*聽聽聽聽聽 jhat*聽聽聽 jmap*聽聽聽聽聽聽聽 jstack* 聽聽聽 native2ascii*聽 rmic* 聽聽聽聽聽聽聽 serialver* 聽 wsgen*
jar* 聽聽聽聽聽聽聽聽聽 javadoc*聽 jconsole*聽 jimage*聽 jps* 聽聽聽聽聽聽聽 jstat*聽聽聽聽聽 orbd*聽聽聽聽聽聽聽聽聽 rmid* 聽聽聽聽聽聽聽 servertool*聽 wsimport*
jarsigner* 聽聽聽 javah*聽聽聽 jdb* 聽聽聽聽聽 jinfo* 聽 jrunscript*聽 jstatd* 聽聽聽 pack200* 聽聽聽聽聽 rmiregistry*聽 tnameserv* 聽 xjc*
bin quinn$ ./java -version
openjdk version "1.9.0-internal-fastdebug"
OpenJDK Runtime Environment (build 1.9.0-internal-fastdebug-quinn_2015_01_19_17_58-b00)
openjdk version "1.9.0-internal-fastdebug"
OpenJDK Runtime Environment (build 1.9.0-internal-fastdebug-quinn_2015_01_19_17_58-b00)
OpenJDK 64-Bit Server VM (build 1.9.0-internal-fastdebug-quinn_2015_01_19_17_58-b00, mixed mode)
鍙互鐪嬪埌宸茬粡鎴愬姛浜嗭紝杩樺甫鑷繁鏈哄櫒鍚嶅摝銆?/div>
聽
聽 聽 聽聽 聽鏈€鍚庯紝璇翠笅鎴戦亣鍒扮殑闂鍚э紝鏈€寮€濮嬶紝鐢变簬鍦ㄦ湰鏈轰竴鐩撮兘鏃犳硶clone涓媜penjdk9鐨勬簮浠g爜锛屾垜灏卞厛灏濊瘯浜嗙紪璇憃penjdk8锛屽弬鑰冧簡涓婇潰鎻愬埌鐨勯偅绡囨枃绔狅紝鏈€寮€濮嬭繕绠楅『鍒╋紝浣嗗悗鏉ユ垜閬囧埌鐨勯棶棰樺氨鍜屾枃绔犱腑鎻愬埌鐨勪笉涓€鑷翠簡锛屽湪缃戜笂閬嶅瑙e喅鏂规鍚庢棤鏋滐紝鏈€鍚庡彂鐜颁簡openjdk鐨勫線鏉?a href="http://mail.openjdk.java.net/pipermail/build-dev/2014-November/013581.html">閭欢锛屾垜杩欓噷鎽樻妱涓€琛岋細
The short answer is that building jdk8 on Yosemite is not supported.
鍘熸潵浜哄鏍规湰涓嶆敮鎸乯dk8鍦╕osemite涓婄紪璇戙€傚悗鏉ユ垜鍙堝湪openjdk鐨剋iki涓壘鍒颁簡鍚勪釜鐗堟湰鍦ㄤ笉鍚屽钩鍙扮殑鏀寔鎯呭喌锛屾渶鍚庢墠閫夋嫨浜嗙紪璇憃penjdk9銆傚啀鏉ヨ涓嬩笂闈㈤偅绡囨枃绔?a href="http://gvsmirnov.ru/blog/tech/2014/02/07/building-openjdk-8-on-osx-maverick.html">Building OpenJDK 8 on Mac OS X Mavericks锛屾垜涓€寮€濮嬪氨鏄寜鐓ц繖绡囨枃绔犳潵鎿嶄綔鐨勶紝鍦ㄧ紪璇憃penjdk8鐨勬椂鍊欏墠闈㈢殑鍑犱釜闂鍩烘湰璺熻繖涓竴鏍凤紝涓€鐩村埌saproc_make_fobjc_exceptions_flag_fix.patch涔嬪悗鎵嶅嚭鐜伴棶棰樸€傚悗鏉ュ湪缂栬瘧openjdk9鐨勬椂鍊欙紝鐢变簬娌℃湁杩樺師鐜锛屼富瑕佹槸gcc鍜実锛嬶紜锛堟枃绔犱腑浣跨敤apple-gcc42锛夛紝涓棿杩樺嚭鐜颁簡涓€浜涢棶棰橈紝鍑虹幇闂鐨勫師鍥?a href="http://stackoverflow.com/questions/8584152/getting-expected-a-property-attribute-before-strong-when-compiling-an-arc-fi">涓庢绫讳技锛屾渶鍚庤繕鏄€夋嫨xcode涓殑clong鏉ョ紪璇戙€?/div>
鍒氬紑濮嬫槸瑙夊緱寰堝ソ鐜╋紝涓棿閬囧埌闂瑙e喅涓嶄簡閮芥兂姝讳簡銆傘€傘€傚悗鏉ュ嘲鍥炶矾杞紝鎬荤殑鏉ヨ杩樻槸瑕佸皾璇曘€?/div>
聽
聽 聽 聽濂戒簡锛屾渶鍚庣澶у鍦ㄧ紪璇戠殑杩囩▼涓璯ood luck锛?/div>
1 妤? kelaosuo
17 灏忔椂鍓?nbsp;
涓€鏍蜂粠鏉ユ病缂栬瘧杩噅dk锛屽洖澶翠篃瑕佽瘯涓€涓嬶紝鎰熻寰堝ソ鐜┿€?img src="/images/smiles/icon_biggrin.gif" />
2 妤? Quinn.Zhuang
16 灏忔椂鍓?nbsp;
kelaosuo 鍐欓亾
涓€鏍蜂粠鏉ユ病缂栬瘧杩噅dk锛屽洖澶翠篃瑕佽瘯涓€涓嬶紝鎰熻寰堝ソ鐜┿€?img src="/images/smiles/icon_biggrin.gif" />
鍒氬紑濮嬫槸瑙夊緱寰堝ソ鐜╋紝涓棿閬囧埌闂瑙e喅涓嶄簡閮芥兂姝讳簡銆傘€傘€傚悗鏉ュ嘲鍥炶矾杞紝鎬荤殑鏉ヨ杩樻槸瑕佸皾璇曘€?/div>
文章评论
相关解决方案