<?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>jar to exe &#8211; 記下來</title>
	<atom:link href="https://noter.tw/tag/jar-to-exe/feed/" rel="self" type="application/rss+xml" />
	<link>https://noter.tw</link>
	<description>一路上踩到的坑、遇到的問題，一點一滴記下來，希望能幫助到需要的人~</description>
	<lastBuildDate>Fri, 11 Mar 2022 06:11:17 +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>jar to exe &#8211; 記下來</title>
	<link>https://noter.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>SWT Class -&#062; JAR -&#062; EXE</title>
		<link>https://noter.tw/1255/swt-class-jar-exe/</link>
					<comments>https://noter.tw/1255/swt-class-jar-exe/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Sat, 03 Dec 2011 23:35:42 +0000</pubDate>
				<category><![CDATA[一般程式]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[fatjar]]></category>
		<category><![CDATA[jar to exe]]></category>
		<category><![CDATA[jar2exe]]></category>
		<category><![CDATA[SWT]]></category>
		<category><![CDATA[Eclipse]]></category>
		<guid isPermaLink="false">http://69.163.37.35/?p=1255</guid>

					<description><![CDATA[<p>讓 SWT Class 封裝出來的 JAR 檔可以直接滑鼠擊點兩下就執行，試了好久，終於 … 這篇文章記錄讓 SWT Class 封裝成可以直接點兩下就執行的 JAR file (eclipse fa&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/1255/swt-class-jar-exe/" data-wpel-link="internal">SWT Class -&#062; JAR -&#062; EXE</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p>讓 SWT Class 封裝出來的 JAR 檔可以直接滑鼠擊點兩下就執行，試了好久，終於 … 這篇文章記錄讓 SWT Class 封裝成可以直接點兩下就執行的 JAR file (eclipse fat-jar plug-in)，並且把它轉成 EXE file (JSmooth)。<br />
<span id="more-1255"></span></p>
<h2>● 安裝 eclipse fat-jar 外掛</h2>
<p style="padding-left: 30px;">1. 下載 fat-jar plug-in。<a href="http://fjep.sourceforge.net/" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">下載頁面<span class="wpel-icon wpel-image wpel-icon-6"></span></a>。</p>
<p style="padding-left: 30px;">2. 解壓縮下載回來的檔案，得到 net.sf.fjep.fatjar_0.0.31.jar，把這個檔案附置到 eclipse 安裝目錄下的 plugins 目錄裡。</p>
<p style="padding-left: 30px;">3. 開啟 eclipse，在專案上按滑鼠右鍵，出現 Build Fat Jar 表示安裝完成。<br />
<a href="https://noter.tw/wp-content/uploads/2011/12/fatjar1.png" target="_blank" rel="noopener noreferrer" data-wpel-link="internal"><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-1309" title="fatjar1" src="https://noter.tw/wp-content/uploads/2011/12/fatjar1.png" alt="fatjar1 SWT Class -&#062; JAR -&#062; EXE" width="330" height="682"></a></p>
<h2>● <strong>用 fat-jar 產生 JAR file</strong></h2>
<ol>
<li>要產生可以直接執行的 JAR file，必須要一併封裝比較新版本的 swt，這邊我們使用 3.4 final release 版本，3.4 把一些必須的 dll 檔都包含在 jar file 裡面。<a href="http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.4-200806172000/swt-3.4-win32-win32-x86.zip" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">下載頁面<span class="wpel-icon wpel-image wpel-icon-6"></span></a>。</li>
<li>下載完後，隨便解壓縮到一個資料夾就可以了。接著在專案上點選滑鼠右鍵，選擇新增外部保存檔。<br />
<a href="https://noter.tw/wp-content/uploads/2011/12/fatjar3.png" target="_blank" rel="noopener noreferrer" data-wpel-link="internal"><img decoding="async" class="alignnone size-full wp-image-1310" title="fatjar3" src="https://noter.tw/wp-content/uploads/2011/12/fatjar3.png" alt="fatjar3 SWT Class -&#062; JAR -&#062; EXE" width="444" height="563"></a></li>
<li>選擇剛剛解壓縮完的資料夾，裡面有個 swt.jar，按下開啟舊檔。<br />
<a href="https://noter.tw/wp-content/uploads/2011/12/fatjar4.png" target="_blank" rel="noopener noreferrer" data-wpel-link="internal"><img decoding="async" class="alignnone size-full wp-image-1311" title="fatjar4" src="https://noter.tw/wp-content/uploads/2011/12/fatjar4.png" alt="fatjar4 SWT Class -&#062; JAR -&#062; EXE" width="445" height="350"></a></li>
<li>在 eclipse 左側看到已經引入外部套件。<br />
<a href="https://noter.tw/wp-content/uploads/2011/12/fatjar5.png" target="_blank" rel="noopener noreferrer" data-wpel-link="internal"><img decoding="async" class="alignnone size-full wp-image-1312" title="fatjar5" src="https://noter.tw/wp-content/uploads/2011/12/fatjar5.png" alt="fatjar5 SWT Class -&#062; JAR -&#062; EXE" width="284" height="348"></a></li>
<li>在專案上點滑鼠右鍵，接著選擇 Build Fat Jar。<br />
<a href="https://noter.tw/wp-content/uploads/2011/12/fatjar1.png" target="_blank" rel="noopener noreferrer" data-wpel-link="internal"><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-1309" title="fatjar1" src="https://noter.tw/wp-content/uploads/2011/12/fatjar1.png" alt="fatjar1 SWT Class -&#062; JAR -&#062; EXE" width="330" height="682"></a></li>
<li>更改 Jar-Name，並選擇 Main-Class，點選下一步。<br />
<a href="https://noter.tw/wp-content/uploads/2011/12/fatjar2.png" target="_blank" rel="noopener noreferrer" data-wpel-link="internal"><img decoding="async" class="alignnone size-full wp-image-1313" title="fatjar2" src="https://noter.tw/wp-content/uploads/2011/12/fatjar2.png" alt="fatjar2 SWT Class -&#062; JAR -&#062; EXE" width="446" height="452"></a></li>
<li>使用我們剛導入的 swt.jar 並且取消原本版本較舊的 swt。<br />
<a href="https://noter.tw/wp-content/uploads/2011/12/fatjar6.png" target="_blank" rel="noopener noreferrer" data-wpel-link="internal"><img decoding="async" class="alignnone size-full wp-image-1314" title="fatjar6" src="https://noter.tw/wp-content/uploads/2011/12/fatjar6.png" alt="fatjar6 SWT Class -&#062; JAR -&#062; EXE" width="446" height="452"></a></li>
<li>按下完成後，就可以在專案的資料夾裡找到剛剛建立的 test-fat.jar。<br />
<a href="https://noter.tw/wp-content/uploads/2011/12/fatjar7.png" target="_blank" rel="noopener noreferrer" data-wpel-link="internal"><img decoding="async" class="alignnone size-full wp-image-1315" title="fatjar7" src="https://noter.tw/wp-content/uploads/2011/12/fatjar7.png" alt="fatjar7 SWT Class -&#062; JAR -&#062; EXE" width="446" height="446"></a></li>
<li>滑鼠擊點兩下，可以正確執行。<br />
<a href="https://noter.tw/wp-content/uploads/2011/12/30.png" target="_blank" rel="noopener noreferrer" data-wpel-link="internal"><img decoding="async" class="alignnone size-full wp-image-1316" title="30" src="https://noter.tw/wp-content/uploads/2011/12/30.png" alt="30 SWT Class -&#062; JAR -&#062; EXE" width="300" height="200"></a></li>
</ol>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/1255/swt-class-jar-exe/" data-wpel-link="internal">SWT Class -&#062; JAR -&#062; EXE</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/1255/swt-class-jar-exe/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
