Home » Language IDEs » Java Development Tools (JDT) » Little help with Google tutorial?(Problems using Eclipse and Google App Engine tutorial)
|
Re: Little help with Google tutorial? [message #525845 is a reply to message #525757] |
Wed, 07 April 2010 20:29   |
Eclipse User |
|
|
|
Dave S wrote:
> Hi - very new to Java here. Trying to get started with Google's app
> engine, using Galileo. The Getting Started tutorial has gone fine, until
> I got to the step of trying to add a JSP to the project.
> Eclipse now gives me this error in my project:
>
> Your project must be configured to use a JDK in order to use JSP's
>
> I'm at a loss on all these TLA's :) I don't know what a JDK is. I've
> installed everything the Google tutorial said to install, as far as I know.
>
> The JSP I've created is shown on this google page: (I've tried creating
> it both by hand, and within Eclipse, same error)
>
> http://code.google.com/appengine/docs/java/gettingstarted/us ingjsps.html
>
> Any ideas how I configure my project to make Eclipse happy?
>
> Thanks!
> Dave
>
The eclipse.newcomer newsgroup might be a better forum for this question. But
since you're here: "JDK" stands for Java Development Kit. That's as opposed to
"JRE" or Java Runtime Environment. Basically, the JRE contains the bare minimum
you need to _run_ Java apps; the JDK contains the bare minimum you need to
_create_ them, including a compiler, and (more to the point) some tools for
working with JSPs. The JDK is a superset of the JRE. It's common for
developers to have several different versions of the JDK installed, so that you
can target your applications to different runtime environments, as well as
having a JRE installed and on the path so that you can run your own incidental
Java applications.
So, you need to download and install a JDK (probably from Sun); then, you need
to tell Eclipse where it is, by going into the Java preferences dialog that lets
you specify which JRE you're using.
Don't get confused between the JRE that you use to run Eclipse with (since
Eclipse is written in Java, to run it you need a JRE) and the JRE or JDK that
you compile against and use to run the apps you're developing. The former is
specified either on the path, the command line, or (best) in the eclipse.ini
file. The latter is specified in the JRE preferences (for compilation) and in
the Launch Configurations (for launching your apps).
|
|
|
Re: Little help with Google tutorial? [message #526284 is a reply to message #525845] |
Fri, 09 April 2010 09:44   |
Eclipse User |
|
|
|
Thank you so much for the info. Conceptually, everything you said makes sense. Where I still have a disconnect is that I've gone through many, many dialogs in Eclipse, and so far have been unable to match up the nomenclature you used to any specific dialogs/settings where I'm permitted to specify the path to my JDK, that doesn't already have it.
The best suspects I can locate are:
Run | Run Configurations ... (JRE tab), as well as the matching Run | Debug Configurations. Both of these JRE tabs show "Project JRE (jre6)" as selected - so apparently it knows I'm on 6, and that it's located where the project specifies.
Then there's also the Properties for my project, on the Java Build Path item, the Libraries tab. This also lists JRE 6, and shows its paths. (Indeed, the project tree itself contains a node called "JRE System Library [jre6]" which contains nodes such as resources.jar, rt.jar, etc, each with a path.)
So I'm not sure which, if any, of these is the "Java Preferences dialog" you mention ... but the Problems tab continues to say that my project must be configured to use a JDK, even though my one and only JRE seems to be listed everywhere.
The other thing I've tried is to right click the error, and use the Quick Fix item. The Quick Fix it suggests is to "Select a JDK-based 'JRE System Library' for your project" Sounds right to me! So I press Finish and am taken to the Properties dialog for my project, with Java Build Path listed on the left, the Order and Export tab selected on the right, and there, in plain sight, is "JRE System Library [jre6]" listed and checked. It's the 3rd item in that list, coming after "Rewards/src" (my project is named Rewards), and "App Engine SDK [App Engine - 1.3.2]". Again, it seems to know about my JRE.
Thanks again for any help!
Dave
P.S. I considered moving this thread to the newcomers area, but wasn't sure how things are done on this board.
|
|
|
Re: Little help with Google tutorial? [message #526392 is a reply to message #526284] |
Sat, 10 April 2010 03:42   |
Eclipse User |
|
|
|
Dave S wrote:
> Thank you so much for the info. Conceptually, everything you said makes
> sense. Where I still have a disconnect is that I've gone through many,
> many dialogs in Eclipse, and so far have been unable to match up the
> nomenclature you used to any specific dialogs/settings where I'm
> permitted to specify the path to my JDK, that doesn't already have it.
>
> The best suspects I can locate are:
>
> Run | Run Configurations ... (JRE tab), as well as the matching Run |
> Debug Configurations. Both of these JRE tabs show "Project JRE (jre6)"
> as selected - so apparently it knows I'm on 6, and that it's located
> where the project specifies.
>
> Then there's also the Properties for my project, on the Java Build Path
> item, the Libraries tab. This also lists JRE 6, and shows its paths.
> (Indeed, the project tree itself contains a node called "JRE System
> Library [jre6]" which contains nodes such as resources.jar, rt.jar, etc,
> each with a path.)
>
> So I'm not sure which, if any, of these is the "Java Preferences dialog"
> you mention ... but the Problems tab continues to say that my project
> must be configured to use a JDK, even though my one and only JRE seems
> to be listed everywhere.
>
> The other thing I've tried is to right click the error, and use the
> Quick Fix item. The Quick Fix it suggests is to "Select a JDK-based 'JRE
> System Library' for your project" Sounds right to me! So I press Finish
> and am taken to the Properties dialog for my project, with Java Build
> Path listed on the left, the Order and Export tab selected on the right,
> and there, in plain sight, is "JRE System Library [jre6]" listed and
> checked. It's the 3rd item in that list, coming after "Rewards/src" (my
> project is named Rewards), and "App Engine SDK [App Engine - 1.3.2]".
> Again, it seems to know about my JRE.
>
> Thanks again for any help! Dave
>
> P.S. I considered moving this thread to the newcomers area, but wasn't
> sure how things are done on this board.
>
>
It sounds like your "one and only JRE" is a JRE, not a JDK. (Remember from my
previous post: the JDK is a superset of the JRE.) You may need to install a
JDK, if you don't currently have one.
|
|
| | | |
Goto Forum:
Current Time: Wed Mar 19 13:20:39 EDT 2025
Powered by FUDForum. Page generated in 0.04075 seconds
|