免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2013年8月1日 星期四

Netbeans Tips - how to add .java files

下載了Netbeans (一套 Java的IDE[整合開發環境]), 希望debug java 比較方便. 目前的release版本是7.3.1 

debug碰到的第一個問題就是如何輸入命令列參數(command line arguments)?
[Q1] how to give the command line arg to debug java in netbeans?

[try]
File ->  Project Properties -> Run 
-> right panel -> Arguments

[ref]
http://netbeanside61.blogspot.tw/2009/02/using-command-line-arguments-in.html

//===
其實個人碰到的第第一個問題是如何將別人的 .java範例檔案 加入新的Project中,因為Netbeans似乎沒提供 Add existing files 的功能?
在網路上搜尋沒找著解法, 土法煉鋼
 
--> 嘗試直接用檔案管理員把.java檔案 複製到 project的 src子目錄下, IDE就反映出來, Run OK! 

[Q0] How to add exiting .java files into a project in Netbeans?
[A0] Just directly copy the .java files to 'src' folder under the project directory by file explorer.


//=== 有問題衍伸的第第第一個問題則是 Help 畫面的字體太小 
網路一找 頗多人有相同的困擾. 解法就是修改 ide.css 
[C:\Program Files\NetBeans 7.3.1]\ide\docs\org\netbeans\modules\usersguide\ide.css 
我做了兩步驟的取代, 先把 large 換成 x-large, 再把 medium 換成 large
0. font-size: large;  --> font-size: x-large;
1. font-size: medium; --> font-size: large;


[ref]
http://forums.netbeans.org/topic31501.html 
"...
 there is no normal way to change the font for the Help Browser. There is a hack around this, knowing the fact that the Help browser uses HTML and CSS files ...
"


//=== 另一個困擾就是 Netbeans 預設的 Short-cut 與 Visual Studio 不同 ...
--> Tools -> Options -> Keymap