otak info official Logo   
OTAK.INFO
Personal Blog

Hariyanto Lim

정길상 / 鄭吉祥
Home   Last Posts  
 
Please login to see more topics and discussion categories.
 
goto main category list >> Software programming >> Google App Engine

Title : Setting Eclipse for Google App Engine (GAE) to support JSP
Total Reply : 6
Total View : 6226


Harry
Harry
Total thread: 131
Total reply: 50

Post #121
Setting Eclipse for Google App Engine (GAE) to support JSP
Google App Engine is quite similar to JSP project on Apache Tomcat, so we need to use JSP compliance editor.

Use Eclipse JEE version to support JSP Scriptlet code editor and making debug breakpoint inside JSP Scriptlet file.

I used Eclipse JEE Kepler 64 bits, and install GAE plugin (see detail from https://developers.google.com/appengine/docs/java/tools/eclipse)

For running GAE application inside local host a JRE 1.7 is required but for deploying to real GAE server we need to compile using JDK 1.7, to set Eclipse to use JDK instead of JRE we must changed eclipse.ini file, below is my eclipse.ini file.
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130521-0416
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
C:\Program Files\Java\jdk1.7.0_25\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms40m
-Xmx512m
Please note that "-vm" parameter is before "-vmargs"
Falling in love with the world

Write : 2013-07-18 15:21:11
Last edit : 2013-07-18 15:24:05

Harry
Harry
Total thread: 131
Total reply: 50

Post #122
Force Eclipse to use JDK instead of JRE
Reply #1
Sometime Eclipse use JRE instead of JDK and we got some problem to compile some application.

To change Eclipse to use JDK instead of JRE, we go to Window -> Preferences

Force Eclipse to use JDK instead of JRE
Falling in love with the world

Write : 2013-07-18 15:37:56

Harry
Harry
Total thread: 131
Total reply: 50

Post #123
Add JDK into "Installed JREs" list
Reply #2
In the Eclipse Preferences window, we click "Add"

Add JDK into "Installed JREs" list
Falling in love with the world

Write : 2013-07-18 15:40:00

Harry
Harry
Total thread: 131
Total reply: 50

Post #124
Add new JRE Type
Reply #3
Select "Standard VM" then click "Next"

Add new JRE Type
Falling in love with the world

Write : 2013-07-18 15:40:59
Last edit : 2013-07-18 15:41:04

Harry
Harry
Total thread: 131
Total reply: 50

Post #125
Select installed JDK directory
Reply #4
In the next window popup, we click "Directory" button to select the directory where our JDK is installed, if Eclipse can read the directory properly then it will show the details.

Select installed JDK directory
Falling in love with the world

Write : 2013-07-18 15:42:55

Harry
Harry
Total thread: 131
Total reply: 50

Post #126
Set JDK as default instead of JRE
Reply #5
After we added JDK into "Installed JREs" list, then we select JDK as the default instead of JRE, or we can "Remove" the JRE to avoid future problem.

Set JDK as default instead of JRE
Falling in love with the world

Write : 2013-07-18 15:45:12

Harry
Harry
Total thread: 131
Total reply: 50

Post #127
Restart Eclipse to make effect for the new setting
Reply #6
After restarted, our Eclipse will still shown using "JRE System Library" but we can see that it is actually pointing to our JDK installation folder and there is no error X red circle anymore.

Now we can continue to enjoy coding ^^

Restart Eclipse to make effect for the new setting
Falling in love with the world

Write : 2013-07-18 15:51:18

If you want to create a new reply then please login first.



www.OTAK.INFO
Since 19 January 2007
Page hit : 664,233

Code update 24th June 2013
Brain is a very capable to solve big problems
but requires constant reminders about how to.
peace bird