Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Little help with Google tutorial?(Problems using Eclipse and Google App Engine tutorial)
Little help with Google tutorial? [message #525757] Wed, 07 April 2010 13:09 Go to next message
Eclipse UserFriend
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 Smile 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
Re: Little help with Google tutorial? [message #525845 is a reply to message #525757] Wed, 07 April 2010 20:29 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: Little help with Google tutorial? [message #526414 is a reply to message #526392] Sat, 10 April 2010 12:54 Go to previous messageGo to next message
Eclipse UserFriend
I have the JDK installed, that's how I got the JRE. The part that is eluding me here is that Eclipse is saying my project needs to be "configured to use a jdk" ... but there's no indication HOW to configure it to use the JDK. I suppose this is all patently obvious to experienced Java users ... but to a newcomer, it's certainly not.

Is there a specific menu option/properties dialog that I need to be using to configure my project to use the JDK i have installed?

Thanks,
Dave
Re: Little help with Google tutorial? [message #526420 is a reply to message #526414] Sat, 10 April 2010 14:26 Go to previous messageGo to next message
Eclipse UserFriend
Sat, 10 Apr 2010 12:54:36 -0400, /Dave S/:

> I have the JDK installed, that's how I got the JRE. The part that is
> eluding me here is that Eclipse is saying my project needs to be
> "configured to use a jdk" ... but there's no indication HOW to configure
> it to use the JDK. I suppose this is all patently obvious to experienced
> Java users ... but to a newcomer, it's certainly not.
>
> Is there a specific menu option/properties dialog that I need to be
> using to configure my project to use the JDK i have installed?

First you need to add your JDK to the "Installed JREs" (Window ->
Preferences -> Java -> Installed JREs). The first time you start
Eclipse it probably have just the JRE used to start it, like (on
Windows):

C:\Program Files\Java\jre6

Eclipse doesn't automatically discover JDKs you may have installed
so you need to tell their locations manually. If you have installed
the JDK in "C:\jdk1.6.0_19" - add a JRE specifying this path as home.

If you check the JDK you've added as default you shouldn't need to
configure the project additionally to use it. If you need project
specific settings observe the "Java Build Path" (and probably "Java
Compiler" options) in the project's properties (either right-click
the project -> Properties, or select the project in the
Navigator/Package/Project Explorer and Project -> Properties from
the menus). If you need to change the "JRE System Library" - select
the existing one on the "Libraries" tab of the "Java Build Path"
category, then press the "Edit..." button.

--
Stanimir
Re: Little help with Google tutorial? [message #526438 is a reply to message #526420] Sat, 10 April 2010 22:20 Go to previous message
Eclipse UserFriend
Thank you! This was exactly the step I needed, now my project has no errors and the JSP works.

Thanks!!
Dave
Previous Topic:emf jar compatility with jdk1.4
Next Topic:Help with tomcat and new project on buildpath.
Goto Forum:
  


Current Time: Tue Apr 15 02:56:44 EDT 2025

Powered by FUDForum. Page generated in 0.33422 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top