Lunski's Clutter

This is a place to put my clutters, no matter you like it or not, welcome here.

0%

NetBeans 小技巧

官方支持的Java IDE, intellij前身。

Shortcuts

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Tab:增加縮排
Shift + Tab:減少縮排
Ctrl + :自動完成、程式碼建議
Ctrl+/:註解或反註解
Ctrl + E:刪除一行
Ctrl+F:在單檔中搜尋
Ctrl+G:到檔案中某行
Ctrl+H:在單檔中取代
Ctrl + R:重新命名
Ctrl+Shift+F:在專案中搜尋
Ctrl+Shift+H:在專案中取代
Ctrl+Shift+I:修正所有引入
Alt+Insert:建立程式碼
Alt+Shift+F:格式化程式碼
Alt+Shift+O:搜尋並開啟檔案(用*為萬用字元)
sout+[tab]: System.out.println()

快捷鍵+ Tab自動生成段落

  • war在 D:...\target

  • Output tag不見

  1. window> output
  2. 右上角> Maximize window

右鍵好用

  • Find Usage
  • Call Hierachy
  • Insert code> Getter and Setter
  • Fix import
  • Refactor > Rename
  • Format
  • war file: project/target/project.war
  • 行數右鍵撤銷程式
  • 按住ctrl, 游標移到某參數看java doc
  • 如果有2個main要對檔案右鍵run file

更換專案

1
2
Projects> close
File> open project

顏色

  • 藍: 修改
  • 綠: 添加
  • 紅: 刪除
  • 灰: Git 忽略

特色

  1. 有最新Java技術
  2. 完全Java撰寫
  3. 支持marven
  4. 面向企業

Payara Server

  • 執行
  1. 專案右鍵clean& build
  2. 專案右鍵run
  3. 如果有錯專案右鍵debug
  • 執行成功
    payara server > applications會有東西
    不成功檢查
    output看run與payara server tag

Intellij IDEA v.s. NetBeans

  • IDEA

    • 程式提示優越
    • 插件豐富
    • Git/Maven/Shell集成佳
  • NetBeans

    • 完整Java EE支持
    • 較低記憶體佔用

如果你覺得這篇文章很棒,請你不吝點讚 (゚∀゚)

Welcome to my other publishing channels