顯示具有 Eclipse 標籤的文章。 顯示所有文章
顯示具有 Eclipse 標籤的文章。 顯示所有文章

星期一, 5月 05, 2014

[Eclipse] 讓Eclipse支援Subline Text Minimap功能 part (2) - Overview plugin

繼上一篇Github找到的mini map在自已的環境執行後有bug XD,
所以再找了另外一套 Overview Plugin ,功能上更強一點,安裝方法更簡單 :D

安裝方法:

Help-> Eclipse marketplace

[Eclipse] 讓Eclipse支援Subline Text Minimap功能 part (1) - Mini map plugin

由於下班都用Sublime Text開發,
本來就提供mini map的元件,
要找到要移動的程式碼位置非常省時(配合超大的註解區塊)
上班的公司因為採用Java解決方案,所以採用Eclipse IDE開發,
為了省時還是來裝一下Mini map,雖然拖了很久XD

Github minimap view plugin:

https://github.com/apauzies/eclipse-minimap-view

安裝方法:

下載後把dropins資料複製到你的Eclipse/dropins就好了 :D,接著重啟你的Eclipse

星期三, 3月 26, 2014

[Eclipse] 設定Tomcat的JVM Heap size

記錄一下JVM heap size的設定方法:

Step1: 點擊二下你要設定的Tomcat server


Step2: Ecipse會開啟一個Overview的設定,接著點擊Open Launch configuration

Step3: 點擊在Arguments 的tab,可看到VM arguments的設定區塊,填入你要的JVM參數。



結論:
原本裡面已有一個預設的${build_files:-Xms256m -Xmx512m},一開始有試著填這裡面的大小來看Heap size有沒有改變,結果好像無效,就把它砍了,自已設定。
不過跑Memory leak的測試程式,竟然跑不爆XD,殘念!!還是回到部署到Tomcat Server做測試Orz

[Java] Java heap: Shallow and retained sizes

最近在試MAT工具找客戶的問題,快速筆記一下:D


參考:
Memory Analyzer tool(MAT)分析内存泄漏---理解Retained Heap、Shallow Heap、GC Root
<实战> 通过分析Heap Dump 来了解 Memory Leak ,Retained Heap,Shallow Heap
Shallow and retained sizes

星期三, 3月 19, 2014

[TOMCAT] 利用Eclipse Memory Analyzer 來分析heap dump file

記錄一下MAT的操作心得

如何取得java heap dump

請再catalina.sh啟動Java heap dump的設定
JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/usr/local/TOMCAT/logs/heap-$(date +%Y-%m%d-%H%M).dump"


-XX:+HeapDumpOnOutOfMemoryError 打開heap dump
-XX:HeapDumpPath heap dump要產生的路徑



星期一, 5月 13, 2013

[Eclipse] bitbucket not authorized

先前把flicklinkr的原始碼改放在bitbucket,
今天要checkout的時候遇到not authorized錯誤
原來使用HTTPS將專案拉回的時候,要輸入你bitbucket上的帳號密碼XD

星期三, 5月 08, 2013

[Eclispe] 設定utf-8



開發專案前請記得請大家的環境統一設定UTF-8編碼,避免一些中文註解爆了XD
General/WorkSpace/Other: UTF-8


星期二, 4月 02, 2013

[Eclipse] 使用eGIT取回Github上面的專案

前言:
由於平常都使用eclispe開發,所以直接安裝git plugin來存取Github的repo是比較方便的,
感覺把一些sample code放在這,比放在blog上好維護多了xd
所以記錄一下如何從github取回專案 :D

前置處理:
1.請先安裝Egit pluign:

Help->Install New Software
EGit - http://download.eclipse.org/egit/updates
記得二個都打勾!!

星期一, 3月 25, 2013

[Eclipse] 搜尋取代大量字串

今天需要將一個東西重新命名一下,但整個專案很多地方有引用,需要一個快速取代的方法。
記錄一下eclipse的操作xd,


1.先搜尋要取代的字,指定搜尋範圍






2.接著在搜尋的結果集按右鍵,就可以看到replace all嚕

星期三, 5月 30, 2012

Mac lion Eclipse 設定 JDK7

在lion安裝完JDK7後,它的路徑已經先之前安裝的路徑不一樣了。
目前預設的安裝目錄是在
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home

之後打開Eclipse後,透過偏好設定的JAVA中的Installed JREs,指定新的JDK就可以了。


找到的參考資料
If you are a Java developer who wants to do Java development on Mac OS X 10.7, here are a few not-so-tricky steps to follow to get going:
  1. Go to http://connect.apple.com and sign in with your Apple ID (developer account may be required – it’s free).
  2. From the list titled “Downloads for Apple Developers”, select the item labeled “Java for Mac OS X 10.7 Update 1 Developer Package” (release date Nov 8, 2011) then download and install the package.
  3. The JDK will be installed into a different location then previous. This will result in IDEs (such as Eclipse) being unable to locate source code and java docs.
  4. At the time of writing the JDK ended up here:
    /Library/Java/JavaVirtualMachines/1.6.0_26-b03-383.jdk/Contents/Home
  5. Open up Eclipse preferences and go to Java > Installed JREs page
  6. Rather than use the “JVM Contents (MacOS X Default) we will need to use the JDK location
  7. At the time of writing Search is not aware of the new JDK location; we we will need to click on the Add button
  8. From the Add JRE wizard choose “MacOS X VM” for the JRE Type
  9. For the JRE Definition Page we need to fill in the following:
    JRE Home: /Library/Java/JavaVirtualMachines/1.6.0_26-b03-383.jdk/Contents/Home
  10. The other fields will now auto fill, with the default JRE name being “Home”. You can quickly correct this to something more meaningful such as:
    JRE name: System JDK
  11. Finish the wizard and return to the Installed JREs page
  12. Choose “System JDK” from the list
  13. You can now develop normally with:

星期二, 5月 29, 2012

[Eclipse] UTF-8 環境設定

Eclipse UTF-8環境設定
1.Windows->Preferences
2.偏好視窗:General->Workspace
    Text file encoding 把 default(MS950)改Other的UTF-8
3.偏好視窗:Web->JSP Files
     把Encoding改為UTF-8

Reference:
http://wiki.cheyingwu.tw/Eclipse/UTF8-Setting

星期一, 5月 28, 2012

[Eclipse] 設定JRE與Tomcat runtime

簡單記錄一下Eclipse設定JRE與Server Runtime擷圖XD

JRE Runtime
Step1: Windows-> Preference
Step2: Java-> Installed JREs


Server Runtime

Step1: Windows-> Preference
Step2: Server-> Runtime Environments
Step3: Add, 新增一個runtime server

Step4: 選擇新的runtime enviornment,範例為tomcat 7.0

Step5: 設定Tomcat安裝目錄
C:\Program Files\Apache Software Foundation\Tomcat 7.0



Step6: 完成,接下來編譯時選擇你要的執行環境即可


星期四, 3月 29, 2012

[Eclipse] 利用Eclipse建立Ant用的build.xml

本文說明如果用eclipse快速建立Ant的Build.xml檔

使用步驟:
1.在專案上按右鍵->Export

2.General->Ant Buildfiles


3. 選擇要匯出build.xml的專案


4.由於這個檔案是工具產生的,請依自已的需求做修改。

星期六, 3月 24, 2012

[SVN] VisualSVN

懶的了解SVN安裝繁雜的步驟的朋友(或跟我一樣裝了一直爆炸XD),
先直接安裝VisualSVN吧,完全無腦安全,省時省力:)

其他常用的功能:
將專案匯入資源庫(import project to VisualSVN) 參考這裡

weiteki-MacBook-Air:workspace ibigd$> svn import -m 'import message' your_project_name https://163.17.83.13/svn/your_repository/trunk/your_project_name


星期一, 3月 12, 2012

[Java] Eclipse產出JavaDoc

如何產生JavaDoc

1.於工作列上: Project->Generate javadoc
2.於跳出的Javadoc Generation視窗,設定javadoc command(C:\Program Files\Java\jdk1.6.0_26\bin\javadoc.exe)、選擇專案、匯出目錄等資訊


 

其他你感興趣的文章

Related Posts with Thumbnails