JCBR: Java Chinese Book Reader


Name: JCBR (Java Chinese Book Reader)
Latest Version: 0.8.0
Platform: Mac OS X, Windows (since 0.8.0), Linux (since 0.8.0)
Supported Files: PDB, uPDB
Note: This application is specially for eBooks made by mPDB.
Previous Versions: 0.60.6.10.7.00.8.0 Mac0.8.0 Windows/Linux

JCBR 是最近寫的一個中文直式閱讀軟體,目前作業系統僅支援 Mac OS X ,而檔案格式僅支援由 mPDB 所製作的 PDB/uPDB 檔案。為什麼要寫這個軟體呢?由於本人一直很喜歡看武俠小說,前不久正好發現 iPhone 上的一個免費電子書軟體:cBook Lite ,透過這個軟體又發現了好讀網站。好讀網站上除了電子書以外,還有好用的中文電子書製作軟體 mPDB 與直式閱讀軟體。這些閱讀軟體有 Windows 版、WinCE 版、Palm 版、SONY CLIE 版、網頁版、iPhone 版與 Andriod 版,雖然有這麼多平台的閱讀軟體,但其中就是少了 Mac OS 。這對上個星期狠心買下 MacBook Pro 的我來說便造成一點困擾。於是花了點時間來為 Mac 寫一個對我來說還算堪用的直式閱讀軟體。


第一次開啓 JCBR 的時候,會跳出偏好設定(Preference)的對話框(如下圖),之後要再更改設定的話可以按 Command + , 來開啓偏好設定。在一般設定頁面可以設定顯示字型(Font)、前景顏色(Foreground Color)、背景顏色(Background Color)、每一列與每一行的字數(Number of Columns、Number of Rows),以及軌跡板手勢。


在書架頁面可以設定指向 PDB 檔案的路徑(亦即書櫃之所在)。



按下 + 鈕,會開啓一個檔案選擇視窗,找到電腦裡面存放 PDB 檔案的地方按 Open (開啟),然後給這個書櫃一個名字即可(如下圖)。


如果 PDB 檔案擺放在幾個不同資料夾,可以繼續按 + 新增,新增完以後的偏好設定視窗如下。想要刪除書櫃的話,先選擇要刪除的書櫃,然後按下 - 鈕。想要改書櫃名稱或路徑的話,直接在想要改的地方按滑鼠兩下即可。



設定好路徑之後,在偏好設定那邊按下確認,會開啓書櫃視窗(Bookshelf),如下圖。此時會顯示所有在偏好設定裡面的書櫃。在書櫃視窗裡面可以按方向鍵來瀏覽書櫃,並且按下 Enter 鍵來開啓目前選擇的書櫃,或是按下 ESC 離開書櫃視窗。


當按下 Enter 開啓書櫃之後,視窗會顯示該書櫃內的所有電子書,一樣使用方向鍵來瀏覽書目,並用 Enter 鍵來開啓目前選擇的書本。如果要回到書櫃列表的話,移動到 .. 後按下 Enter 。如果要關閉視窗同樣是按下 ESC 鍵。


開啓書本之後的瀏覽畫面如下圖,左下方會顯示目前的章節,以及全部的章節數目。右下方會顯示目前的頁面,以及本章節的頁面總數。在閱讀視窗裡面,可以按左鍵瀏覽下一頁,右鍵瀏覽上一頁,下鍵瀏覽下一章節,上鍵瀏覽上一章節。當瀏覽到該章節的最後一頁時,翻下頁的時候會自動跳到下一章節的第一頁。



除了方向鍵以外,可以按下 B 來開啓書櫃視窗,選擇其他的書。或是按下 T 鍵來開啓目錄視窗(Table of Contents),如下圖。在目錄視窗裡面可以看到目前這一本書的所有章節名稱,在想要看的章節上按下 Enter 就會在瀏覽視窗裡面開啓該章節。


目前已知的缺點如下:
  • 開啓某些 PDB 檔案的時候可能會有問題,因為我在開啓檔案的時候並沒有特別注意檔頭的一些細節。不過我試了幾個 PDB 檔案,尚未出現這個問題。
  • 某些字顯示不正常。
  • 在 Lion 上沒有觸控版手勢。

Release Note:
  • 0.8.1:
    • Fix a bug in the preference dialog that does not display the gestures correctly.
    • Fix a bug in determining the change of background color and foreground color.
  • 0.8.0:
    • Add support of Windows and Linux.
    • Display the selected book name at the bottom of the bookshelves dialog.
    • Make the font of the bookshelves dialog and the TOC dialog customizable.
    • Allow language switching on Windows and Linux.
  • 0.7.0:
    • Add gestures.
  • 0.6.1:
    • Allow books with fewer (or more) chapters in the table of contents than actual chapters in the book.
    • Fix a bug that does not save user preference when Cmd-Q is used to quit this application.
  • 0.6:
    • Add Chinese interface.
  • 0.5:
    • Support uPDB files made by mPDB 2.5.
    • Remove the encoding menu.
    • The preferences are saved in ~/Library/JCBR/preference.ini.
    • Add menu items for exporting and importing user preferences.
    • Support PDB files made by mPDB 1.7.
  • 0.4:
    • Use Big5-HKSCS as the default charset.
    • Allow the user to change the runtime charset.
    • Remember recent files.
    • Remember the position of every book.
    • Add an open menu item to open a PDB file outside the bookshelves.
    • Add font, foreground, and background menu items.
    • Support bookmarks.
    • Add two keystrokes: space for the next page and backspace for the previous page.
  • 0.3:
    • Allow multiple bookshelves.
    • Add more font sizes.
  • 0.2: 
    • Use vertical labels to display text instead of JTextArea such that characters will have same width.
    • Allow multiple directories to PDB files.
  • 0.1: This is the first version.

    55 意見:

    匿名 提到...

    Hi,

    I stumble upon your site after searching for a day to look for a mac reader for mPDB file. Thank you so much!

    Wasabi

    匿名 提到...

    hi i cannot download your software for me to read the nice book in haodoo net. would you provide me the link. my email

    alxdingo@netvigator.com

    張致中/Nanuc Chang, Chih-chung 提到...

    hi~

    謝謝您開發出這個for mac os的軟體
    讓同樣使用mbp的朋友們更加享受好讀的資源!

    目前使用上一切流暢~
    不過零星會有些亂碼出現,改變字體似乎也沒有效果
    我現在讀的是笑傲江湖,是否有什麼改善方式呢?
    非常謝謝您!!

    Unknown 提到...

    To 張CC:
    我想字元顯示不正常可能是程式在解碼 PDB 檔案的問題,跟使用何種字體無關,我會再確認問題所在並加以修正,感謝您的意見。

    Unknown 提到...

    剛看了一下,似乎應該用 Big5-HKSCS 編碼而非 Big5 編碼(這是寫死在程式裡面的),程式改了一下就正常了。大多變亂碼的字是 "裏" ,在新版出來之前,麻煩先請腦內補完吧。很抱歉造成困擾。

    Unknown 提到...

    改完了,麻煩試一下 0.4 版吧。

    張致中/Nanuc Chang, Chih-chung 提到...

    謝謝您!0.4版使用愉快~

    http://picasaweb.google.com/113386910450025335521/Others#5489549310584710274
    我也做了個好讀軟體的icon
    是用別人現有的icon去改出來的
    若不嫌棄也提供給您
    當作小小的回禮:)

    火鳥 提到...

    謝謝您開發出這個for mac os的軟體

    Unknown 提到...

    To 張CC:
    很漂亮的圖示,感謝 :) 。

    匿名 提到...

    Hi, Mr Zech

    Thank you very much for your effort providing the software.

    I just bought an iMac with Mac OS X 10.6.4 version operation system. I tried the JCBR reader but it could not show a word correctly except the article heading at the bottom of the reader window. Also the Esc key has no response at all.

    Did I do anything wrong when installing the reader? What can I do to correct the above issues?

    Best regards

    Howard

    Unknown 提到...

    Could you send me the PDB file?

    匿名 提到...

    Hi, Dr Zech

    Thank you for your reply.

    Please let me have your e-mail address so that I can send you the files.

    Regards

    Howard

    匿名 提到...

    Dear Dr Zech

    By the way, I sent you an message around noon yesterday with my e-mail address included.

    Regards

    Howard

    匿名 提到...

    Hi, May be you should be Dr Tsai instead of Zech which is the title of the BLOC.

    I am sorry as I am a bit confused. Please let me know how to address you correctly.

    Regards

    Howard

    Unknown 提到...

    Sorry, that's my fault. I supposed that there should be my email address in the About page but actually it was not there. Now I add my email address in the About page. Please don't forget to remove the first and the last 'X' (in order to avoid spam).

    I didn't get any message with your email address. All the comments you posted are anonymous.

    Regarding how to call me, either Zechs, Mr. Tsai, or Ming-Hsien is fine.

    匿名 提到...

    Dear Mr Tsai

    Thank you very much for your prompt reply.

    I have separately sent 5 files to your e-mail address. Please check if you have received them.

    The 2003 lecture file is totally unreadable. The rest files from the middle part on are also unreadable. Is it due to the large size of the files?

    Besides, after I quit/close the reader and reopen it again, I find all my previous preference settings are gone and I need to start all over again. Is there a way to keep such settings like the program for windows?

    By the way, the earlier message I sent you was via the e-mail delivery system in your BLOG. May be it was sent to your BLOG?

    Best regards

    Howard Huang

    Unknown 提到...

    Hi, Howard,

    I sent you an email. Please check if the attached version in the email works for you. Thanks.

    匿名 提到...

    Hi, Mr Tsai

    I received your e-mail and replied. The new version works fine except the "command +" still has no response.

    Thanks a lot for your help.

    Best regards

    Howard

    匿名 提到...

    Hi,

    前兩月使用05版JCBR都還順利,最近整理一下硬碟,就發現我的JCBR不靈了。而且出現訊息:
    java.lang.nullpointerexception

    我下載了06版JCBR,結果相同。請教如何解決,謝謝您

    Unknown 提到...

    麻煩開啟終端機,將路徑切換到
    JCBR.app/Contents/Resources/Java
    然後執行
    java -cp jcbr.jar tw.mht.jcbr.Reader
    把終端機所顯示的詳細錯誤訊息貼上,以便除錯。請順便告知 Java 版本,可由以下指令得知:
    java -version

    Unknown 提到...

    Hi, dear Mr. Tsai,

    抱歉,我實在是電腦文盲。
    請問如何【開啟終端機】?

    Unknown 提到...

    1. 開啟 Finder ,按下 Shift-CMD-U (或是按一下選單的 Go -> Utilities),裡面有一個 Terminal 。
    2. 執行 Terminal ,在 Terminal 視窗先按下 "cd "(不包含雙引號,最後面有一個空格)。
    3. 在 Finder 裡面 JCBR 的圖示上按滑鼠右鍵,選擇 Show Package Contents 。這時會跳出一個 Finder 視窗,點進 Contents -> Resources -> Java 。然後把這個 Finder 視窗最上方 Java 左邊的那個藍色資料夾圖示拖到剛剛開好的 Terminal 視窗。這時候 Terminal 視窗的 "cd " 後面會自動接上一串路徑。在 Terminal 視窗直接按下 Enter 切換路徑。
    4. 在 Terminal 視窗內輸入 "java -cp jcbr.jar tw.mht.jcbr.Reader" 並按下 Enter 執行 JCBR 。
    5. 執行期間若有錯誤,應會顯示於 Terminal 視窗中。

    Unknown 提到...

    Dear Mr. Tsai,

    My JaVa version is "1.5.0_28"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_28-b04-382-9M3326)
    Java HotSpot(TM) Client VM (build 1.5.0_28-157, mixed mode, sharing)

    It's not worked and a window showed " java.lang.NullPointerException"

    Thanks again!!

    Unknown 提到...

    Could you update Java to 1.6.0 and then try again? I might use some features only available in Java 1.6.

    JJ 提到...

    您好,打擾您了,首先謝謝您分享,可以在MAC觀看電子書真是很大心,但我下載後,原本使用正常,日前忽然無法開啟,出現以下訊息:
    java.lang.ArrayIndexOutOfBoundsException: 0

    按照您提示,在終端機執行程序出現以下訊息:

    [LaunchRunner Error] tw.mht.jcbr.Reader.main(String[]) threw an exception:
    java.lang.ArrayIndexOutOfBoundsException: 0

    at tw.mht.jcbr.Book.getChapterTitle(Book.java:45)
    at tw.mht.jcbr.Reader.refresh(Reader.java:128)
    at tw.mht.jcbr.Reader.main(Reader.java:281)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at apple.launcher.LaunchRunner.run(LaunchRunner.java:116)
    at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:51)
    at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
    logout

    [程序完成]

    因為完全不懂究竟是哪裡出錯了,冒昧前來請教,不知是否有解決方法呢?

    再次感謝您

    Unknown 提到...

    To JJ,

    個人猜測這是因為有一本書的內容有問題,它目錄裡面的章節數目比書本實際的章節數目要來得少。

    暫時的解決方式可以編輯 ~/Library/JCBR/preference.ini ,把 LastChapter= 後面的數字減少。

    我也會修改原始碼讓這樣的書可以正常顯示。謝謝你的意見。

    Unknown 提到...

    To JJ,

    唔,我剛剛發現那是 0 ,也就是那本書沒有編目錄。所以改 LastChapter 不會有用,那就把 ~/Library/JCBR/preference.ini 裡面的 LastBook=XXX 這一行刪除掉試試看吧。

    Unknown 提到...

    To JJ,

    試試看 0.6.1 版吧,希望有解決問題。

    匿名 提到...

    您好,

    我無法開啓JCBR,然後我試著用terminal開啓,但是也不行,出現以下錯誤訊息:

    java.io.FileNotFoundException: Locale
    at com.apple.eio.FileManager.getResourceFromBundle(FileManager.java:270)
    at com.apple.eio.FileManager.getResource(FileManager.java:233)
    at tw.mht.jcbr.Locale.load(Locale.java:147)
    at tw.mht.jcbr.Reader.main(Reader.java:251)
    Exception in thread "main" java.lang.NoClassDefFoundError: com/apple/eawt/AboutHandler
    at tw.mht.jcbr.Reader.main(Reader.java:254)
    Caused by: java.lang.ClassNotFoundException: com.apple.eawt.AboutHandler
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
    ... 1 more

    請問我該如何處理?我試過0.6 & 0.6.1 版本,我的 java version 是 "1.6.0_17"。感謝回覆,謝謝!

    jj 提到...

    您好:
    確實己經可以正常使用了,太感謝您幫忙!你設計的介面超簡潔好看好用的,再次感謝。

    Unknown 提到...

    關於 Locale 的問題,可否請問一下你使用的 Mac OS 語系是哪一個?

    Unknown 提到...

    唔,那個跟 Locale 無關,即使 Locale 檔案找不到還是可以執行的。

    問題在於找不到 com.apple.eawt.AboutHandler ,這個介面是在 Java for Mac OS X 10.6 Update 3, Java for Mac OS X 10.5 Update 8 以後才有的,所以請更新你的 Java 。

    小雯 提到...
    作者已經移除這則留言。
    小雯 提到...

    我下載了你的電子書閱讀軟體,你寫得很棒,簡單又好用,我非常非常的謝謝你。

    felipe 提到...

    我下載了你的電子書閱讀軟體,你寫得很棒,簡單又好用,我非常非常的謝謝你。
    請問您使用哪種語言寫的 ? 下次有更新程式的時候 ,可否加入滑動的頁面翻頁?

    Unknown 提到...

    To felipe,

    我用 Java 寫的。

    0.7.0 版有加入軌跡板手勢,手勢所對應的動作可以到偏好設定裡面去調整。

    felipe 提到...

    很感激您的回答,也下載了8.0 跟7.0
    可惜了,軌跡版的手勢 似乎不能動,
    是否有其他要注意的地方啊,譬如說先摻除掉教版本的一些設定之類的啊?

    謝謝您抽空回答,這東西很棒 !

    Unknown 提到...

    To felipe,

    觸控版手勢我原本只在我的 Snow Leopard 上測過。剛剛在學弟的 Lion 上測試,發現 Lion 的 Java 似乎不會產生手勢事件。莫非你也是用 Lion?

    felipe 提到...

    我是用 Lion
    可以修正嗎? 還是說java 的版本問題?

    Unknown 提到...

    我想應該是 Lion 的 Java 本身的問題吧,但並不確定有沒有其他的方式可以達成,目前我手上並沒有 Lion ,所以暫時不會去想辦法解決。

    felipe 提到...

    謝謝您的回答,我一值都是使用PC,前一陣子家人買了一台 mac book air
    所以才想說裝電子書上去.
    我是著更改java版本看看, 有心得的話再跟大家分享 .

    Unknown 提到...

    昨天下午又借學弟的筆電來測,這次觸控版手勢竟然可以用(左右可以,上下會是 Lion 預設的功能),真搞不懂為什麼第一次不行。

    學弟的筆電是從 Snow Leopard 升級到 Lion ,Java 在 Snow Leopard 時就已安裝,版本為 1.6.0_26_b03_383_11A511c ,參考一下吧。

    felipe 提到...
    作者已經移除這則留言。
    Unknown 提到...

    decompile......

    felipe 提到...

    哦 我無意冒犯您的作品
    只是想解決問題 因為java跨平台時
    有些地方是會出些狀況的
    重新編譯也許可以解決問題
    請您諒解 !
    我沒有要發表的意思

    Unknown 提到...

    我可以理解你是想解決問題,
    不過反組譯這種事,我想還是私底下做就好,
    檯面上其實可以不用說得這麼露骨 XD

    另,如果你需要原始碼重新編譯試試看的話,其實我可以寄一份給你。

    felipe 提到...

    抱歉 造成誤會

    不過Lion能跑 會不會是手勢部分一開始
    讀取設定的變數沒讀到 導致程式執行起來
    忽略掉了手勢部分?

    謝謝您的好意 我想那是您的心血
    還是由您處理.

    Unknown 提到...

    還好啦,反正這是免費的,不用太在意。沒有開放原始碼只是因為程式寫的很爛。 :)

    使用者設定讀不到的話原則上都會改用預設設定。

    可否請你做兩個測試。

    第一個是把 JCBR 設定檔 (~/Library/JCBR/preference.ini) 刪除,然後開啟終端機切換目錄到 JCBR.app 底下,執行 Contents/MacOS/JavaApplicationStub 以啟動 JCBR ,做一些設定與瀏覽動作,然後看看終端機有沒有錯誤訊息出現。

    第二個測試是抓 http://www.im.ntu.edu.tw/~r91014/Test.java 回來編譯執行,執行後會有一個視窗出現,在視窗上用三指左右滑動看看終端機會不會有訊息出現。

    felipe 提到...

    Hey,, 我的Mac Air 沒有建立 JCBR.app
    的資料夾.

    請教問題是出在哪?

    Unknown 提到...

    下載 Mac 版會是一個 JCBR-0.8.1.dmg.zip 壓縮檔,解壓縮以後得到 JCBR-0.8.1.dmg ,滑鼠雙擊該 DMG 檔會將之掛載上去變成一個磁碟,磁碟內容用 Finder 看只有一個 JCBR 程式。在 Mac OS 裡面,一個程式 X 其實是一個 X.app 的資料夾,但在 Finder 底下不會將 .app 顯示出來,而且雙擊 X.app 會執行該程式,而不是顯示該資料夾內容。所以將剛剛掛載磁碟的 JCBR 複製到 /Applications ,然後在終端機裡面依序輸入($ 是命令提示字元):
    $ cd /Applications/JCBR.app
    $ Contents/MacOS/JavaApplicationStub

    felipe 提到...

    多謝指教 又學到東西了 真好
    玩玩 Unix 謝謝 1

    iphonican 提到...

    Lion下,目錄全不見,執行如下:

    Java user$ java -cp jcbr.jar tw.mht.jcbr.Reader
    Exception in thread "main" java.lang.NoSuchMethodError: main

    謝謝

    Unknown 提到...

    真是不好意思,我把main搬到tw.mht.jcbr.JCBR了,所以現在應該是要java -cp jcbr.jar tw.mht.jcbr.JCBR。另外目錄全不見是指?

    iphonican 提到...

    目錄不見了。路徑對,資料夾內有pdb檔案,JCBR只顯示了書櫃名,其他都漆黑一片,在Leopard是無問題的。
    Terminal訊息如下:
    Java user$ java -cp jcbr.jar tw.mht.jcbr.JCBR
    java.io.FileNotFoundException: Locale
    at com.apple.eio.FileManager.getResourceFromBundle(FileManager.java:309)
    at com.apple.eio.FileManager.getResource(FileManager.java:268)
    at tw.mht.jcbr.Helper.getDocument(Helper.java:62)
    at tw.mht.jcbr.Helper.getLocaleFile(Helper.java:80)
    at tw.mht.jcbr.Locales.load(Locales.java:176)
    at tw.mht.jcbr.JCBR.main(JCBR.java:45)
    Exception in thread "main" java.lang.NullPointerException
    at tw.mht.jcbr.Locales.load(Locales.java:177)
    at tw.mht.jcbr.JCBR.main(JCBR.java:45)

    Unknown 提到...

    To iphonican,

    真是不好意思,最近到了一個幾乎沒有可用網路的地方開會,所以疏於回覆。

    請使用 https://www.asuswebstorage.com/navigate/s?u=DJJZX8 的版本,這個版本可以在找不到 Locale 的時候繼續執行,看看是否還有其他的錯誤訊息。