看板 java 關於我們 聯絡資訊
小弟對GCJ 將.java轉成.exe出了一點問題 http://0rz.tw/083CY 我是照上面的方法做的 C:\>gcj -c -O3 Test.java C:\>gcj Test.o --main=Test -o Run.exe -O3 C:\>run 在run的時候 有兩個問題 1.這種轉成native code的方法 為啥麼只對在命令提示字元的output有效  卻對gui的output無效  跑gui會出現亂碼? 執行run時跑出的亂碼如下 C:\>run Exception in thread "Thread-2" java.lang.UnsatisfiedLinkError: swt-win32-3054: an't open the module at 0x0041ff9e (Unknown Source) at 0x00420492 (Unknown Source) at 0x004576e4 (Unknown Source) at 0x00447b44 (Unknown Source) at 0x004f56a4 (Unknown Source) at 0x0041baa8 (Unknown Source) at 0x00426b09 (Unknown Source) at 0x0041d448 (Unknown Source) at 0x0064e706 (Unknown Source) at 0x0057008a (Unknown Source) at 0x00417fc5 (Unknown Source) at 0x007575c5 (Unknown Source) at 0x0058ecb7 (Unknown Source) at 0x0045d0db (Unknown Source) at 0x0058d0f8 (Unknown Source) at 0x0045789e (Unknown Source) at 0x00457883 (Unknown Source) at 0x0045a24a (Unknown Source) at 0x0044542e (Unknown Source) at 0x00426380 (Unknown Source) at 0x0042588c (Unknown Source) at 0x00503565 (Unknown Source) at 0x7c80b67f (Unknown Source) 2.要怎麼讓他在命令提示字元下  不要執行完馬上就消失  就像在c++裡面的結尾放個system("pause");一樣 先在這邊謝謝各位大大的幫忙 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.231.20.114 ※ 編輯: yorjing 來自: 61.231.20.114 (01/27 22:01)
qrtt1:你少了 swt 的 dll, 它是這麼說的 01/27 22:59
yorjing:請問swt的dll要放哪?我放system32資料夾還是錯誤XD 01/27 23:56
qrtt1:放在同目錄或是有path定義的地方應該就行了 01/28 00:06
yorjing:我把它丟在gcc資料夾裡還是沒用XD 01/28 00:18
yorjing:gcc的bin資料夾 這個有被設定在path裡 01/28 00:19
qrtt1:那只好去 gcj maillist 求救了 orz. Good Luck. 01/28 00:20
xlk:有試過放在執行檔相同目錄下? 02/05 10:39