Stuck again in the JAVA tutorial : Testing the finished sample

136 views
Skip to first unread message

Unesco Iha

unread,
Mar 21, 2016, 2:32:45 PM3/21/16
to Google App Engine
Another question about the JAVA tutorial:

In "Testing the finished sample" in the section 4. Adding Apllication Code and IU, I get the following error:
 
F:\[MY PATH]\guestbook>mvn appengine:devserver
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building guestbook 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> appengine-maven-plugin:1.9.34:devserver (default-cli) > package @ guestbook >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ guestbook ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\Roy\Documents_Roy_Nahas\SIG\IHA\Google Engine\guestbook\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ guestbook ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to F:\Roy\Documents_Roy_Nahas\SIG\IHA\Google Engine\guestbook\target\guestbook-1.0-SNAPSHOT\WEB-INF\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.876 s
[INFO] Finished at: 2016-03-21T14:25:10-04:00
[INFO] Final Memory: 7M/18M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project guestbook: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

How can I correct this? 

Les Vogel

unread,
Mar 21, 2016, 2:45:55 PM3/21/16
to google-a...@googlegroups.com
Have you set your JAVA_HOME variable?  It's necessary for Windows.

Note - you should be using Java 7 for AppEngine, Java 8 works with managed VMs https://cloud.google.com/appengine/docs/managed-vms/


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/8254d301-ebb6-4499-b1c6-209725bf6f2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

  •  
Les Vogel
  •  Cloud Developer Relations
  •  le...@google.com
  •  +1-408-676-7023 

Les Vogel

unread,
Mar 21, 2016, 2:48:02 PM3/21/16
to google-a...@googlegroups.com
I haven't watched this, but it came up 1st when I searched and had an ad on it.
https://www.youtube.com/watch?v=hSs-gZPe8kU  How to install Java 7 on Windows 10

Unesco Iha

unread,
Mar 21, 2016, 2:55:00 PM3/21/16
to Google App Engine

And I have Java 8, but in the tutorial setup, it says:

If you have Java 8, you must specify Java 7 as the source and the target. In Maven, you do this in the pom.xml file for your project, within the maven-compiler-plugin configuration settings:
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <version>3.2</version>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>7</source>
                <target>7</target>
            </configuration>
        </plugin>

Which I did. 

Les Vogel

unread,
Mar 21, 2016, 3:16:59 PM3/21/16
to google-a...@googlegroups.com
Did you actually install the JDK?   The error is suggesting you might have just installed the JRE.

The JDK is a superset of the JRE that includes the compiler and more.


For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Unesco Iha

unread,
Mar 21, 2016, 3:28:20 PM3/21/16
to Google App Engine
I uninstalled Java 8 to install Java 7 and now it works. Thanks!
Reply all
Reply to author
Forward
0 new messages