<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Eclipse &#8211; 記下來</title>
	<atom:link href="https://noter.tw/tag/eclipse/feed/" rel="self" type="application/rss+xml" />
	<link>https://noter.tw</link>
	<description>一路上踩到的坑、遇到的問題，一點一滴記下來，希望能幫助到需要的人~</description>
	<lastBuildDate>Fri, 25 Jun 2021 08:54:44 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.3</generator>

<image>
	<url>https://noter.tw/wp-content/uploads/cropped-old-1130742_1920-1-32x32.jpg</url>
	<title>Eclipse &#8211; 記下來</title>
	<link>https://noter.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 抗戰歷程</title>
		<link>https://noter.tw/8623/received-fatal-alert-handshake_failure/</link>
					<comments>https://noter.tw/8623/received-fatal-alert-handshake_failure/#comments</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Fri, 25 Jun 2021 08:54:43 +0000</pubDate>
				<category><![CDATA[程式開發]]></category>
		<category><![CDATA[一般程式]]></category>
		<category><![CDATA[Received fatal alert: handshake_failure]]></category>
		<category><![CDATA[handshake_failure]]></category>
		<category><![CDATA[java 1.7]]></category>
		<category><![CDATA[java 1.8]]></category>
		<category><![CDATA[jre]]></category>
		<category><![CDATA[java ssl error]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[javax.net.ssl.SSLHandshakeException]]></category>
		<guid isPermaLink="false">https://noter.tw/?p=8623</guid>

					<description><![CDATA[<p>小蛙的工作常常要維護很多有年代的系統，這些系統有些已經找不到源頭或甚至沒有文件留下來了，前一段時間一直碰到抓 https 的時候噴錯的狀況，這篇把這段很痛苦的經歷記錄下來，希望能幫助遇到相同問題的朋友&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/8623/received-fatal-alert-handshake_failure/" data-wpel-link="internal">javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 抗戰歷程</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>小蛙的工作常常要維護很多有年代的系統，這些系統有些已經找不到源頭或甚至沒有文件留下來了，前一段時間一直碰到抓 https 的時候噴錯的狀況，這篇把這段很痛苦的經歷記錄下來，希望能幫助遇到相同問題的朋友。</p>



<span id="more-8623"></span>



<p>早期很多網站都是 http 的，到現在各家大廠的推波助瀾下，你沒有 https 就被當作是不合群的、有危險的、跟不上潮流的網站(?!)，總之當有人上你的網站，但你的網站沒有 https 的時候，各大瀏覽器就會很不客氣的提示：您與這個網站的連線不安全，有些人看到這些提示怕都怕死了根本不敢連～</p>



<p>小蛙這次要處理的系統是早期抓網站圖片的工具，由於是早期開發的，當時幾乎都是 http 為主的網站，這支程式也完全沒有考慮 https 的問題 (當時合作的單位完全沒有 https)，這一兩年來這個問題慢慢顯露出來，有些要抓的網站也在我們自己單位，因此可以透過一些特殊的方法來處理，但是今天遇到 &#8230; 要抓外面單位的網站，這 &#8230; 折騰了小蛙一整天啊。</p>



<p class="pre left green">小蛙給一個最簡單卻也是最困難的建議：更新到 JRE 1.8</p>



<p>小蛙試了超多網路上找到的方法，如果你已經在網路上找很久了，那小蛙用的方法你一定都試過，應該也都還是失敗 &#8230; (跟小蛙一樣)，最後決定直接安裝 JRE 1.8。來看一下這討人厭的錯誤訊息</p>



<pre class="wp-block-preformatted withcode">Exception in thread "main" javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
     at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
     at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
     at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1959)
     at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1077)
     at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
     at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339)
     at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1323)
     at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
     at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
     at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
     at TESTSSL.downloadRemoteImage(TESTSSL.java:37)
     at TESTSSL.downloadRemoteImage(TESTSSL.java:53)
     at TESTSSL.main(TESTSSL.java:74)</pre>



<p>直接看小蛙 Eclipse 的設定，Compiler 的地方使用 1.7 </p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" src="https://lh3.googleusercontent.com/pw/ACtC-3e9Jzy_2bG9HQE6aGNsNevI25pm7FJoS7MK_g-QL-g7O5Ho40-uzMk3igXTjhZYUpuQ9ja4_KPfJDxNq2Ei60AJbo6GWbhyk5GWis4JIZMNARbGNOWPta4CUK-uMW2VcqeDKyD1UdxsuyqdEUxCKI0Q8Q=w831-h788-no?authuser=2" alt="ACtC 3e9Jzy 2bG9HQE6aGNsNevI25pm7FJoS7MK g QL g7O5Ho40 uzMk3igXTjhZYUpuQ9ja4 KPfJDxNq2Ei60AJbo6GWbhyk5GWis4JIZMNARbGNOWPta4CUK uMW2VcqeDKyD1UdxsuyqdEUxCKI0Q8Q=w831 h788 no?authuser=2 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 抗戰歷程" title="javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 抗戰歷程"></figure></div>



<p>Java Build Path 也是使用 jdk 1.7.0_45</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" src="https://lh3.googleusercontent.com/pw/ACtC-3f7rafyHQzMcgF3Od_mfpt9y8ZXQoDpnmU51K3zzzML-oZom0p3IkeC5ECLoWU2K2Ic6eiaECBVP6fpa9tjYLmGHAYXkWmkeorJi55ULGHsxLBafeg8IH3YRSZoxO6ncqvAmEyFi3upQFI_iKUEjC38OA=w831-h788-no?authuser=2" alt="ACtC 3f7rafyHQzMcgF3Od mfpt9y8ZXQoDpnmU51K3zzzML oZom0p3IkeC5ECLoWU2K2Ic6eiaECBVP6fpa9tjYLmGHAYXkWmkeorJi55ULGHsxLBafeg8IH3YRSZoxO6ncqvAmEyFi3upQFI iKUEjC38OA=w831 h788 no?authuser=2 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 抗戰歷程" title="javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 抗戰歷程"></figure></div>



<p>Run Configurations 的 JRE 設定也是選擇 jdk 1.7.0_45</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" src="https://lh3.googleusercontent.com/pw/AM-JKLWHU1lL8wQEAIaIRR3gi-P47_XCOsGwV72aWXOkHX_G4e3NOgFI5uFLVBgmOxyOgp4pV36EiE-ZckUO9-AQHbp9ghuyxXFyljn1jn_kFzFQHUTiGMwtWgifDVcWhbB2DzsfTSsAvNpXZv5vCwjusEZrGA=w693-h296-no?authuser=2" alt="AM JKLWHU1lL8wQEAIaIRR3gi P47 XCOsGwV72aWXOkHX G4e3NOgFI5uFLVBgmOxyOgp4pV36EiE ZckUO9 AQHbp9ghuyxXFyljn1jn kFzFQHUTiGMwtWgifDVcWhbB2DzsfTSsAvNpXZv5vCwjusEZrGA=w693 h296 no?authuser=2 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 抗戰歷程" title="javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 抗戰歷程"></figure></div>



<p>執行下去就是這個錯誤 &#8230;</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" src="https://lh3.googleusercontent.com/pw/ACtC-3f9jG0XqkmNx4fEHhjEK90x9RWkI-C3TYAjN7SxSuC5BPHiIOODq3mSyGK5YMRRwZ6Txt3q9yNt0R75LCOpFalfA74bFUUKtHOQ0KBSJAQ8mBvdHHbvvN1uUBWgdjX12jEetzKb0TapfRn7TC0K39ZwDw=w1357-h400-no?authuser=2" alt="ACtC 3f9jG0XqkmNx4fEHhjEK90x9RWkI C3TYAjN7SxSuC5BPHiIOODq3mSyGK5YMRRwZ6Txt3q9yNt0R75LCOpFalfA74bFUUKtHOQ0KBSJAQ8mBvdHHbvvN1uUBWgdjX12jEetzKb0TapfRn7TC0K39ZwDw=w1357 h400 no?authuser=2 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 抗戰歷程" title="javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 抗戰歷程"></figure></div>



<p>如果手動安裝了 JRE 8，然後把 Run Configurations 的 JRE 設定成 JRE 8</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" src="https://lh3.googleusercontent.com/pw/AM-JKLXwW-GbryLhs1UBdvpWDXYSb6Thx52bsxaVDbxndptJjpt_Vc2qrQ2zyx0ih1P6aSrZL2hNoUsH5P_ezZ7AAd5YR4x-yOITS2WcCkx-rT07BvWLix9BLbIOcs-v67eos6VLo3VsUxWOiwIlK3u6xkYi7Q=w686-h282-no?authuser=2" alt="AM JKLXwW GbryLhs1UBdvpWDXYSb6Thx52bsxaVDbxndptJjpt Vc2qrQ2zyx0ih1P6aSrZL2hNoUsH5P ezZ7AAd5YR4x yOITS2WcCkx rT07BvWLix9BLbIOcs v67eos6VLo3VsUxWOiwIlK3u6xkYi7Q=w686 h282 no?authuser=2 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 抗戰歷程" title="javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 抗戰歷程"></figure></div>



<p>就打完收工了 &#8230; 真的是太敢動 (嗚嗚嗚)，原本小蛙一直想要在 1.7 的環境下想辦法處理，試了一大堆方法沒有一個可以動的，因為改來改去改到亂七八糟，就連把環境升上 1.8 也都還是不行 &#8230; 後來發現 Eclipse 執行的時候可以選擇運行環境，就決定專案的 Compiler 跟 Build Path 維持 1.7，Run Configurations 改成 JRE 1.8 &#8230; 不想繼續糾結下去 Orz &#8230; 但有一些 JSP 環境下沒辦法這樣處理的還是很頭大啊 >&lt;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/8623/received-fatal-alert-handshake_failure/" data-wpel-link="internal">javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 抗戰歷程</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/8623/received-fatal-alert-handshake_failure/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Eclipse 開啟 class 檔案</title>
		<link>https://noter.tw/4467/eclipse-%e9%96%8b%e5%95%9f-class-%e6%aa%94%e6%a1%88/</link>
					<comments>https://noter.tw/4467/eclipse-%e9%96%8b%e5%95%9f-class-%e6%aa%94%e6%a1%88/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Sat, 23 Feb 2019 05:15:02 +0000</pubDate>
				<category><![CDATA[一般程式]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[decompiler]]></category>
		<category><![CDATA[jd]]></category>
		<category><![CDATA[反解譯]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[Eclipse]]></category>
		<guid isPermaLink="false">https://noter.tw/?p=4467</guid>

					<description><![CDATA[<p>有時候拿到一些 jar 或是 class 卻沒有辦法看到內容，用強制打開也只會看到一堆亂碼，這邊記錄一下怎麼透過 Eclipse 開啟 class 檔案。 很簡單就可以做到這件事，不過看起來好像不能修&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/4467/eclipse-%e9%96%8b%e5%95%9f-class-%e6%aa%94%e6%a1%88/" data-wpel-link="internal">Eclipse 開啟 class 檔案</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>有時候拿到一些 jar 或是 class 卻沒有辦法看到內容，用強制打開也只會看到一堆亂碼，這邊記錄一下怎麼透過 Eclipse 開啟 class 檔案。</p>



<span id="more-4467"></span>



<p>很簡單就可以做到這件事，不過看起來好像不能修改(不確定)，直接開始吧！</p>



<p>首先到 <a href="http://jd.benow.ca/" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external" class="wpel-icon-right">Java Decompiler 官網<span class="wpel-icon wpel-image wpel-icon-6"></span></a>，找到 JD-Eclipse 且換到 Download 下載 jd-eclipse-site-1.0.0-RC2.zip<br></p>



<div class="wp-block-image"><figure class="aligncenter"><a href="https://lh3.googleusercontent.com/pHxJskapRYkDMCLgNJ7L6iqJLu4gB8BfAJYD0iVgsG0v8kQuRlAr01XT7hz2vdQk4ZHbvdXFcMBarLZwOgQY-85dY6fHUrAtonZ6p7x38PlN3W-j6nGMJSmFFl77wnbJ3tbaucYK1yBFvGoLX-Q8WKOMNj6nD_mSXhCLB-4iz2LTq7nyAEldgVm1mrsdS_HC38kQFGpmaDaWTuBPms7mjt1Kbyn5CKaHriv7RrWrI2cGwv_axjXWU63weCgZisR9mMiRIFjL82l4ntXuPUQ5rRhI8ufe9M-p44BaJFDT_VaIm_1St8EECvO6xgOAb-6uDqcGVU0ofKpk55b7-uKTdQxk3p9in6mF6zFF4okKru4Ty896_y3xs026vkuzi1itpjU0l7wGZgW5GsjjnYPFc1jIpfx26QDyuVKSPxdijPiCL0iwmok9j6MYmxxmJLj6yNAYv-2mowJ0lRQOgHAzcPZn_4g4V5l-HZ-Z41ce1hCwz0kiSF57ZejpKHTtuCtYbooxoythRseh4NS86ZJUbt8so-0Q8zdvosnFIgUSKuFiX0zg4uL8sefcDY-Prv-lfjPrkE4Zcc7AQoqpSzw6TJgqrKu-ZKsInxL9Ex0qeH4LLPISoeDXOzGJIegzSPgkmJRtRuyV8ujozJoTgB-RrhUxDzk8f52X=w713-h708-no" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="https://lh3.googleusercontent.com/pHxJskapRYkDMCLgNJ7L6iqJLu4gB8BfAJYD0iVgsG0v8kQuRlAr01XT7hz2vdQk4ZHbvdXFcMBarLZwOgQY-85dY6fHUrAtonZ6p7x38PlN3W-j6nGMJSmFFl77wnbJ3tbaucYK1yBFvGoLX-Q8WKOMNj6nD_mSXhCLB-4iz2LTq7nyAEldgVm1mrsdS_HC38kQFGpmaDaWTuBPms7mjt1Kbyn5CKaHriv7RrWrI2cGwv_axjXWU63weCgZisR9mMiRIFjL82l4ntXuPUQ5rRhI8ufe9M-p44BaJFDT_VaIm_1St8EECvO6xgOAb-6uDqcGVU0ofKpk55b7-uKTdQxk3p9in6mF6zFF4okKru4Ty896_y3xs026vkuzi1itpjU0l7wGZgW5GsjjnYPFc1jIpfx26QDyuVKSPxdijPiCL0iwmok9j6MYmxxmJLj6yNAYv-2mowJ0lRQOgHAzcPZn_4g4V5l-HZ-Z41ce1hCwz0kiSF57ZejpKHTtuCtYbooxoythRseh4NS86ZJUbt8so-0Q8zdvosnFIgUSKuFiX0zg4uL8sefcDY-Prv-lfjPrkE4Zcc7AQoqpSzw6TJgqrKu-ZKsInxL9Ex0qeH4LLPISoeDXOzGJIegzSPgkmJRtRuyV8ujozJoTgB-RrhUxDzk8f52X=w713-h708-no" alt="pHxJskapRYkDMCLgNJ7L6iqJLu4gB8BfAJYD0iVgsG0v8kQuRlAr01XT7hz2vdQk4ZHbvdXFcMBarLZwOgQY 85dY6fHUrAtonZ6p7x38PlN3W j6nGMJSmFFl77wnbJ3tbaucYK1yBFvGoLX Q8WKOMNj6nD mSXhCLB 4iz2LTq7nyAEldgVm1mrsdS HC38kQFGpmaDaWTuBPms7mjt1Kbyn5CKaHriv7RrWrI2cGwv axjXWU63weCgZisR9mMiRIFjL82l4ntXuPUQ5rRhI8ufe9M p44BaJFDT VaIm 1St8EECvO6xgOAb 6uDqcGVU0ofKpk55b7 uKTdQxk3p9in6mF6zFF4okKru4Ty896 y3xs026vkuzi1itpjU0l7wGZgW5GsjjnYPFc1jIpfx26QDyuVKSPxdijPiCL0iwmok9j6MYmxxmJLj6yNAYv 2mowJ0lRQOgHAzcPZn 4g4V5l HZ Z41ce1hCwz0kiSF57ZejpKHTtuCtYbooxoythRseh4NS86ZJUbt8so 0Q8zdvosnFIgUSKuFiX0zg4uL8sefcDY Prv lfjPrkE4Zcc7AQoqpSzw6TJgqrKu ZKsInxL9Ex0qeH4LLPISoeDXOzGJIegzSPgkmJRtRuyV8ujozJoTgB RrhUxDzk8f52X=w713 h708 no Eclipse 開啟 class 檔案" title="Eclipse 開啟 class 檔案"></a></figure></div>



<p>下方有安裝流程：</p>



<ol class="my-li bg-darkblue wp-block-list"><li>下載 jd-eclipse-site-1.0.0-RC2.zip，並解壓縮到一個地方放</li><li>開啟 Eclipse</li><li>「Help &gt; Install New Software &#8230; 」</li><li>點選 Add&#8230; 加入新的 repository</li><li>輸入 &#8220;JD-Eclipse Update Site&#8221;，名字可以打自己記得住的就好</li><li>選取 &#8220;Java Decompiler Eclipse Plug-in&#8221;</li><li>一直下一步，到結束後重啟 Eclipse</li></ol>



<p>看起來很像步驟很多，其實一下子就弄好了，接下來要設定跟 Eclipse 的關聯，讓開啟 class 檔的時候，可以自動套用 Java Decompiler。</p>



<p>開啟 Eclipse -&gt; Window -&gt; Preferences</p>



<div class="wp-block-image"><figure class="aligncenter"><a href="https://lh3.googleusercontent.com/iJm1LkCytcM05-l724M6yZN58HOZte1O-0Hrcsq0W-AR2C2d839Ri69AlEqTZPJi6W5K0XdTXfTDF65PNiv1Msr3dLSm8lAeE7Bqwyu42GymsvPokSN5Xkuq0evJBfjYM9mBVRD4x8RIVftSzh9z1M-B8EYHFE_s_6lZstD_FBPKp-jPgl_7lgWqtUI4wGEWdWeevuxnp9cquaY2uGoN82WWFGrv0O8Y6_F_wfP5dc0WWf8L7mlhhOmisQWZ-UIW7Yx3KCIldI_0OtW9hKHrkOR0MHRzkA_DzCbLXWKJJ9yO76QVRAvEuzOSFgwjBzfrsmJpXXQVXwOaUdZRZdvJRGop6ge9MLV2IOVyfvBVd2doP6Jy5mNtyvyKVZj8214w4pAOxouH29jbD2LBUtP0z1oSuNh0YLwwMjUntfMn3zQrSkG0nNcMF4W4ipWbRg--tvC6L0boeeiQCSRhIq4O98AYShMAYLWe0KG7meiSE0CowGB_wH3ZkqDF5BmTjevVOWmTkrf4u4lA-jw3ajBnnr1Ygps0QRhL-gq5NVfBE4sV7LAVlLGU0XEc5F1hMbwrob4_nAyk7ymTO9R6TELEqwp-eLQcsi7kWC40HOcZRHGk4EKYJQs-WeldFnxrn5PcNK8mk5DTiBx3OyLddsAbR8tqr-UUPDZX=w323-h287-no" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="https://lh3.googleusercontent.com/iJm1LkCytcM05-l724M6yZN58HOZte1O-0Hrcsq0W-AR2C2d839Ri69AlEqTZPJi6W5K0XdTXfTDF65PNiv1Msr3dLSm8lAeE7Bqwyu42GymsvPokSN5Xkuq0evJBfjYM9mBVRD4x8RIVftSzh9z1M-B8EYHFE_s_6lZstD_FBPKp-jPgl_7lgWqtUI4wGEWdWeevuxnp9cquaY2uGoN82WWFGrv0O8Y6_F_wfP5dc0WWf8L7mlhhOmisQWZ-UIW7Yx3KCIldI_0OtW9hKHrkOR0MHRzkA_DzCbLXWKJJ9yO76QVRAvEuzOSFgwjBzfrsmJpXXQVXwOaUdZRZdvJRGop6ge9MLV2IOVyfvBVd2doP6Jy5mNtyvyKVZj8214w4pAOxouH29jbD2LBUtP0z1oSuNh0YLwwMjUntfMn3zQrSkG0nNcMF4W4ipWbRg--tvC6L0boeeiQCSRhIq4O98AYShMAYLWe0KG7meiSE0CowGB_wH3ZkqDF5BmTjevVOWmTkrf4u4lA-jw3ajBnnr1Ygps0QRhL-gq5NVfBE4sV7LAVlLGU0XEc5F1hMbwrob4_nAyk7ymTO9R6TELEqwp-eLQcsi7kWC40HOcZRHGk4EKYJQs-WeldFnxrn5PcNK8mk5DTiBx3OyLddsAbR8tqr-UUPDZX=w323-h287-no" alt="iJm1LkCytcM05 l724M6yZN58HOZte1O 0Hrcsq0W AR2C2d839Ri69AlEqTZPJi6W5K0XdTXfTDF65PNiv1Msr3dLSm8lAeE7Bqwyu42GymsvPokSN5Xkuq0evJBfjYM9mBVRD4x8RIVftSzh9z1M B8EYHFE s 6lZstD FBPKp jPgl 7lgWqtUI4wGEWdWeevuxnp9cquaY2uGoN82WWFGrv0O8Y6 F wfP5dc0WWf8L7mlhhOmisQWZ UIW7Yx3KCIldI 0OtW9hKHrkOR0MHRzkA DzCbLXWKJJ9yO76QVRAvEuzOSFgwjBzfrsmJpXXQVXwOaUdZRZdvJRGop6ge9MLV2IOVyfvBVd2doP6Jy5mNtyvyKVZj8214w4pAOxouH29jbD2LBUtP0z1oSuNh0YLwwMjUntfMn3zQrSkG0nNcMF4W4ipWbRg tvC6L0boeeiQCSRhIq4O98AYShMAYLWe0KG7meiSE0CowGB wH3ZkqDF5BmTjevVOWmTkrf4u4lA jw3ajBnnr1Ygps0QRhL gq5NVfBE4sV7LAVlLGU0XEc5F1hMbwrob4 nAyk7ymTO9R6TELEqwp eLQcsi7kWC40HOcZRHGk4EKYJQs WeldFnxrn5PcNK8mk5DTiBx3OyLddsAbR8tqr UUPDZX=w323 h287 no Eclipse 開啟 class 檔案" title="Eclipse 開啟 class 檔案"></a></figure></div>



<p>General -&gt; Editors -&gt; File Associations -&gt; 找到 *.class，下方把 &#8220;JD Class File Viewer&#8221; 設定成 Default，下次只要雙擊 class 檔案，就會自動使用 Java Decompiler 插件開啟了。</p>



<div class="wp-block-image"><figure class="aligncenter"><a href="https://lh3.googleusercontent.com/6RlfH50YvjDvO_20UxwJ1cQVm-e23FUafQqISmvqvfhO9H5cUT2-dhLoOv6MftpnsLghZB8um-8ZUwG2VPr-OM4I_xUMTp9k-ObmNX1FN-bltw6deqw-B9sR5O0cYtydZsraa0dOet8hn4BuaKlkvxTI9vJjGx3WTHXpaQ_cqEq_tYwopg1IqNG4ixeGNupyjE-LydBQJaKnFILlC9zW6ADOMq1eGa-aZbAPsGBgu4Wwz_2TaBx_HlDeZ3J9U4psNZwWuHC1hGLD8WfwDZNI5d1F7Ea6ssDXA8cbsi2FlNpuLqS--m09FEWDKVvBXqTTJDOVi1iDvTd4fHKlix56bZpdS6PAyM7m9mGvYZoBA7CJoHdokvNUFK0ncXonj9TUarGVlXXOpsXJRPBQVgOf22xf_q0Ph_lG-JnVmw-l6Z1l3x-6O5dOh_NclKoOfmNimoJJQ3yqqT6nswaESA0QORhtV90hnTlxdTQmJKRAeDRGq_3cL6o4RiebcPwt_HZmQNcLHEwr9t6ZtWCsujkCyhy8zBHCT3K-bHZfxeMpulk04JrsE0QVab0BLPlWOz2eE3Jc41fkIlip_lJPVF-iskQzoRA1xwMLBVkfjyIMap4fYKR3hgY4d-Vzi7-UsTbiYeRyCCXTRJtzdCw_BAQxRdveoHui8Ro7=w868-h866-no" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" src="https://lh3.googleusercontent.com/6RlfH50YvjDvO_20UxwJ1cQVm-e23FUafQqISmvqvfhO9H5cUT2-dhLoOv6MftpnsLghZB8um-8ZUwG2VPr-OM4I_xUMTp9k-ObmNX1FN-bltw6deqw-B9sR5O0cYtydZsraa0dOet8hn4BuaKlkvxTI9vJjGx3WTHXpaQ_cqEq_tYwopg1IqNG4ixeGNupyjE-LydBQJaKnFILlC9zW6ADOMq1eGa-aZbAPsGBgu4Wwz_2TaBx_HlDeZ3J9U4psNZwWuHC1hGLD8WfwDZNI5d1F7Ea6ssDXA8cbsi2FlNpuLqS--m09FEWDKVvBXqTTJDOVi1iDvTd4fHKlix56bZpdS6PAyM7m9mGvYZoBA7CJoHdokvNUFK0ncXonj9TUarGVlXXOpsXJRPBQVgOf22xf_q0Ph_lG-JnVmw-l6Z1l3x-6O5dOh_NclKoOfmNimoJJQ3yqqT6nswaESA0QORhtV90hnTlxdTQmJKRAeDRGq_3cL6o4RiebcPwt_HZmQNcLHEwr9t6ZtWCsujkCyhy8zBHCT3K-bHZfxeMpulk04JrsE0QVab0BLPlWOz2eE3Jc41fkIlip_lJPVF-iskQzoRA1xwMLBVkfjyIMap4fYKR3hgY4d-Vzi7-UsTbiYeRyCCXTRJtzdCw_BAQxRdveoHui8Ro7=w868-h866-no" alt="6RlfH50YvjDvO 20UxwJ1cQVm e23FUafQqISmvqvfhO9H5cUT2 dhLoOv6MftpnsLghZB8um 8ZUwG2VPr OM4I xUMTp9k ObmNX1FN bltw6deqw B9sR5O0cYtydZsraa0dOet8hn4BuaKlkvxTI9vJjGx3WTHXpaQ cqEq tYwopg1IqNG4ixeGNupyjE LydBQJaKnFILlC9zW6ADOMq1eGa aZbAPsGBgu4Wwz 2TaBx HlDeZ3J9U4psNZwWuHC1hGLD8WfwDZNI5d1F7Ea6ssDXA8cbsi2FlNpuLqS m09FEWDKVvBXqTTJDOVi1iDvTd4fHKlix56bZpdS6PAyM7m9mGvYZoBA7CJoHdokvNUFK0ncXonj9TUarGVlXXOpsXJRPBQVgOf22xf q0Ph lG JnVmw l6Z1l3x 6O5dOh NclKoOfmNimoJJQ3yqqT6nswaESA0QORhtV90hnTlxdTQmJKRAeDRGq 3cL6o4RiebcPwt HZmQNcLHEwr9t6ZtWCsujkCyhy8zBHCT3K bHZfxeMpulk04JrsE0QVab0BLPlWOz2eE3Jc41fkIlip lJPVF iskQzoRA1xwMLBVkfjyIMap4fYKR3hgY4d Vzi7 UsTbiYeRyCCXTRJtzdCw BAQxRdveoHui8Ro7=w868 h866 no Eclipse 開啟 class 檔案" title="Eclipse 開啟 class 檔案"></a></figure></div>



<p></p>



<p></p>



<p></p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/4467/eclipse-%e9%96%8b%e5%95%9f-class-%e6%aa%94%e6%a1%88/" data-wpel-link="internal">Eclipse 開啟 class 檔案</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/4467/eclipse-%e9%96%8b%e5%95%9f-class-%e6%aa%94%e6%a1%88/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Java was started but returned exit code = 13</title>
		<link>https://noter.tw/3437/java-was-started-but-returned-exit-code-13/</link>
					<comments>https://noter.tw/3437/java-was-started-but-returned-exit-code-13/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Thu, 18 Dec 2014 03:43:20 +0000</pubDate>
				<category><![CDATA[手機 App]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[code 13]]></category>
		<category><![CDATA[update]]></category>
		<guid isPermaLink="false">http://wazai.net/?p=3437</guid>

					<description><![CDATA[<p>前陣子不知道做了什麼更新，今天要開 Eclipse 突然遇到這個錯誤 &#8230; 記錄一下，留給有需要的人，以 Java 更新的速度，應該很常遇到這個問題。 「Java was started b&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/3437/java-was-started-but-returned-exit-code-13/" data-wpel-link="internal">Java was started but returned exit code = 13</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>前陣子不知道做了什麼更新，今天要開 Eclipse 突然遇到這個錯誤 &#8230; 記錄一下，留給有需要的人，以 Java 更新的速度，應該很常遇到這個問題。<br />
<span id="more-3437"></span><br />
「<span style="color: #ff0000;"><strong>Java was started but returned exit code = 13</strong></span>」要解決這個錯誤很簡單，Google 了一下就有很多類似的文章，這邊小蛙遇到這個問題自己記錄一下，大致上問題是出在某一次的 Java 更新後，用來啟動 Eclipse 的跟目前 JVM 的版本不符合，例如：一邊是 32 bit，一邊卻是 64 bit 造成的。<br />
小蛙這邊選了最簡單的一種，小蛙用的是 windows 8.1 到 「控制台」 -&gt; 「程式和功能」 -&gt;找到最近的一次 Java 更新，例如「Java 8 Update xx」，把他移除掉。再開啟 Eclipse 就可以了。<br />
參1、參2、參3 有其他更詳細介紹解決方法，不想把最新版更新移除掉的網友可以參考看看。<br />
<strong>參考資料：</strong></p>
<ol>
<li>MyEclipse 10 does not start “Java was started but returned exit code 13” @ stackoverflow<br />
<address><a href="http://stackoverflow.com/questions/11846758/myeclipse-10-does-not-start-java-was-started-but-returned-exit-code-13" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">http://stackoverflow.com/questions/11846758/myeclipse-10-does-not-start-java-was-started-but-returned-exit-code-13<span class="wpel-icon wpel-image wpel-icon-6"></span></a></address>
</li>
<li>eclipse启动不了，出现“Java was started but returned exit code=13&#8230;&#8230;”对话框 @ 百度知道<br />
<address><a href="http://zhidao.baidu.com/question/224582151.html" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">http://zhidao.baidu.com/question/224582151.html<span class="wpel-icon wpel-image wpel-icon-6"></span></a></address>
</li>
<li>20140827-幫曲仔寫APP-安裝環境篇 @ TK呱呱<br />
<address><a href="http://gienmin.blogspot.tw/2014/08/20140827-app.html" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">http://gienmin.blogspot.tw/2014/08/20140827-app.html<span class="wpel-icon wpel-image wpel-icon-6"></span></a></address>
</li>
</ol>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/3437/java-was-started-but-returned-exit-code-13/" data-wpel-link="internal">Java was started but returned exit code = 13</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/3437/java-was-started-but-returned-exit-code-13/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MEMO: Eclipse export apk errors</title>
		<link>https://noter.tw/3235/memo-eclipse-export-apk-errors/</link>
					<comments>https://noter.tw/3235/memo-eclipse-export-apk-errors/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Sat, 14 Jun 2014 14:48:25 +0000</pubDate>
				<category><![CDATA[手機 App]]></category>
		<category><![CDATA[Conversion to Dalvik format failed with error 1]]></category>
		<category><![CDATA[Lint Checking]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Andoid]]></category>
		<category><![CDATA[Android SDK Content Loader 0%]]></category>
		<category><![CDATA[android-support-v4.jar]]></category>
		<guid isPermaLink="false">http://wazai.net/?p=3235</guid>

					<description><![CDATA[<p>不知道為什麼，之前 export apk 時都沒有這些問題，今天卻問題不斷，這裡記錄一下遇到的問題。 1. Export aborted because fatal lint errors were &#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/3235/memo-eclipse-export-apk-errors/" data-wpel-link="internal">MEMO: Eclipse export apk errors</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>不知道為什麼，之前 export apk 時都沒有這些問題，今天卻問題不斷，這裡記錄一下遇到的問題。<br />
<span id="more-3235"></span></p>
<h4>1. Export aborted because fatal lint errors were found.</h4>
<p>在要匯出 apk 的時候，出現以下訊息：</p>
<div>
<div id="highlighter_898410" class="syntaxhighlighter  text">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="text plain">Export Aborted</code></div>
<div class="line number2 index1 alt1"><code class="text plain">Export aborted because fatal lint errors were found. These are listed in the Lint View. Either fix these before running Export again, or turn off "Run full error check where exporting app: in the Android &gt; Lint Error Checking preference page.</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>其實這個問題的解法就在錯誤訊息裡面了，只要取消勾選下列路徑即可</p>
<div>
<div id="highlighter_120018" class="syntaxhighlighter  text">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="text plain">Window -&gt; Preferences -&gt; Android -&gt; Lint Error Checking -&gt; Run full error check when exporting app and abort if fatal errors are found.</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<h4>2. Android SDK Content Loader 0%</h4>
<p>開啟 eclipse 的時候，遇到 Android SDK Content Loader 卡在 0% 的情況，請參考 <a href="https://noter.tw/2950/eclipse-%e5%81%9c%e5%9c%a8-android-sdk-content-loader/" target="_blank" rel="noopener noreferrer" data-wpel-link="internal">Eclipse 停在 Android SDK Content Loader</a>。不過還沒辦法完全解決，關閉後重新啟動就又遇到相同狀況，等找到新解法小蛙再更新。</p>
<h4>3. Conversion to Dalvik format failed with error 1</h4>
<p>小蛙之前的文章 <a href="https://noter.tw/1755/conversion-to-dalvik-format-failed-with-error-1/" target="_blank" rel="noopener noreferrer" data-wpel-link="internal">Conversion to Dalvik format failed with error 1</a> 裡面提到兩個解決方法，如果通通都不行的話，最有效的方法是把整個專案複製一份出來，刪掉 Project 後，再重新 Import Exist Android Project，就可以解決這個問題。</p>
<h4>4. [Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;</h4>
<p>造成這個狀況的原因是小蛙的 A 專案載入了 ActionbarSherlock、FacebookSDK、Supportv4PreferenceFragment &#8230; 等，每個專案下面又都載入了一個 android-support-v4.jar，遇到這種錯誤可以把其他的指向同一個 android-support-v4.jar，例如：ActionbarSherlock 下的 android-support-v4.jar。<br />
這邊有遇到其他更多 Eclipse 問題會繼續更新，一方面留作記錄方便查找，一方面希望能幫助到有需要的人。<br />
<strong>參考資料：</strong></p>
<ol>
<li><a href="https://noter.tw/2950/eclipse-%e5%81%9c%e5%9c%a8-android-sdk-content-loader/" data-wpel-link="internal">Eclipse 停在 Android SDK Content Loader</a></li>
<li><a href="https://noter.tw/1755/conversion-to-dalvik-format-failed-with-error-1/" data-wpel-link="internal">Conversion to Dalvik format failed with error 1</a></li>
</ol>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/3235/memo-eclipse-export-apk-errors/" data-wpel-link="internal">MEMO: Eclipse export apk errors</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/3235/memo-eclipse-export-apk-errors/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0</title>
		<link>https://noter.tw/3104/java-lang-unsupportedclassversionerror-unsupported-major-minor-version-51-0/</link>
					<comments>https://noter.tw/3104/java-lang-unsupportedclassversionerror-unsupported-major-minor-version-51-0/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Fri, 18 Oct 2013 10:06:17 +0000</pubDate>
				<category><![CDATA[Web Server]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[Struts2]]></category>
		<category><![CDATA[java.lang.UnsupportedClassVersionError]]></category>
		<category><![CDATA[JDK]]></category>
		<guid isPermaLink="false">http://wazai.net/?p=3104</guid>

					<description><![CDATA[<p>最近在做一些 struts2 的佈署，之前都是在 Windows 下進行，這次要佈署到遠端機器，OS 不同以及環境不同常造成一些怪異問題，這裡記錄一下如果遇到「java.lang.Unsupporte&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/3104/java-lang-unsupportedclassversionerror-unsupported-major-minor-version-51-0/" data-wpel-link="internal">java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>最近在做一些 struts2 的佈署，之前都是在 Windows 下進行，這次要佈署到遠端機器，OS 不同以及環境不同常造成一些怪異問題，這裡記錄一下如果遇到「java.lang.UnsupportedClassVersionError」這個問題的解決方案！<br />
<span id="more-3104"></span><br />
在網路上查了一下，會造成這個原因是兩邊的 Java 版本不符，小蛙開發機上的 Java 是選擇 1.7，而遠端機器 Ubuntu 上面只有 Java 1.6，把整個 Struts2 專案的 war 丟進去之後就跑出以下這個錯誤：</p>
<pre>2013/10/17 上午 11:05:44 org.apache.catalina.core.StandardContext filterStart
嚴重的: Exception starting filter struts2
java.lang.UnsupportedClassVersionError: aaa/bbb/action/LoginAction : Unsupported major.minor version 51.0 (unable to load class aaa.bbb.action.LoginAction)
        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2824)
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1150)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
        at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:144)
        at com.opensymphony.xwork2.ObjectFactory.getClassInstance(ObjectFactory.java:108)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:472)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:426)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:543)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:292)
        at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112)
        at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:250)
        at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
        at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:473)
        at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
        at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
        at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:273)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)
        at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:372)
        at org.apache.catalina.core.ApplicationFilterConfig.&lt;init&gt;(ApplicationFilterConfig.java:98)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4584)
        at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5262)
        at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5257)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)</pre>
<p>解決方法是在 Eclipse -&gt; Project -&gt; Properties -&gt; Java Compiler -&gt; &nbsp;Compiler compliance level 1.6 這裡設定成符合的版本即可，但還是要注意不管是 1.6 or 1.7 如果有使用到特定版本的寫法，可能會出現一些錯誤喔！比較好的方法是讓本機端跟遠端不管是 JDK 或 Tomcat 版本一致才是上策。(參考資料2)<br />
小蛙透過上面的方法設定不同版本的 JDK 後，Project -&gt; Clean 選擇剛剛變更過的專案，卻發生下面的錯誤：</p>
<pre>Java compiler level does not match the version of the installed Java project facet.
Faceted Project Problem (Java Version Mismatch)</pre>
<p>什麼是 Eclipse Project Facet？(from 參考資料1 :&nbsp;<a href="http://tomkuo139.blogspot.tw/2012/01/eclipse-project-facet.html" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">Eclipse Project Facet 功能 @&nbsp;昭佑.天翔<span class="wpel-icon wpel-image wpel-icon-6"></span></a>)</p>
<blockquote><p>Project Facets 只要是方便你 &#8220;快速擴充套件&#8221; 與 &#8220;控管套件版本&#8221;,<br />
只要你在 Project Facets 勾選要擴充的套件,<br />
Eclipse 會自動幫你將相關套件加入到&nbsp;Java Build Path / Web App Libraries&nbsp;(也就是&nbsp;WEB-INF/lib) 目錄中.</p></blockquote>
<p>上面的錯誤是因為我們調整的 Java Compiler 的版本，但是卻跟 Project Facet 設定的不一樣造成的，這邊只要到</p>
<pre>Project -&gt; Properties -&gt; Project Facets -&gt; Java -&gt; 1.6 設定成跟剛剛的 Compiler compliance&nbsp;level 相同即可！</pre>
<p><strong>參考資料：</strong></p>
<ol>
<li>Eclipse Project Facet 功能 @&nbsp;昭佑.天翔<br />
<address><a href="http://tomkuo139.blogspot.tw/2012/01/eclipse-project-facet.html" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">http://tomkuo139.blogspot.tw/2012/01/eclipse-project-facet.html<span class="wpel-icon wpel-image wpel-icon-6"></span></a></address>
</li>
<li>Eclipse: java.lang.UnsupportedClassVersionError: Bad version number in .class file<br />
<address><a href="http://www.programcreek.com/2010/05/java-lang-unsupportedclassversionerror-bad-version-number-in-class-file/" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">http://www.programcreek.com/2010/05/java-lang-unsupportedclassversionerror-bad-version-number-in-class-file/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></address>
</li>
</ol>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/3104/java-lang-unsupportedclassversionerror-unsupported-major-minor-version-51-0/" data-wpel-link="internal">java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/3104/java-lang-unsupportedclassversionerror-unsupported-major-minor-version-51-0/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>將專案匯出 / 匯入 WAR 檔</title>
		<link>https://noter.tw/3117/%e5%b0%87%e5%b0%88%e6%a1%88%e5%8c%af%e5%87%ba%e5%8c%af%e5%85%a5-war-%e6%aa%94/</link>
					<comments>https://noter.tw/3117/%e5%b0%87%e5%b0%88%e6%a1%88%e5%8c%af%e5%87%ba%e5%8c%af%e5%85%a5-war-%e6%aa%94/#comments</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Fri, 18 Oct 2013 10:00:38 +0000</pubDate>
				<category><![CDATA[一般程式]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Struts]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[WAR]]></category>
		<guid isPermaLink="false">http://wazai.net/?p=3117</guid>

					<description><![CDATA[<p>在 Struts2 設置筆記 (Hello World 級^^) 中提到 Struts2 的設置環境，但是如果每次要開發一個 Struts 2 專案就要做一次這些事情有點麻煩，如果只是要空白的 WAR&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/3117/%e5%b0%87%e5%b0%88%e6%a1%88%e5%8c%af%e5%87%ba%e5%8c%af%e5%85%a5-war-%e6%aa%94/" data-wpel-link="internal">將專案匯出 / 匯入 WAR 檔</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>在 <a href="https://noter.tw/2905/struts2-%e8%a8%ad%e7%bd%ae%e7%ad%86%e8%a8%98-hello-world-%e7%b4%9a/" target="_blank" rel="noopener noreferrer" data-wpel-link="internal">Struts2 設置筆記 (Hello World 級^^)</a> 中提到 Struts2 的設置環境，但是如果每次要開發一個 Struts 2 專案就要做一次這些事情有點麻煩，如果只是要空白的 WAR，Struts2 下載下來裡面就已經有了，這邊小蛙記錄把一個基礎建置好的 Struts 2 專案(包含已經加入了常用的設定、套件、架構 &#8230; 等) 匯出成 WAR。<br />
<span id="more-3117"></span>要把專案匯出成 WAR 非常簡單，只要在要匯出的專案上</p>
<pre>點選滑鼠右鍵
-&gt; Export
-&gt; Export ...
-&gt; Web
-&gt; WAR file
-&gt; Web project: (選取要匯出的專案)
-&gt; Destination: (選擇要存的檔案及路徑)
-&gt; Optimize for a specific server runtime: (選擇自己用的 Server 也可以不選)
-&gt; Export source file (是否要包含程式碼)
-&gt; Override existing file (覆蓋既有檔案)
-&gt; Finish</pre>
<p>小蛙一開始沒有勾選 Export source file，造成把 WAR 專案解回來的時候發現裡面只有一堆 class 跟 jar，完全沒有半點原始檔 &#8230; 再包一次記得要把這個打勾，如果是要把專案佈署到 tomcat 上的話，就可以不用勾選這個選項。<br />
接著是匯入的步驟，在 Eclipse 上</p>
<pre>點選滑鼠右鍵
-&gt; Import
-&gt; Import ...
-&gt; Web
-&gt; WAR file
-&gt; WAR file: (選擇剛剛匯出的檔案)
-&gt; Web Project: (要匯入專案的名字)
-&gt; Target runtime: (Server 環境，可不設定) 
-&gt; Next
-&gt; WAR Import: (如果 WAR 專案裡面的只有用到別人的 library，這裡不要勾選)
-&gt; Finish</pre>
<p>上面的 WAR Import 小蛙第一次不太瞭解意思就勾選了，結果 Eclipse 中就多了一堆專案，Eclipse 把所有用到的 JAR，例如：ojdbc14.jar 也匯入成一個 ojdbc 專案。<br />
這邊還有一個地方要修改，小蛙也不知道為什麼匯回去的專案路徑跟原始匯出時的不同，從</p>
<pre>Project
-&gt; Properties
-&gt; Java Build Path
-&gt; Source
-&gt; Default output folder: MyProject/WebContent/WEB-INF/classes</pre>
<p>從 WAR 匯回的專案卻變成系統預設</p>
<pre>Default output folder: MyNewProject/build/classes</pre>
<p>這邊要把新專案設定回原本的路徑，否則可能會造成一些找不到 class 或是路徑錯誤的問題！</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/3117/%e5%b0%87%e5%b0%88%e6%a1%88%e5%8c%af%e5%87%ba%e5%8c%af%e5%85%a5-war-%e6%aa%94/" data-wpel-link="internal">將專案匯出 / 匯入 WAR 檔</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/3117/%e5%b0%87%e5%b0%88%e6%a1%88%e5%8c%af%e5%87%ba%e5%8c%af%e5%85%a5-war-%e6%aa%94/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Eclipse 停在 Android SDK Content Loader</title>
		<link>https://noter.tw/2950/eclipse-%e5%81%9c%e5%9c%a8-android-sdk-content-loader/</link>
					<comments>https://noter.tw/2950/eclipse-%e5%81%9c%e5%9c%a8-android-sdk-content-loader/#comments</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Thu, 25 Jul 2013 10:30:30 +0000</pubDate>
				<category><![CDATA[手機 App]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[Android SDK Content Loader]]></category>
		<category><![CDATA[當機]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Android]]></category>
		<guid isPermaLink="false">http://wazai.net/?p=2950</guid>

					<description><![CDATA[<p>(2014-08-28 更新) 使用 Eclipse 開發 Android 的時候發現，經常專案一多，整個啟動速度就會變得非常慢，尤其是有時候用到一半當掉，重新開啟之後莫名其妙跑出一堆問題來，今天下午&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2950/eclipse-%e5%81%9c%e5%9c%a8-android-sdk-content-loader/" data-wpel-link="internal">Eclipse 停在 Android SDK Content Loader</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>(2014-08-28 更新) 使用 Eclipse 開發 Android 的時候發現，經常專案一多，整個啟動速度就會變得非常慢，尤其是有時候用到一半當掉，重新開啟之後莫名其妙跑出一堆問題來，今天下午小蛙開啟 Eclipse 時就遇到一個 Android SDK Content Loader 的問題 &#8230;<br />
<span id="more-2950"></span><br />
上網查了一下發現有蠻多 Eclipse 使用者遇到這個問題，上一次正常啟動當掉的畫面在 DDMS，如果開啟之後停留在 DDMS 則沒有問題，一旦切換到 Java View 右下角的 Progress 就開始跑一堆東西，第一行就寫著 Android SDK Content Loader，等了很久卻一點動靜也沒有！一開始以為是因為電腦變得太慢了，導致 Eclipse 怪怪的，結果重開 Eclipse 無效，重開電腦也無效 &#8230; 都是一樣的情況。<br />
把 Android SDK Content Loader 當成關鍵字送上 Google 得到的結果如參考資料1，有一位 az9702 提供了以下方法：</p>
<blockquote><p>Source:&nbsp;<a href="https://groups.google.com/forum/#!topic/android-developers/3dkpk1sivD8" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external" class="wpel-icon-right">https://groups.google.com/forum/#!topic/android-developers/3dkpk1sivD8<span class="wpel-icon wpel-image wpel-icon-6"></span></a><br />
az9702:<br />
I ran into same problem after switching to the new SDK. When &nbsp;Eclipse<br />
starts, the Android SDK Content Loader is stuck (always at 60% in my<br />
IDE).<br />
Closing &amp; restarting Eclipse a few times sometimes helps but success<br />
is not guaranteed.<br />
The latest Android plugin 0.9 does not help solve this problem.<br />
The following workaround was tried last two days &amp; it works well so<br />
far:<br />
<span style="color: #ff0000;"><strong>* Turn off automatic build&nbsp;</strong></span><br />
<span style="color: #ff0000;"><strong>&nbsp; Projects -&gt; Build Automatically &nbsp; &nbsp;(turn this off)&nbsp;</strong></span><br />
This stops building workspace when Eclipse starts. The Loader still<br />
runs but it is no longer stuck in my case.<br />
<span style="color: #ff00ff;">* Turn off Clean options:&nbsp;</span><br />
<span style="color: #ff00ff;">&nbsp; Projects -&gt; Clean -&gt; Clean all projects &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8211; turn off&nbsp;</span><br />
<span style="color: #ff00ff;">&nbsp; Projects -&gt; Clean -&gt; Start a build immediately &nbsp; &nbsp;&#8211; turn off&nbsp;</span><br />
After Eclipse starts OK w/o getting stuck, optionally turn &nbsp;on<br />
&#8220;Projects -&gt; Build Automatically&#8221;.<br />
This rebuilds the workspace. &nbsp;In my case, &nbsp;workspace is rebuilt w/o<br />
further problem.</p></blockquote>
<p>只看紅色粗體重點的部份，把上方選單 <strong>Projects -&gt; Build Automatically</strong> 前面的勾勾去掉就可以了，小蛙試的時候取消 Build Automatically 還是一樣卡住，<strong><span style="color: #ff00ff;">這時候把 Eclipse 關掉重新啟動</span></strong>，再次進到 Eclipse 的時候就不會卡在 Android SDK Content Loader 這個問題上了，但是有可能會有一些 Project 出現 error，小蛙的做法是進到 <strong>Project -&gt; Clean -&gt; Clean all projects</strong> 把之前產生可能造成錯誤的東西清乾淨，接著再把 Projects -&gt; Build Automatically 勾回去，Eclipse 就奇蹟似復活囉！<br />
補充: Project -&gt; Clean -&gt; Clean all projects 絕對不要使用，不然會整個不斷出錯(當 project 越來越多的時候)，Start a build immediately 如果有勾選的話，也要選擇 Build only the selected projects，若選擇 Build the entire workspace 絕對會卡到死 &#8230;<br />
P.S. 有其他使用者提到可以開一個新的 workspace，如果上面的方法沒辦法解決這個問題，也只能這樣做了 &#8230;<br />
<strong>2014-06-13 更新<br />
</strong>今天又遇到 Android SDK Content Loader 一直停在 0% 的問題 &#8230; 照著上面的方法做也沒有用 &#8230; 再度 Google 找解法，於是在參考資料2中看到解法，其中先試過使用 eclipse -clean 的方式啟動，一樣無效，試了參考資料2的方法馬上就成功了。<br />
只要把&nbsp;.android 目錄清空就可以了，小蛙這邊遇到一個小插曲，不同 OS 的 .android 目錄在不同地方，例如：有的在&nbsp;C:\Documents and Settings\，小蛙 windows 8.1 則是在&nbsp;C:\Users\登入的帳號 下。這邊有個小插曲是要刪除時發生裡面有些檔案使用中而被鎖定，只要把沒被鎖定的刪一刪就可以了，要刪之前建議先備份一下喔！(這個方法重新啟動之後又會卡在相同的地方)<br />
目前只找到一個辦法，就是建立新的 workspaces，但相關的環境設定可能要重設 &#8230; 再次提醒相關的備份要做好！<br />
2014-08-28 更新<br />
今天發現只要刪掉上述資料夾中的 ddms.cfg 就可以了，還不清楚原因為何。<br />
<strong>參考資料：</strong></p>
<ol>
<li>Android SDK Content Loader gets stuck&#8230;. @ Google 網上論壇<br />
<address><a href="https://groups.google.com/forum/#!topic/android-developers/3dkpk1sivD8" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">https://groups.google.com/forum/#!topic/android-developers/3dkpk1sivD8<span class="wpel-icon wpel-image wpel-icon-6"></span></a></address>
</li>
<li>右下角android sdk content loader 加载很慢的解决方法 &#8230; @ eoe<br />
<a href="http://www.eoeandroid.com/thread-82743-1-1.html" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">http://www.eoeandroid.com/thread-82743-1-1.html<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li>
</ol>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2950/eclipse-%e5%81%9c%e5%9c%a8-android-sdk-content-loader/" data-wpel-link="internal">Eclipse 停在 Android SDK Content Loader</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/2950/eclipse-%e5%81%9c%e5%9c%a8-android-sdk-content-loader/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Eclipse SSH 匯入遠端專案(RSE: Remote System Explorer)</title>
		<link>https://noter.tw/2615/eclipse-ssh-%e5%8c%af%e5%85%a5%e9%81%a0%e7%ab%af%e5%b0%88%e6%a1%88rse-remote-system-explorer/</link>
					<comments>https://noter.tw/2615/eclipse-ssh-%e5%8c%af%e5%85%a5%e9%81%a0%e7%ab%af%e5%b0%88%e6%a1%88rse-remote-system-explorer/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Wed, 02 Jan 2013 06:38:08 +0000</pubDate>
				<category><![CDATA[一般程式]]></category>
		<category><![CDATA[click function]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Remote System Explorer]]></category>
		<category><![CDATA[RSE]]></category>
		<category><![CDATA[Target Management]]></category>
		<category><![CDATA[TM]]></category>
		<category><![CDATA[自動完成]]></category>
		<category><![CDATA[Eclipse]]></category>
		<guid isPermaLink="false">http://wazai.net/?p=2615</guid>

					<description><![CDATA[<p>搭配【在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例) @ 蛙齋】繼續把整個開發方式記錄下來。這篇文章記錄使用 Eclipse 搭配 Remote System E&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2615/eclipse-ssh-%e5%8c%af%e5%85%a5%e9%81%a0%e7%ab%af%e5%b0%88%e6%a1%88rse-remote-system-explorer/" data-wpel-link="internal">Eclipse SSH 匯入遠端專案(RSE: Remote System Explorer)</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>搭配<strong><a href="http://wazai.net/2539/%E5%9C%A8eclipse%E4%B8%8A%E9%96%8B%E7%99%BCphp%E7%A8%8B%E5%BC%8F%E4%BB%A5moodle%E3%80%81egit%E3%80%81pdt%E7%82%BA%E4%BE%8B" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">【在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例) @ 蛙齋】<span class="wpel-icon wpel-image wpel-icon-6"></span></a></strong>繼續把整個開發方式記錄下來。這篇文章記錄使用 Eclipse 搭配 <a href="http://www.eclipse.org/tm/" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">Remote System Explorer<span class="wpel-icon wpel-image wpel-icon-6"></span></a> 這個插件，讓 Eclipse 可以直接透過 SSH 或其他方式直接操作遠端專案。<br />
<span id="more-2615"></span></p>
<h1 style="text-align: center;"><strong>【安裝 Remote System Explorer 插件】</strong></h1>
<p>開啟 Eclipse 後，找到上方選單列的&nbsp;Help -&gt; Install New Software&#8230; -&gt; Work with:&nbsp;<span style="color: #ff0000;"><strong>Juno &#8211; http://download.eclipse.org/releases/juno</strong></span> (這邊要把 juno 換成自己的版本名稱) -&gt; 搜尋 <strong><span style="color: #ff0000;">remote</span></strong> -&gt; 勾選下載以下兩個插件</p>
<pre>Remote System Explorer End-User Runtime
Remote System Explorer User Actions</pre>
<p><a title="001.png" href="http://lh5.ggpht.com/-TI0gJ5YNWlU/UOOz-r7fS8I/AAAAAAAAFPU/nL2OPUyfcAE/w640/001.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="001.png" src="//lh5.ggpht.com/-TI0gJ5YNWlU/UOOz-r7fS8I/AAAAAAAAFPU/nL2OPUyfcAE/001.png" alt="001.png"></a></p>
<h1 style="text-align: center;"><strong>【設定 Remote System Explorer 插件】</strong></h1>
<p>安裝完成會要求重新啟動 Eclipse，接著點選右上角的 <span style="color: #ff0000;"><strong>Open Perspective</strong></span> (有一個 + 的)，選擇 <strong><span style="color: #ff0000;">Remote System Explorer</span></strong> 之後就可以看到右上角多了一個<span style="color: #ff0000;"><strong> Remote System Exploer 的快速切換按鈕</strong></span>了。<br />
<a title="002.png" href="http://lh4.ggpht.com/-RLk2uv9yd1I/UOOz-jVqY9I/AAAAAAAAFPQ/A2IVX6I_gJg/w640/002.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="002.png" src="//lh4.ggpht.com/-RLk2uv9yd1I/UOOz-jVqY9I/AAAAAAAAFPQ/A2IVX6I_gJg/002.png" alt="002.png"></a><br />
切換到 Remote System Explorer perspective 後，看到左邊 Remote Systems 視窗中有一個 Define a connection to remote system 的按鈕。<br />
<a title="003.png" href="http://lh4.ggpht.com/-HbsagzdpACg/UOOz-vsaWUI/AAAAAAAAFPY/jmXvI4QTSq0/w640/003.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="003.png" src="//lh4.ggpht.com/-HbsagzdpACg/UOOz-vsaWUI/AAAAAAAAFPY/jmXvI4QTSq0/003.png" alt="003.png"></a><br />
選擇 SSH Only，如果要用其他的協定也可以在這邊使用自己要用的協定。<br />
<a title="004.png" href="http://lh5.ggpht.com/-KVacMniRIy0/UOOz_XvMjoI/AAAAAAAAFPc/FWXdIVY55R0/w640/004.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="004.png" src="//lh5.ggpht.com/-KVacMniRIy0/UOOz_XvMjoI/AAAAAAAAFPc/FWXdIVY55R0/004.png" alt="004.png"></a><br />
輸入遠端主機相關資訊，Parent profile 系統會自動產生，Host name 輸入遠端位址，填寫完畢後按下 Finish。<br />
<a title="005.png" href="http://lh6.ggpht.com/-1HAAaA6UIKg/UOOz_qbwEgI/AAAAAAAAFPg/Q00NMKtmi3A/w640/005.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="005.png" src="//lh6.ggpht.com/-1HAAaA6UIKg/UOOz_qbwEgI/AAAAAAAAFPg/Q00NMKtmi3A/005.png" alt="005.png"></a><br />
在 Remote Systems 可以看到剛剛新增的 remote_moodle 資訊，點進遠端資料夾後會提示登入資訊，登入成功後就可以瀏覽遠端資料夾了。<br />
<a title="006.png" href="http://lh5.ggpht.com/-wH14S4EMviQ/UOOz_8TeXfI/AAAAAAAAFPk/qiEqPh-JDdM/w640/006.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="006.png" src="//lh5.ggpht.com/-wH14S4EMviQ/UOOz_8TeXfI/AAAAAAAAFPk/qiEqPh-JDdM/006.png" alt="006.png"></a></p>
<h1 style="text-align: center;"><strong>【讓 Remote System Explorer 插件支援 PHP】</strong></h1>
<p>Remote System Explorer 剛安裝完成的時候，開啟 PHP 檔案時，自動完成的功能會有問題，從<a href="http://www.patrickjwaters.com/blog/2011-07-24/how-setup-eclipse-php-pdt-remote-system-explorer-theme-manager-and-drupal-plugins/35" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">參考資料2<span class="wpel-icon wpel-image wpel-icon-6"></span></a>中發現解法(裡面也包含了很多更詳細的設定)，需要做一些設定檔的修改才可以正常使用，首先設定讓所有的檔案都不隱藏(設定檔是隱藏檔)，Eclipse -&gt; Window -&gt; Preferences。<br />
<a title="007.png" href="http://lh4.ggpht.com/-YC9G1Q70CZw/UOO0APk8BiI/AAAAAAAAFPs/Cm3tgM4kUOk/w640/007.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="007.png" src="//lh4.ggpht.com/-YC9G1Q70CZw/UOO0APk8BiI/AAAAAAAAFPs/Cm3tgM4kUOk/007.png" alt="007.png"></a><br />
找到 Remote Systems -&gt; Files -&gt; 把 Show hidden files 打勾 -&gt; OK。<br />
<a title="008.png" href="http://lh6.ggpht.com/-f8sX6SqkUVQ/UOO0AVTZDNI/AAAAAAAAFPw/bLJ8s_hgDLc/w640/008.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="008.png" src="//lh6.ggpht.com/-f8sX6SqkUVQ/UOO0AVTZDNI/AAAAAAAAFPw/bLJ8s_hgDLc/008.png" alt="008.png"></a><br />
找到 Eclipse 的 workspace 路徑，以 XP 為例，Eclipse 預設在 「<strong>C:\Documents and Settings\<span style="color: #0000ff;">User</span>\workspace</strong>」(User 換成自己登入用的那個)，找到<span style="color: #ff0000;"><strong> workspace 下 RemoteSystemsTempFiles 資料夾</strong></span>，裡面有個 <span style="color: #ff0000;"><strong>.project</strong> </span>檔案。<br />
<a title="009.png" href="http://lh6.ggpht.com/-VpGUQr1e_4M/UOO0AuaQc0I/AAAAAAAAFP8/H8rCFBVhhPo/w640/009.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="009.png" src="//lh6.ggpht.com/-VpGUQr1e_4M/UOO0AuaQc0I/AAAAAAAAFP8/H8rCFBVhhPo/009.png" alt="009.png"></a><br />
開啟後加入以下兩行(<a href="http://www.patrickjwaters.com/blog/2011-07-24/how-setup-eclipse-php-pdt-remote-system-explorer-theme-manager-and-drupal-plugins/35" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">參考資料2<span class="wpel-icon wpel-image wpel-icon-6"></span></a>)</p>
<pre>&lt;nature&gt;org.eclipse.wst.jsdt.core.jsNature&lt;/nature&gt;
&lt;nature&gt;org.eclipse.php.core.PHPNature&lt;/nature&gt;</pre>
<p><a title="010.png" href="http://lh3.ggpht.com/-UV2ltbQL_o4/UOO0A2k0eZI/AAAAAAAAFQE/372KJ0woJ-M/w640/010.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="010.png" src="//lh3.ggpht.com/-UV2ltbQL_o4/UOO0A2k0eZI/AAAAAAAAFQE/372KJ0woJ-M/010.png" alt="010.png"></a><br />
存檔後重新啟動 Eclipse，開啟 PHP 檔案試試看，自動完成的功能可以使用囉！<br />
<a title="011.png" href="http://lh5.ggpht.com/-VfNgHP_St7E/UOO0BGyF_CI/AAAAAAAAFQI/lGTZSHam0Vc/w640/011.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="011.png" src="//lh5.ggpht.com/-VfNgHP_St7E/UOO0BGyF_CI/AAAAAAAAFQI/lGTZSHam0Vc/011.png" alt="011.png"></a><br />
&nbsp;<br />
<del>補充：小蛙發現這邊頂多做到自動完成，但其實有一個最最重要的功能並沒有辦法達到，就是 ctrl + click 點選 function 或變數名稱的時候沒辦法直接跳到該 function 或變數所在位置，後來在<a href="http://www.patrickjwaters.com/blog/2011-07-24/how-setup-eclipse-php-pdt-remote-system-explorer-theme-manager-and-drupal-plugins/35" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">參考資料2<span class="wpel-icon wpel-image wpel-icon-6"></span></a>中的問答中找到答案，難怪小蛙昨天試的時候還可以，今天再試就不行了，因為把昨天測試的 project 砍掉了 &gt;&lt;，做法就是 import 一份遠端的檔案到 PHP perspective 中，這樣在 Remote System Explorer 就可以直接有上述功能了！</del><br />
補充：要讓 RSE 可以直接透過 click + function 就跳到 function 所在的檔案，主要是該檔案必須要開啟過，也就是說如果有用到 get_username(); 這個 function，而這個 function 存在在 fun_lib.php 的話，那麼在開啟過 fun_lib.php 後，custom function 的自動完成以及 click to function 的功能就會自動跑出來囉！試了好久才發現這件事情，為什麼&#8221;開啟過&#8221;就會自動 link 呢？原因在於開啟之後，會在&nbsp;RemoteSystemsTempFiles 下面放置下載下來的檔案(開啟的時候 Eclipse 就做下載動作了)，最後一個有趣的事情來了，小蛙在編輯 moodle 頁面的時候，裡面有一大堆一大堆看都沒看過的 function，自然也就不知道要去開啟哪些檔案來讓 Eclipse link，後來找到一個方法，在 Remote System Explorer &nbsp;perspective 下，在要編輯的資料夾上點選滑鼠右鍵 -&gt; Synchronize Cache，這樣就可以把該資料夾下的所有檔案先抓一份回來，剩下的就不說囉(這邊如果檔案數量很大的話，可以透過&nbsp;Monitor (或 Show in Table 都可以)，在要抓回來的資料夾上點選滑鼠右鍵 -&gt; Synchronize Cache 也可以喔！</p>
<h1 style="text-align: center;"><strong>【Remote System Explorer 將遠端專案匯入成本機專案(補充)】</strong></h1>
<p>Remote System Explorer 也可以直接匯入遠端 Project 到本機中，但是這樣在本機修改之後就<strong>要自己想辦法&#8221;放&#8221;回遠端</strong>，之前已經做過一些設定，也一併記錄在這邊。<br />
先切換到 PHP perspective。</p>
<p style="text-align: center;"><a title="007.png" href="http://lh5.ggpht.com/-nA7UZ0mH8rs/UOPSto3X4oI/AAAAAAAAFRM/8tNQ8glBI7M/w640/007.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="alignnone" title="007.png" src="//lh5.ggpht.com/-nA7UZ0mH8rs/UOPSto3X4oI/AAAAAAAAFRM/8tNQ8glBI7M/007.png" alt="007.png"></a></p>
<p>新增一個 Project。<br />
<a title="008.png" href="http://lh4.ggpht.com/-Zmk3KbvG1B8/UOPStspeUvI/AAAAAAAAFRI/DmuG-AbnJ9c/w640/008.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="008.png" src="//lh4.ggpht.com/-Zmk3KbvG1B8/UOPStspeUvI/AAAAAAAAFRI/DmuG-AbnJ9c/008.png" alt="008.png"></a><br />
選擇 General -&gt; Project (一般專案)<br />
<a title="009.png" href="http://lh4.ggpht.com/-fHATYvE0xXg/UOPStt5OEPI/AAAAAAAAFRQ/CO17aDAXYnk/w640/009.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="009.png" src="//lh4.ggpht.com/-fHATYvE0xXg/UOPStt5OEPI/AAAAAAAAFRQ/CO17aDAXYnk/009.png" alt="009.png"></a><br />
輸入專案名稱後點選 Finish。<br />
<a title="010.png" href="http://lh3.ggpht.com/-iRgZyA4cs_E/UOPSuMxbPMI/AAAAAAAAFRU/OPz0tInfDVg/w640/010.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="010.png" src="//lh3.ggpht.com/-iRgZyA4cs_E/UOPSuMxbPMI/AAAAAAAAFRU/OPz0tInfDVg/010.png" alt="010.png"></a><br />
切換到 Remote System Explorer perspective 在要匯入的專案上點選滑鼠右鍵，選擇<span style="color: #ff0000;"><strong> Import To Project</strong></span>。<br />
<a title="011.png" href="http://lh5.ggpht.com/-EBPoI2ghVys/UOPSuuSHK_I/AAAAAAAAFRY/mpm6bfErazw/w640/011.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="011.png" src="//lh5.ggpht.com/-EBPoI2ghVys/UOPSuuSHK_I/AAAAAAAAFRY/mpm6bfErazw/011.png" alt="011.png"></a><br />
這邊卡了非常非常久，因為小蛙要匯入的專案很大，到這個頁面的時候，一直出現 <span style="color: #ff0000;"><strong>Enter or select a source folder.</strong> </span>的錯誤，導致 Finish 無法成功按下，後來才發現右下角有一個 Querying All 的進度條在跑，大一點的專案甚至可能要等超過十分鐘，Into folder: 這邊選擇要匯入的專案中(這邊例子是剛剛建立的 test)。<br />
<a title="012.png" href="http://lh4.ggpht.com/-P4ekAqGPzXA/UOPSumFejuI/AAAAAAAAFRc/I1NTOriNTnc/w640/012.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="012.png" src="//lh4.ggpht.com/-P4ekAqGPzXA/UOPSumFejuI/AAAAAAAAFRc/I1NTOriNTnc/012.png" alt="012.png"></a><br />
完成後切回 PHP perspective，就可以看到剛剛匯入的專案在這邊了(因為要抓太久，小蛙拿之前抓好的圖來替代)，在專案上點選滑鼠右鍵 -&gt; Configure -&gt; Add PHP Support &#8230; 讓專案變成 PHP 專案，大功告成！<br />
<a title="013.png" href="http://lh3.ggpht.com/-wDJDShcxgJs/UOPSvMFjtjI/AAAAAAAAFRo/6oRnNLOauYo/w640/013.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="013.png" src="//lh3.ggpht.com/-wDJDShcxgJs/UOPSvMFjtjI/AAAAAAAAFRo/6oRnNLOauYo/013.png" alt="013.png"></a><br />
<strong>參考資料：</strong></p>
<ol>
<li>在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例) @ 蛙齋<br />
<address><a href="http://wazai.net/2539/%E5%9C%A8eclipse%E4%B8%8A%E9%96%8B%E7%99%BCphp%E7%A8%8B%E5%BC%8F%E4%BB%A5moodle%E3%80%81egit%E3%80%81pdt%E7%82%BA%E4%BE%8B" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">http://wazai.net/2539/%E5%9C%A8eclipse%E4%B8%8A%E9%96%8B%E7%99%BCphp%E7%A8%8B%E5%BC%8F%E4%BB%A5moodle%E3%80%81egit%E3%80%81pdt%E7%82%BA%E4%BE%8B<span class="wpel-icon wpel-image wpel-icon-6"></span></a></address>
</li>
<li>How to setup Eclipse with PHP PDT, Remote System Explorer, Theme Manager, and Drupal Plugins @ Patrick J Waters<br />
<address><a href="http://www.patrickjwaters.com/blog/2011-07-24/how-setup-eclipse-php-pdt-remote-system-explorer-theme-manager-and-drupal-plugins/35" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">http://www.patrickjwaters.com/blog/2011-07-24/how-setup-eclipse-php-pdt-remote-system-explorer-theme-manager-and-drupal-plugins/35<span class="wpel-icon wpel-image wpel-icon-6"></span></a></address>
</li>
<li>Code Completion not working with remote file (with RSE) @ stackoverflow<br />
<address><a href="http://stackoverflow.com/questions/5896909/code-completion-not-working-with-remote-file-with-rse" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">http://stackoverflow.com/questions/5896909/code-completion-not-working-with-remote-file-with-rse<span class="wpel-icon wpel-image wpel-icon-6"></span></a></address>
</li>
</ol>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2615/eclipse-ssh-%e5%8c%af%e5%85%a5%e9%81%a0%e7%ab%af%e5%b0%88%e6%a1%88rse-remote-system-explorer/" data-wpel-link="internal">Eclipse SSH 匯入遠端專案(RSE: Remote System Explorer)</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/2615/eclipse-ssh-%e5%8c%af%e5%85%a5%e9%81%a0%e7%ab%af%e5%b0%88%e6%a1%88rse-remote-system-explorer/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)</title>
		<link>https://noter.tw/2539/%e5%9c%a8eclipse%e4%b8%8a%e9%96%8b%e7%99%bcphp%e7%a8%8b%e5%bc%8f%e4%bb%a5moodle%e3%80%81egit%e3%80%81pdt%e7%82%ba%e4%be%8b/</link>
					<comments>https://noter.tw/2539/%e5%9c%a8eclipse%e4%b8%8a%e9%96%8b%e7%99%bcphp%e7%a8%8b%e5%bc%8f%e4%bb%a5moodle%e3%80%81egit%e3%80%81pdt%e7%82%ba%e4%be%8b/#comments</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Wed, 19 Dec 2012 09:24:56 +0000</pubDate>
				<category><![CDATA[網頁後端]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[EGit]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[PDT]]></category>
		<guid isPermaLink="false">http://wazai.net/?p=2539</guid>

					<description><![CDATA[<p>最近受命必須要研究 moodle，並且希望可以用 Eclipse 這種比較聰明的 IDE 來開發，而 moodle 本身是 PHP 寫的，之前只有使用 Eclipse 開發過 Java，這篇文章只是簡&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2539/%e5%9c%a8eclipse%e4%b8%8a%e9%96%8b%e7%99%bcphp%e7%a8%8b%e5%bc%8f%e4%bb%a5moodle%e3%80%81egit%e3%80%81pdt%e7%82%ba%e4%be%8b/" data-wpel-link="internal">在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>最近受命必須要研究 moodle，並且希望可以用 Eclipse 這種比較聰明的 IDE 來開發，而 moodle 本身是 PHP 寫的，之前只有使用 Eclipse 開發過 Java，這篇文章只是簡單記錄怎麼讓 Eclipse 可以開發 PHP 程式，並且透過 EGit 將遠端 moodle 原始碼 clone 回來！<br />
<span id="more-2539"></span></p>
<ul>
<li>
<h1><strong style="color: #000000;">環境</strong></h1>
</li>
</ul>
<p>先到 <a href="http://java.com" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">http://java.com<span class="wpel-icon wpel-image wpel-icon-6"></span></a> 下載新版的 Java 執行環境。Eclipse 非常大，不論是檔案大小或是所需要的記憶體，記憶體建議 1GB 以上。</p>
<ul>
<li>
<h1><strong>安裝Eclipse</strong></h1>
</li>
</ul>
<p>到 Eclipse 官網 (<a href="http://www.eclipse.org/downloads/" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">http://www.eclipse.org/downloads/<span class="wpel-icon wpel-image wpel-icon-6"></span></a>) 根據自己的環境選擇對應的 Eclipse (Windows, Linux, Mac, 64bit, 32bit)，下載列表會看到很多例如：Java EE, Java, C/C++ &#8230; 等，這邊只要下載&nbsp;<span style="color: #ff0000;"><strong>Eclipse Classic</strong></span> 版本即可。<br />
下載回來後的檔案是一個壓縮檔(看環境)，解壓縮後執行 Eclipse.exe，視情況在桌面建立捷徑。</p>
<ul>
<li>
<h1><strong>第一次啟動</strong></h1>
</li>
</ul>
<p>第一次啟動會要求提供工作空間(workspace)，這邊直接使用每個不同系統的預設環境就好。</p>
<ul>
<li>
<h1><strong>安裝必須的插件(Plugins)</strong></h1>
</li>
</ul>
<p>如果一開始下載的就是 Eclipse for PHP Developers 的版本，可以直接跳過此步驟。<br />
這邊每個版本的情況會不同，<span style="color: #0000ff;">參考資料1的部分無法完成</span>，<span style="color: #ff0000;">因此這邊採用參考資料2</span>。</p>
<p style="text-align: center;"><a href="https://lh4.googleusercontent.com/-J7bsNAr6_d0/UNEwxXjh5VI/AAAAAAAAEz0/Oid-GsANgug/s800/001.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img fetchpriority="high" decoding="async" title="Eclipse01" src="https://lh4.googleusercontent.com/-J7bsNAr6_d0/UNEwxXjh5VI/AAAAAAAAEz0/Oid-GsANgug/s800/001.png" alt="001 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="273" height="252"></a>&nbsp; &nbsp;&nbsp;<a href="https://lh5.googleusercontent.com/-Fl6hYb1J-1I/UNEwxfEWbLI/AAAAAAAAEz4/EWzl5fH5l3w/s800/002.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="alignnone" title="Eclipse02" src="https://lh5.googleusercontent.com/-Fl6hYb1J-1I/UNEwxfEWbLI/AAAAAAAAEz4/EWzl5fH5l3w/s800/002.png" alt="002 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="283" height="473"></a></p>
<p>從上方選單「<strong>Help</strong>」-&gt;「<strong>Install New Software&#8230;</strong>」-&gt;「<strong>Work with: Juno &#8211; http://download.eclipse.org/releases/juno (註1)</strong>」-&gt; 最下面找到「<span style="color: #ff0000;"><strong>Web, XML, Java EE and OSGi Enterprise Development</strong></span>」<br />
<a href="https://lh5.googleusercontent.com/-ErrbyQNC14c/UNEwxeD-hcI/AAAAAAAAEzw/Muaf3M9fI9g/s800/003.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse03" src="https://lh5.googleusercontent.com/-ErrbyQNC14c/UNEwxeD-hcI/AAAAAAAAEzw/Muaf3M9fI9g/s800/003.png" alt="003 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="364" height="306"></a><br />
-&gt; 勾選</p>
<pre>Eclipse Web Developer Tools
JavaScript Development Tools
PHP Development Tools (PDT) SDK Feature</pre>
<p>-&gt; 「<strong>Next &gt;</strong>」-&gt; 「<strong>Next &gt;</strong>」-&gt; 「<strong>I accept the terms of the license agreements</strong>」-&gt; 「<strong>Finish</strong>」-&gt; 完成後會重新啟動 Eclipse<br />
註1. &nbsp;juno 是 Eclipse 的版本名稱，不同版本下載回來後會有相對應的更新網址，這邊只要選 Eclipse 附帶的更新網址即可。</p>
<ul>
<li>
<h1><strong>設定 Moodle 偏好值</strong></h1>
</li>
</ul>
<p>參考資料1裡面的設定有些找不到，有些似乎沒那麼重要，就用著用著再慢慢去看要設定些什麼。</p>
<ul>
<li>
<h1><strong>安裝 EGit</strong></h1>
</li>
</ul>
<p>使用 Git 是為了讓往後版本控管比較容易一些，下載 Eclipse 的 EGit 插件。一樣到上方選單「<strong>Help</strong>」-&gt;「<strong>Install New Software&#8230;</strong>」-&gt;「<strong>Work with: Juno &#8211; http://download.eclipse.org/releases/juno</strong>」-&gt; 輸入「<span style="color: #ff0000;"><strong>git</strong></span>」<br />
<a href="https://lh6.googleusercontent.com/-yfIPUZkkWZc/UNEwyDpk4oI/AAAAAAAAEz8/C50lKxTVp8o/s800/004.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse04" src="https://lh6.googleusercontent.com/-yfIPUZkkWZc/UNEwyDpk4oI/AAAAAAAAEz8/C50lKxTVp8o/s800/004.png" alt="004 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="330" height="496"></a><br />
選擇 <span style="color: #ff0000;"><strong>Eclipse EGit</strong></span> 及 <span style="color: #ff0000;"><strong>Eclipse JGit</strong></span>，接著下一步直到完成安裝，完成安裝後系統會要求重新啟動 Eclipse。</p>
<ul>
<li>
<h1><strong>使用 EGit clone 原始碼</strong></h1>
</li>
</ul>
<p>這邊卡了一段時間，一直卡在到底是先 import project，還是先 Import Project From Git，而 Import Project From Git 後，又不允許讓他變成專案(會變成 FileSystem，而無法在 Eclipse 中使用)，後來發現原來 EGit 有自己的 Perspective，包含了平常 Git 的常用功能(參考資料3)，有用 Eclipse 開發過的話對這應該不陌生，像是 JavaEE, DDMS, JavaSE &#8230; 等等，只要切換到該 Perspective 裡面有就一些常用的 View 的組合。<br />
在 Eclipse 右上角找到一個 <span style="color: #ff0000;"><strong>Open Perspective</strong></span> 的圖案(看起來像一個視窗跟一個+符號，如下圖)，選擇 Open Perspective 視窗中的 <span style="color: #ff0000;"><strong>Git Repository Exploring</strong></span>。<br />
<a href="https://lh6.googleusercontent.com/-HRrxluEMKwE/UNF6J5XJwyI/AAAAAAAAE0o/c-rQJD9dLp4/s800/005.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse05" src="https://lh6.googleusercontent.com/-HRrxluEMKwE/UNF6J5XJwyI/AAAAAAAAE0o/c-rQJD9dLp4/s800/005.png" alt="005 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="359" height="342"></a><br />
在開啟的 <strong>Git Repository Exploring Perspective</strong> 中，左邊的<strong> Git Repositories</strong> 視窗中可以看到以下畫面， 選擇<span style="color: #ff0000;"><strong> Clone a Git repository</strong> </span>來匯入遠端已經存在的 repository。<br />
<a href="https://lh3.googleusercontent.com/-GJ0fCzqbjB8/UNF6J1AShKI/AAAAAAAAE0g/o_oIzQCtgOY/s800/006.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse06" src="https://lh3.googleusercontent.com/-GJ0fCzqbjB8/UNF6J1AShKI/AAAAAAAAE0g/o_oIzQCtgOY/s800/006.png" alt="006 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="321" height="144"></a><br />
接著輸入遠端 repository 的連線資訊。直接填寫 URI 以外的欄位，URI 欄位會根據填寫的內容自動產生。<br />
<a href="https://lh5.googleusercontent.com/-3bwzxPEtskM/UNF6J4YQCuI/AAAAAAAAE0k/XFD-Jz8w0HA/s800/007.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse07" src="https://lh5.googleusercontent.com/-3bwzxPEtskM/UNF6J4YQCuI/AAAAAAAAE0k/XFD-Jz8w0HA/s800/007.png" alt="007 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="473" height="445"></a><br />
選擇要匯入的 Branch。<br />
<a href="https://lh3.googleusercontent.com/-3xW2lQGjwFo/UNF6Kh1rLxI/AAAAAAAAE0s/AaonHR9iZSI/s800/008.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse08" src="https://lh3.googleusercontent.com/-3xW2lQGjwFo/UNF6Kh1rLxI/AAAAAAAAE0s/AaonHR9iZSI/s800/008.png" alt="008 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="473" height="445"></a><br />
選擇要存放的路徑。<br />
<a href="https://lh4.googleusercontent.com/-fZmRyUmBrXc/UNF6K7q7MDI/AAAAAAAAE00/FFi-bJLGD54/s800/009.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse09" src="https://lh4.googleusercontent.com/-fZmRyUmBrXc/UNF6K7q7MDI/AAAAAAAAE00/FFi-bJLGD54/s800/009.png" alt="009 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="473" height="445"></a><br />
開始下載 repository 的檔案。<br />
<a href="https://lh6.googleusercontent.com/-hAekrRZExec/UNF6K4BBnLI/AAAAAAAAE0w/MVVt8565g1I/s800/010.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse10" src="https://lh6.googleusercontent.com/-hAekrRZExec/UNF6K4BBnLI/AAAAAAAAE0w/MVVt8565g1I/s800/010.png" alt="010 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="419" height="277"></a><br />
完成後在 Git Repositories 視窗中可以看到所有 Git Repository 的資訊及檔案。<br />
<a href="https://lh3.googleusercontent.com/-NBcChZs-s-I/UNF8GyfqDGI/AAAAAAAAE1o/UaVncTtiagA/s800/011.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse011" src="https://lh3.googleusercontent.com/-NBcChZs-s-I/UNF8GyfqDGI/AAAAAAAAE1o/UaVncTtiagA/s800/011.png" alt="011 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="640" height="451"></a></p>
<ul>
<li>
<h1><strong>將 Git Repository 中的檔案匯入成 Project</strong></h1>
</li>
</ul>
<p>在這邊其實卡了很久，因為當時沒發現有 Git Repository Exploring Perspective，造成例如檔案會重複存在，無法 commit，無法匯入，提示目錄已存在等等的錯誤。Git Repository Exploring Perspective 也讓這些事情變得很簡單。首先在 Git Repositories 視窗中剛剛新增的 repository 點選滑鼠右鍵，選擇 <span style="color: #ff0000;"><strong>Import Projects &#8230;</strong></span><br />
<a href="https://lh4.googleusercontent.com/-yznECg9iSLQ/UNF8G-Cv9TI/AAAAAAAAE1k/oYYLL7hMhvM/s800/012.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse012" src="https://lh4.googleusercontent.com/-yznECg9iSLQ/UNF8G-Cv9TI/AAAAAAAAE1k/oYYLL7hMhvM/s800/012.png" alt="012 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="357" height="439"></a><br />
選擇最下面的 <span style="color: #ff0000;"><strong>Import as general project</strong></span>。<br />
<a href="https://lh4.googleusercontent.com/-KGm0ZKaorxA/UNF8G5zP94I/AAAAAAAAE1g/M336FD872aw/s800/013.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse013" src="https://lh4.googleusercontent.com/-KGm0ZKaorxA/UNF8G5zP94I/AAAAAAAAE1g/M336FD872aw/s800/013.png" alt="013 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="420" height="418"></a><br />
做最後確認。<br />
<a href="https://lh5.googleusercontent.com/-eAsBfZAhgco/UNF8HVsKcRI/AAAAAAAAE1w/-AHbnwfF6g4/s800/014.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse015" src="https://lh5.googleusercontent.com/-eAsBfZAhgco/UNF8HVsKcRI/AAAAAAAAE1w/-AHbnwfF6g4/s800/014.png" alt="014 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="420" height="418"></a><br />
完成後，到右上角的 Perspective 切換到 <span style="color: #ff0000;"><strong>PHP</strong></span>。<br />
<a href="https://lh4.googleusercontent.com/-wvEnQMeB3p8/UNF8HhRcXVI/AAAAAAAAE1s/iisozDUpch8/s800/015.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse016" src="https://lh4.googleusercontent.com/-wvEnQMeB3p8/UNF8HhRcXVI/AAAAAAAAE1s/iisozDUpch8/s800/015.png" alt="015 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="245" height="47"></a><br />
PHP Explorer 視窗中看到剛剛匯入的專案，每個檔案及資料夾右下方有一個黃黃的東西。<br />
<a href="https://lh4.googleusercontent.com/-T6Gubz3g3f4/UNF8Hg0klsI/AAAAAAAAE2I/M1GaESLNgO0/s800/016.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse016" src="https://lh4.googleusercontent.com/-T6Gubz3g3f4/UNF8Hg0klsI/AAAAAAAAE2I/M1GaESLNgO0/s800/016.png" alt="016 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="178" height="527"></a><br />
因為剛剛從 Git Repository 轉換成 general project(一般專案)，現在要把這整個專案轉換成 PHP 專案。在專案上點選<strong>滑鼠右鍵</strong> -&gt;<strong> Configure </strong>-&gt; <span style="color: #ff0000;"><strong>Add PHP Support &#8230;</strong></span><br />
<a href="https://lh4.googleusercontent.com/-apPfIpZiEl8/UNF8IAGO6OI/AAAAAAAAE2A/cbI-XbQr6zw/s800/017.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse017" src="https://lh4.googleusercontent.com/-apPfIpZiEl8/UNF8IAGO6OI/AAAAAAAAE2A/cbI-XbQr6zw/s800/017.png" alt="017 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="421" height="466"></a><br />
可以看到專案最下面已經加入了 PHP Libraries，到這邊基本的 Eclipse 開發 PHP 程式已經大功告成。<br />
<a href="https://lh3.googleusercontent.com/-XqSG2lwmrBk/UNF8ITn8iEI/AAAAAAAAE2E/nDPXkw8QD28/s800/018.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse018" src="https://lh3.googleusercontent.com/-XqSG2lwmrBk/UNF8ITn8iEI/AAAAAAAAE2E/nDPXkw8QD28/s800/018.png" alt="018 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="180" height="276"></a><br />
大費周章的用 Eclipse 開發的原因在於有時候變數或是 function 分散在一堆不同的檔案中，不僅除錯容易，在 trace 程式碼或是開發速度上都會有很明顯的幫助。例如：<br />
點選 ctrl 後指向 function name 或變數，就會直接開啟該 function 或該變數所在的檔案。<br />
<a href="https://lh4.googleusercontent.com/-2RJMbQ6XZdc/UNF8nbsxnVI/AAAAAAAAE2g/24g4RBfot-s/s800/019.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse19" src="https://lh4.googleusercontent.com/-2RJMbQ6XZdc/UNF8nbsxnVI/AAAAAAAAE2g/24g4RBfot-s/s800/019.png" alt="019 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="631" height="151"></a><br />
function 名稱或變數也有自動補齊的功能(<del>懶人專用</del>)。<br />
<a href="https://lh6.googleusercontent.com/--KqeK64kJk8/UNF8nYcDM3I/AAAAAAAAE2k/H_MQd-L0aok/s800/020.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse020" src="https://lh6.googleusercontent.com/--KqeK64kJk8/UNF8nYcDM3I/AAAAAAAAE2k/H_MQd-L0aok/s800/020.png" alt="020 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="575" height="295"></a><br />
游標停留在 function 或變數上不動，會出現該變數或 function 說明。<br />
<a href="https://lh5.googleusercontent.com/-ZAwSrhgIMSQ/UNGES8icd0I/AAAAAAAAE3A/rZ_JB3co3cw/s800/021.png" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external"><img decoding="async" class="aligncenter" title="Eclipse022" src="https://lh5.googleusercontent.com/-ZAwSrhgIMSQ/UNGES8icd0I/AAAAAAAAE3A/rZ_JB3co3cw/s800/021.png" alt="021 在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)" width="800" height="237"></a><br />
至於其他 Git 操作，之後有需要再補上！<br />
<strong>參考資料：</strong></p>
<ol>
<li>Setting up Eclipse&nbsp;@ Moodle<br />
<address><a href="http://docs.moodle.org/dev/Setting_up_Eclipse" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">http://docs.moodle.org/dev/Setting_up_Eclipse<span class="wpel-icon wpel-image wpel-icon-6"></span></a></address>
</li>
<li>Eclipse – 打造一個可以帶著走的 PHP IDE @ 莫希爾(Mosil)手札<br />
<address><a href="http://blog.mosil.biz/2012/07/eclipse-protable-ide-for-php/" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">http://blog.mosil.biz/2012/07/eclipse-protable-ide-for-php/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></address>
</li>
<li>How to import a GIT non-Eclipse Java project into Eclipse? @ stackoverflow<br />
<address><a href="http://stackoverflow.com/questions/8070017/how-to-import-a-git-non-eclipse-java-project-into-eclipse" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">http://blog.mosil.biz/2012/07/eclipse-protable-ide-for-php/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></address>
</li>
</ol>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2539/%e5%9c%a8eclipse%e4%b8%8a%e9%96%8b%e7%99%bcphp%e7%a8%8b%e5%bc%8f%e4%bb%a5moodle%e3%80%81egit%e3%80%81pdt%e7%82%ba%e4%be%8b/" data-wpel-link="internal">在 Eclipse 上開發 PHP 程式(以 Moodle、EGit、PDT 為例)</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/2539/%e5%9c%a8eclipse%e4%b8%8a%e9%96%8b%e7%99%bcphp%e7%a8%8b%e5%bc%8f%e4%bb%a5moodle%e3%80%81egit%e3%80%81pdt%e7%82%ba%e4%be%8b/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>java/lang/NoClassDefFoundError: java/lang/Object</title>
		<link>https://noter.tw/2283/javalangnoclassdeffounderror-javalangobject/</link>
					<comments>https://noter.tw/2283/javalangnoclassdeffounderror-javalangobject/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Fri, 07 Sep 2012 09:45:40 +0000</pubDate>
				<category><![CDATA[一般程式]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[NoClassDefFoundError]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[Java]]></category>
		<guid isPermaLink="false">http://wazai.net/?p=2283</guid>

					<description><![CDATA[<p>今天小蛙要使用 Eclipse 的時候發現開啟的時候，馬上就又瞬間關閉，連個錯誤訊息都沒有看到，有錯誤訊息大概還能看一下問題出在哪，最怕這種完全沒有任何訊息的問題 &#8230; 花了五分鐘 Goog&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2283/javalangnoclassdeffounderror-javalangobject/" data-wpel-link="internal">java/lang/NoClassDefFoundError: java/lang/Object</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>今天小蛙要使用 Eclipse 的時候發現開啟的時候，馬上就又瞬間關閉，連個錯誤訊息都沒有看到，有錯誤訊息大概還能看一下問題出在哪，最怕這種完全沒有任何訊息的問題 &#8230; 花了五分鐘 Google 搞定，這邊記錄一下，免得下次又發生這種情況。<br />
<span id="more-2283"></span><br />
這裡小蛙只簡單的讓 Eclipse 可以正常使用，並沒有完全解決這個問題，如果您的 Eclipse 或其他需要用到 jre 的東西無法開啟的時候，可以試試看以下方法。簡單描述一下小蛙遇到的問題，昨天 Eclipse 還好好的正常執行，到了今天卻怎麼也打不開，期間印象中沒有安裝東西(除了 flash 更新)，不知怎麼的就突然無法使用了，點了 Eclipse 圖示後閃了一下就快速關閉，沒有任何錯誤訊息，Eclipse 下也沒有看到錯誤記錄 &#8230;<br />
這時候只好上 Google 查查看有沒有解決方法，網路上大部分看到的問題都是會跳出 alert 視窗並且告訴開發者有錯誤，跟這次小蛙遇到的情況不太一樣，最後找到這篇文章 <a href="http://topic.csdn.net/u/20090720/23/7e75dd4a-7a54-4840-972d-11b1bc6c538f.html" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">http://topic.csdn.net/u/20090720/23/7e75dd4a-7a54-4840-972d-11b1bc6c538f.html<span class="wpel-icon wpel-image wpel-icon-6"></span></a>&nbsp;跟小蛙的情況是一樣的，該文章的留言中有其他開發者提到</p>
<blockquote><p>第一：机器配置不够，或暂时系统进程异常。我以前碰到过，重启后就OK<br />
第二：jdk配置有问题。</p></blockquote>
<p>第一點小蛙已經重開過了(傳說中遇到無法解決的問題就先重開看看，有時候會莫名其妙就好了)，但還是沒有好轉，第二個方法小蛙覺得設定完全沒有改過，怎麼會是JDK配置問題呢？往下看後有人提到</p>
<blockquote><p>打开个CMD，输入java　后回车，看有没有jDK的信息，找不到这个命令的话，就是你的JDK没有设置path</p></blockquote>
<p>照著做之後果然發現錯誤訊息，真是太令人感動了！</p>
<blockquote><p>Error occurred during initialization of VM<br />
java/lang/NoClassDefFoundError: java/lang/Object</p></blockquote>
<p>在不花費太多時間的情況下(初步猜測是某個 jre 版本爛掉了)，開啟 jdk 安裝路徑發現竟然有好幾個 jre，偷雞快速解決方式 &#8230; 直接把路徑設定成另一個 jre 看看，果然成功，等工作完成後有時間再來看看原本的 jre 到底出了什麼問題吧！(網路上查到重新安裝 jdk, jre 可以解決問題，暫時先頂著用囉！)</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/2283/javalangnoclassdeffounderror-javalangobject/" data-wpel-link="internal">java/lang/NoClassDefFoundError: java/lang/Object</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/2283/javalangnoclassdeffounderror-javalangobject/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
