JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Java ME、Google Android 平台與 JavaCard 討論區 » 資源分享  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:linyma]
kojinvhfsk





發文: 15
積分: 0
於 2004-02-16 10:40 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
linyma wrote:
目前市面上好像還沒有一本書是講 midp2.0的
不過我也不知道1.4和2.0有啥差
只聽說在網路方面有些不大一樣

嗯嗯..我是知道比較不一樣的就是GAME的API吧,MIDP2.0有多這個
另外因為市面上找不到新書可以看,所以我就去翻一些舊書上來研究了,目前正在看,如果有哪本比較有幫助的,我再上來跟大家說一下囉!


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:moliwang]
0921536657





發文: 11
積分: 0
於 2004-03-23 19:47 user profilesend a private message to usersend email to 0921536657reply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
嗯 ! 實在是一本很贊的書
大略看了一下覺得很多不太能懂的觀念
都因此釐清了
謝謝王老師呀 !
只是不知道那裡可以找得到 Sun One Studio 的使用方法呢 ?
謝謝 !


reply to postreply to post
俺ㄉMSN:0921536657@yahoo.com.tw

作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:0921536657]
moliwang

用嘴巴打嘴炮比用鍵盤打嘴炮要來的務實

版主

發文: 1215
積分: 6
於 2004-03-23 20:33 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
0921536657 wrote:
嗯 ! 實在是一本很贊的書
大略看了一下覺得很多不太能懂的觀念
都因此釐清了
謝謝王老師呀 !
只是不知道那裡可以找得到 Sun One Studio 的使用方法呢 ?
謝謝 !


Java Studio(就是Sun ONE Studio)和NetBeans幾乎一樣,
目前最好的參考書大概就是O'Reilly這本了
http://www.oreilly.com/catalog/netbeans/


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:moliwang]
dx_dxlstudio





發文: 110
積分: 0
於 2004-04-27 19:37 user profilesend a private message to usersend email to dx_dxlstudioreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我也買暸
不過我是新手

遇到一個問題
我在新手區提齣暸 希望有人囬答
花您一點寶貴的時間囬答一下一個菜鳥提齣的簡單問題會令我很感動的


reply to postreply to post
J2ME!Just do it !!
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:moliwang]
yeungkit





發文: 14
積分: 0
於 2004-07-01 21:49 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我今天買了一本簡體版的由電子工業出版社出版的.拿回家看清楚點,怎麼會沒有了第7部即是Personal Java的部份啊?

reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:yeungkit]
moliwang

用嘴巴打嘴炮比用鍵盤打嘴炮要來的務實

版主

發文: 1215
積分: 6
於 2004-07-01 23:11 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
yeungkit wrote:
我今天買了一本簡體版的由電子工業出版社出版的.拿回家看清楚點,怎麼會沒有了第7部即是Personal Java的部份啊?


為了降低成本(聽說太貴很難賣), 所以做成電子書放到CD裡面,
後來有一些小失誤,導致壓片場拿到的是沒有電子書的版本.
不過簡體中文版的方舟先生很負責任,馬上就把電子書放在
網路上讓大家下載,詳情請參考本論壇之前的post.


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:moliwang]
lawrence





發文: 52
積分: 0
於 2004-07-04 00:34 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我今天買了這本書
沒看到完整的執行步驟及方法
我不知道怎麼compile
不知道怎麼做成.jar .jad .mf
沒辦法再看下去

請問為什麼書裡沒教這些
這本不是"入門"嗎?

-_-


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:lawrence]
moliwang

用嘴巴打嘴炮比用鍵盤打嘴炮要來的務實

版主

發文: 1215
積分: 6
於 2004-07-04 09:31 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
lawrence wrote:
我今天買了這本書
沒看到完整的執行步驟及方法
我不知道怎麼compile
不知道怎麼做成.jar .jad .mf
沒辦法再看下去

請問為什麼書裡沒教這些
這本不是"入門"嗎?

-_-


咦? 您的書會不會是缺了第六章和第八章?


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:moliwang]
lawrence





發文: 52
積分: 0
於 2004-07-04 11:42 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
原來完整的執行步驟及方法是放在第六章和第八章
因為我從第一章開始看
還沒看到compile怎麼做就出現很多範例程式和執行結果
不知道怎麼跟著做..
請問為什麼要把完整的執行步驟及方法放在第六章和第八章呢?


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:lawrence]
moliwang

用嘴巴打嘴炮比用鍵盤打嘴炮要來的務實

版主

發文: 1215
積分: 6
於 2004-07-04 17:59 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
lawrence wrote:
原來完整的執行步驟及方法是放在第六章和第八章
因為我從第一章開始看
還沒看到compile怎麼做就出現很多範例程式和執行結果
不知道怎麼跟著做..
請問為什麼要把完整的執行步驟及方法放在第六章和第八章呢?


嗯...我也很難回答這個問題耶...
純粹個人的經驗考量.


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:moliwang]
spplus





發文: 16
積分: 0
於 2004-07-05 13:58 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
最近買了這本書也try了一下personal java的部份..在桌上型電腦測試時都還ok
但把程式丟上去PDA時..發現只有awt的部份可以正常執行..swing的部份似乎
是吃不到jar檔而不能執行..可是我也照了書上修改了Registry但結果還是一樣
請問有什麼辦法可以解決嗎??


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:spplus]
moliwang

用嘴巴打嘴炮比用鍵盤打嘴炮要來的務實

版主

發文: 1215
積分: 6
於 2004-07-05 16:53 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
spplus wrote:
最近買了這本書也try了一下personal java的部份..在桌上型電腦測試時都還ok
但把程式丟上去PDA時..發現只有awt的部份可以正常執行..swing的部份似乎
是吃不到jar檔而不能執行..可是我也照了書上修改了Registry但結果還是一樣
請問有什麼辦法可以解決嗎??


這個沒有什麼原因,要不就是swing.jar該改的沒改完全,
要不就是某個地方打字打錯了.只能慢慢的一個一個對.


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:moliwang]
spplus





發文: 16
積分: 0
於 2004-07-05 17:06 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
這是我Registry的設定
"\Program Files\Java\bin\pjava.exe" -classpath "\lib\swingall_fix.jar" -file "%1"
而swingall_fix.jar是用書上光碟附的...請問王森老師除了這些我還有哪裡需要比對的嗎??


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:spplus]
moliwang

用嘴巴打嘴炮比用鍵盤打嘴炮要來的務實

版主

發文: 1215
積分: 6
於 2004-07-05 17:27 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
spplus wrote:
這是我Registry的設定
"\Program Files\Java\bin\pjava.exe" -classpath "\lib\swingall_fix.jar" -file "%1"
而swingall_fix.jar是用書上光碟附的...請問王森老師除了這些我還有哪裡需要比對的嗎??


1.你用的是哪個run time? sun or jeode?
2.錯誤訊息是什麼?


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:moliwang]
spplus





發文: 16
積分: 0
於 2004-07-05 18:46 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我用的run time是sun
錯誤訊息是java.lang.NoClassDefFoundError:javax/swing/JFrame
這是我在執行範例程式Main.class所發生的


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:spplus]
moliwang

用嘴巴打嘴炮比用鍵盤打嘴炮要來的務實

版主

發文: 1215
積分: 6
於 2004-07-05 19:58 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
spplus wrote:
我用的run time是sun
錯誤訊息是java.lang.NoClassDefFoundError:javax/swing/JFrame
這是我在執行範例程式Main.class所發生的


那就是找不到swingall_fix.jar囉!
遇到這種問題的時候,只好找另外一個人,
幫你看看:
1. swingall_fix.jar是不是真的放依lib目錄下了,要放對喔,
這個lib是整個wince的lib目錄,不是其他的目錄.
2.在wince上是不是真的打對了,有時候常常多了空隔
或是少了空隔,這種東西很難抓出問題,要耐心點
反正,一定是我們自己的錯Tongue


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:moliwang]
lawrence





發文: 52
積分: 0
於 2004-07-05 20:26 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我目前寫到P.6-20的build.xml
就是一路做到混淆之後
這是我執行ant的錯誤訊息
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
D:\m2>ant
Buildfile: build.xml
 
prepare:
 
compile:
 
beforeobfuse:
      [jar] Building jar: D:\m2\build\bin\MyFirst-unobfus.jar
 
obfuscate:
     [java] java.lang.NoClassDefFoundError: RetroGuard
     [java] Exception in thread "main"
 
     [java] Java Result: 1
 
afterobfuse:
    [unzip] Expanding: D:\m2\build\bin\MyFirst-obfused.jar into D:\m2\build\obfused
 
BUILD FAILED
D:\m2\build.xml:51: Error while expanding D:\m2\build\bin\MyFirst-obfused.jar
 
Total time: 5 seconds

看起來像是說 expand D:\m2\build\bin\MyFirst-obfused 時發生錯誤
ps.我的wtk21裝在c:

請問為什麼呢?

原始碼 build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0" encoding="Big5"?>
 
<project name = "MIDPµ{¦¡" default = "afterobfuse" basedir=".">
 
<!-- ¤Þ¤J¦ì©óbuild.properties¤§¤¤ªº±`¥ÎÄÝ©Ê -->
<property file = "build.properties"/>
 
<target name = "prepare" description = "·Ç³Æ¤u§@">
  <mkdir dir = "${build.dir}"/>
  <mkdir dir = "${build.dir.classes}"/>
  <mkdir dir = "${build.dir.obfused}"/>
  <mkdir dir = "${build.dir.preverified}"/>
  <mkdir dir = "${build.dir.bin}"/>
</target>
 
<target name = "cleandir" description = "²M°£¥Ø¿ý">
  <delete dir = "${build.dir}"/>
</target>
 
<target name = "compile" description = "½sĶ­ì©l½X" depends = "prepare">
  <javac  debug = "off"
      classpath = "${midp.api};."
      bootclasspath = "${midp.api}"
      srcdir = "${src.dir}"
      destdir = "${build.dir.classes}"
  />
</target>
 
<target name = "beforeobfuse"
description = "²V²c«e¥ý¥]»q¦¨JAR" depends = "compile">
  <jar basedir = "${build.dir.classes}"
          jarfile = "${build.dir.bin.jarunobfus}"
  />
</target>
 
<target name = "obfuscate"
description = "¨Ï¥Î²V²c¾¹" depends = "beforeobfuse">
  <java fork = "yes"
      classname = "RetroGuard"
      classpath = "${obfuscator.lib};${midp.emptyapi}">
      <arg line = "${build.dir.bin.jarunobfus}"/>
      <arg line = "${build.dir.bin.jarobfused}"/>
      <arg line = "${obfuscator.script}"/>
  </java>
</target>
 
<target name = "afterobfuse"
description = "²V²c«e¥ý¥]¸Ë¦¨JAR" depends = "obfuscate">
  <unzip src = "${build.dir.bin.jarobfused}"
      dest = "${build.dir.obfused}"
  />
  <delete dir = "${build.dir.obfused}/META-INF"/>
</target>
 
</project>

原始碼 build.properties
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#³]©w±`¥ÎªºÄÝ©Ê
 
#±M®×¦WºÙ
name = MyFirst
 
#File names of JAD and JAR
jar = ${name}.jar
jad = ${name}.jad
 
#­ì©lÀÉ©Ò¦b¸ô®|
src.dir = src
 
#¸ê·½ÀÉ©Ò¦b¸ô®|
res.dir = res
 
#«Øºc²£ª«¸m©ñ¦ì¸m
build.dir = build
 
#½sĶ«áclassªº©ñ¸m¦ì¸m
build.dir.classes = ${build.dir}/classes
#¥¼²V²cªºJARÀɦW
build.dir.bin.jarunobfus = ${build.dir.bin}/${name}-unobfus.jar
#¸g¹L²V²cªºJARÀɦW
build.dir.bin.jarobfused = ${build.dir.bin}/${name}-obfused.jar
#²V²c«áÃþ§Oªº©ñ¸m¥Ø¿ý
build.dir.obfused = ${build.dir}/obfused
#preverify«áªºclasses¦ì¸m
build.dir.preverified = ${build.dir}/preverified
#JAD and JAR ªº©ñ¸m¦ì¸m
build.dir.bin = ${build.dir}/bin
 
#j2me wtk ©Ò¦b¸ô®|
midp.home = c:/wtk21
#midp ¨ç¦¡®w©Ò¦b¸ô®|
midp.api = ${midp.home}/lib/midpapi.zip
#ªÅ¥Õ midp ¨ç¦¡®w©Ò¦b¸ô®|
midp.emptyapi = ${midp.home}/wtklib/emptyapi.zip
 
#²V²c¾¹»P±±¨îÀÉ
obfuscator.lib = retroguard.jar
obfuscator.script = script.rgs


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:lawrence]
moliwang

用嘴巴打嘴炮比用鍵盤打嘴炮要來的務實

版主

發文: 1215
積分: 6
於 2004-07-05 20:47 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
lawrence wrote:
我目前寫到P.6-20的build.xml
就是一路做到混淆之後
這是我執行ant的錯誤訊息
1
2
obfuscator.lib = retroguard.jar
obfuscator.script = script.rgs


這裡用來設定混淆器(retroguard.jar)的位置,
您必須在與build.xml同樣的位置上放置retroguard.jar
才能成功進行混淆.


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:moliwang]
lawrence





發文: 52
積分: 0
於 2004-07-06 09:58 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
原來是沒有放retroguard..
雖然書上有說要把retrogard放在專案的目錄下
不過還是建議您註明要先下載
像我就呆呆的一直在WTK和SDK裡找..

ch6的完整執行過程教學
建議您能標示每次修改build.xml和build.properties的部分
因為獨自對照程式碼會不易察覺哪裡被修改


lawrence edited on 2004-07-06 10:34
reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:moliwang]
lawrence





發文: 52
積分: 0
於 2004-07-06 11:02 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
請問為何我要用ant執行模擬器卻無法出現像P.6-28的模擬器畫面?
我已經按照P.6-10的方法配置run之前的步驟也都正常
而 m2/build/bin 裡有MyFirst.jad, MyFirst.rar, MyFirst-unobfus, MyFirst-obfused
我覺得奇怪的是為什麼會有MyFirst.rar卻沒有MyFirst.jar?

以下是ch6最後的build.xml所執行的結果
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
D:\m2>ant
Buildfile: build.xml
 
cleandir:
   [delete] Deleting directory D:\m2\build
 
prepare:
    [mkdir] Created dir: D:\m2\build
    [mkdir] Created dir: D:\m2\build\classes
    [mkdir] Created dir: D:\m2\build\obfused
    [mkdir] Created dir: D:\m2\build\preverified
    [mkdir] Created dir: D:\m2\build\bin
 
compile:
    [javac] Compiling 1 source file to D:\m2\build\classes
 
beforeobfuse:
      [jar] Building jar: D:\m2\build\bin\MyFirst-unobfus.jar
 
obfuscate:
 
afterobfuse:
    [unzip] Expanding: D:\m2\build\bin\MyFirst-obfused.jar into D:\m2\build\obfu
sed
   [delete] Deleting directory D:\m2\build\obfused\META-INF
 
preverify:
     [exec] Error preverifying class my.FirstMIDlet
     [exec]     java/lang/NoClassDefFoundError: javax/microedition/midlet/MIDlet
 
     [exec] Result: 1
 
package:
      [jar] Building jar: D:\m2\build\bin\MyFirst.jar
     [copy] Copying 1 file to D:\m2\build\bin
 
run:
     [exec] Unknown parameter: -
     [exec] Syntax:
 
     [exec] emulator [arguments] <Application>
 
     [exec] Arguments are:
 
     [exec] -classpath, -cp    The class path for the VM
     [exec] -D<property=value> Property definitions
     [exec] -version           Display version information about the emulator
     [exec] -help              Display list of valid arguments
     [exec] -Xverbose[: allocation | gc | gcverbose | class | classverbose |
     [exec]          verifier | stackmaps | bytecodes | calls |
     [exec]          callsverbose | frames | stackchunks | exceptions |
     [exec]          events | threading | monitors | networking | all
     [exec]                    enable verbose output
     [exec] -Xquery
     [exec]                    Query options
     [exec] -Xdebug            Use a remote debugger
     [exec] -Xrunjdwp:[transport=<transport>,address=<address>,server=<y/n>
     [exec]            suspend=<y/n>]
     [exec]                    Debugging options
     [exec] -Xdevice:<device name>
     [exec]                    Name of the device to be emulated
     [exec] -Xdescriptor:<jad file name>
     [exec]                    The JAD file to be executed
     [exec] -Xjam[:install=<jad file url> | force | list | storageNames |
     [exec]            run=[<storage name> | <storage number>] |
     [exec]            remove=[<storage name> | <storage number> | all] |
     [exec]            transient=<jad file url>]
     [exec]                    Java Application Manager and support
     [exec]                    for Over The Air provisioning (OTA)
     [exec] -Xheapsize:<size>  (e.g. 65536 or 128k or 1M)
     [exec]                    specifies the VM heapsize
     [exec]                    (overrides default value)
     [exec] -Xprefs:<filename> Override preferences by properties in file
     [exec] -Xnoagent          Supported for backwards compatibility
     [exec] -Xdomain:<domain_name>
     [exec]                    Set the MIDlet suite's security domain
 
all:
 
BUILD SUCCESSFUL
Total time: 13 seconds


lawrence edited on 2004-07-06 11:29
reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:lawrence]
moliwang

用嘴巴打嘴炮比用鍵盤打嘴炮要來的務實

版主

發文: 1215
積分: 6
於 2004-07-07 02:01 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
lawrence wrote:
原來是沒有放retroguard..
雖然書上有說要把retrogard放在專案的目錄下
不過還是建議您註明要先下載
像我就呆呆的一直在WTK和SDK裡找..

ch6的完整執行過程教學
建議您能標示每次修改build.xml和build.properties的部分
因為獨自對照程式碼會不易察覺哪裡被修改


其實原稿裡面,修改的部分都有用粗體標出來,
結果到了書上就不見了 >"<
改版的時候我會注意這個部分,謝謝!


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:lawrence]
moliwang

用嘴巴打嘴炮比用鍵盤打嘴炮要來的務實

版主

發文: 1215
積分: 6
於 2004-07-07 02:10 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
lawrence wrote:
請問為何我要用ant執行模擬器卻無法出現像P.6-28的模擬器畫面?
我已經按照P.6-10的方法配置run之前的步驟也都正常
而 m2/build/bin 裡有MyFirst.jad, MyFirst.rar, MyFirst-unobfus, MyFirst-obfused
我覺得奇怪的是為什麼會有MyFirst.rar卻沒有MyFirst.jar?


只有一種可能,就是您打錯字了..


以下是ch6最後的build.xml所執行的結果
1
2
3
4
5
D:\m2>ant
Buildfile: build.xml
 
cleandir:
   [delete] Deleting directory D:\m2\build


給個建議,如果對Java Programming不是很熟,
不要勉強自己去學ch6的東西,只要把書裡面的
script拿來會改改變數,讓整個流程可以順利執行就好.

如果真的想搞懂,那麼請找本ant的書學ant,
同時也必須把基本的Java程式設計(例如什麼是classpath)
摸熟.


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:moliwang]
lawrence





發文: 52
積分: 0
於 2004-07-08 14:36 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
可是我直接copy隨書光碟裡的build.xml和build.properties來用
也是同樣不能執行..>"<
以下是我的執行結果 BUILD SUCCESSFUL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
D:\m2>ant
Buildfile: build.xml
 
cleandir:
   [delete] Deleting directory D:\m2\build
 
prepare:
    [mkdir] Created dir: D:\m2\build
    [mkdir] Created dir: D:\m2\build\classes
    [mkdir] Created dir: D:\m2\build\obfused
    [mkdir] Created dir: D:\m2\build\preverified
    [mkdir] Created dir: D:\m2\build\bin
 
compile:
    [javac] Compiling 1 source file to D:\m2\build\classes
 
beforeobfuse:
      [jar] Building jar: D:\m2\build\bin\MyFirst-unobfus.jar
 
obfuscate:
 
afterobfuse:
    [unzip] Expanding: D:\m2\build\bin\MyFirst-obfused.jar into D:\m2\build\obfu
sed
   [delete] Deleting directory D:\m2\build\obfused\META-INF
 
preverify:
     [exec] Error preverifying class my.FirstMIDlet
     [exec]     java/lang/NoClassDefFoundError: javax/microedition/midlet/MIDlet
 
     [exec] Result: 1
 
package:
      [jar] Building jar: D:\m2\build\bin\MyFirst.jar
     [copy] Copying 1 file to D:\m2\build\bin
 
run:
     [exec] com.sun.kvem.midletsuite.InvalidJadException: Reason = 14
     [exec] The file Manifest is missing the required attribute: MIDlet-Vendor
 
all:
 
BUILD SUCCESSFUL
Total time: 15 seconds

但若我用ch8的高階開發工具
將專案copy製apps下並修改資料夾名稱
卻可以得到P.6-28的模擬器執行結果
請問這種做法是否就表示我的環境設定其實是正確的?
請問問題出在哪裡呢?


lawrence edited on 2004-07-08 14:57
reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:lawrence]
moliwang

用嘴巴打嘴炮比用鍵盤打嘴炮要來的務實

版主

發文: 1215
積分: 6
於 2004-07-08 15:02 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
lawrence wrote:
可是我直接copy隨書光碟裡的build.xml和build.properties來用
也是同樣不能執行..>"<
以下是我的執行結果 BUILD SUCCESSFUL
但若我用ch8的高階開發工具
將專案copy製apps下並修改資料夾名稱
卻可以得到P.6-28的模擬器執行結果
請問這種做法是否就表示我的環境設定其實是正確的?
請問問題出在哪裡呢?


直接copy沒有用呀,有些東西還是要改呀!
還有,書裡面所使用的是以WTK為例子,
不要用MIDP RI來搭配.


reply to postreply to post
作者 Re:王森新書 手機/PDA程式設計入門 - 試讀章節下載 [Re:moliwang]
lawrence





發文: 52
積分: 0
於 2004-07-08 15:25 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不好意思我寫的不清楚
我是copy光碟裡的.xml, .properties, .mf
並對照於我目前的環境設定做調整
而檔案位置和其他部分我都盡量與書上的設定相同
不同的地方就修改.propertires的內容
只有把d:WTK20改成C:WTK21
而.xml則未修改

請問是否有漏掉的部分?


reply to postreply to post
go to first page go to previous page  1   2   3  go to next page go to last page
» JWorld@TW »  Java ME、Google Android 平台與 JavaCard 討論區 » 資源分享

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8