跳到主要內容

發表文章

目前顯示的是有「程式設計」標籤的文章

Eclipse with Google App Engine不能編譯JSP

在eclipse來開發Google App程式是最方便也不過的事了,只是不才小弟剛開始使用eclipse作為IDE介面,實在有許多地方不知其所以然,至今遇到兩個麻煩的問題。 Q1:利用Google App Engine Plug-in建立的Web Application Project竟然在新增JSP檔的時候無法編譯為Servlet (註:JSP在第一次執行時IDE會編譯成Servlet,web server實際執行的是此Servlet程式,所以初次開啟JSP會比較慢),在JSP檔案前會出現一個小叉叉,編譯時出現Your Web Application Project must be configured to use a JDK in order to use JSPs.的錯誤訊息。 Google針對這個問題有特別解釋。 My JSPs aren't working, and there's an error that says "Your Web Application Project must be configured to use a JDK in order to use JSPs." What happened? Both the local App Engine server and the deployment process need to run javac in order to compile your JSPs. If your project isn't set to use a JDK ("Java Development Kit", which includes javac), then the JSPs can't be compiled. Go to Preferences > Java > Installed JREs and make sure that you have a JDK installed -- if you don't, you can easily download one. Now right-click on your project and choose Properties > Java Build P...

Eclipse for Python

Eclipse for Python 要在 eclipse 中編譯 Python 其實很容易,只要照著下面步驟操作就可以了。 Step 1 :啟動安裝 Python 外掛 (Plug-in) 。 [Help] -> [Install New Software] Step 2 :加入外掛元件對應站台 [Add] Step 3 :輸入 PyDev 網址 [Location] : http://pydev.org/updates Step 4 :勾選 PyDev 需要更新的元件 [Select All] Step 5 :系統自動搜尋元件的必要安裝 [Next] Step 6 :同意安裝 [I accept] -> [Next] Step 7 : Installing Software [wating…] Step 8 :信任憑證 [Select All] -> [OK] Step 9 :安裝完成,重新啟動 eclipse 讓這次的安裝生效。 [Restart Now] Step 10 :開啟設定外掛程式參數對話框。 [Window] -> [Preferences] Step 11 :設定外掛程式 Pydev 參數。 [Pydev] -> [Interpreter - Python] -> [New] ※ 選擇 C:\Python27\pythonw.exe Step 12 :設定編碼方式為 UTF-8 。 [General] -> [Workspace] -> [Text file encoding] -> Other Utf-8

安裝Python編輯器

安裝 Python 編輯器 安裝方式與 JDK( Java Development Kit) 很像,首先要到 Python 官方網站 (http://www.python.org/download/) 下載 Python 編輯器,如果你也跟我一樣是 Windows 環境,可以下載 Windows x86 MSI Install 版本,如: python-2.7.1.msi 。 安裝到預設路徑 ( C:\Python27\) 就可以了。 最後為了要在命令列模式能夠執行 Python 程式,需要設定系統環境變數。 系統環境變數 Path 加上: ;C:\Python27\;C:\Python27\scripts 這樣就安裝完成了。

安裝Eclipse編輯器

安裝 Eclipse 編輯器 首先要到 Eclipse 官方網站 (http://www.eclipse.org/downloads/) 下載 Eclipse 編輯器, Eclipse 被 IBM 收購之後以開放原始碼的方式提供使用者使用,所以它發展了許多外掛程式,現在我們就要利用它的 Python 外掛編輯器,來開發 Python 程式。 請下載 Eclipse Classic 版本。 檔案 170M B 有點大,等 ……zzzZZZ 。 所下載的檔案 eclipse-SDK-3.6.1-win32.zip 直接解壓縮就可以使用了,沒錯完全不必安裝,但是如果執行時出現下面訊息,請安裝 Java Runtim e , ( http://www.java.com/zh_TW/download/ ) 目前最新版本是 jre-6u23-windows-i586-s.exe , 一樣安裝到預設路徑 (C:\Program Files\Java\jre6) 就可以了。 Eclipse 第一次執行時必須設定工作資料夾,如下圖: 如果你看到下圖,恭喜你 eclipse 安裝成功了。