0

我没有使用 eclipse,使用 GAE SDK 上传我的项目,问题是当我尝试上传它时使用的是 jre 而不是 jdk,这就是我遇到错误的原因,请帮助我如何强制应用引擎 sdk 改为使用 JDK jre的

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\j1013366\Desktop\social.login.2013\appengine-java-sdk-1.8.0\appengine-j
ava-sdk-1.8.0\bin>appcfg.cmd update apps/SocialLoginProject
Reading application configuration data...
Jun 05, 2013 12:22:45 PM com.google.apphosting.utils.config.AppEngineWebXmlReade
r readAppEngineWebXml
INFO: Successfully processed apps/SocialLoginProject\WEB-INF/appengine-web.xml
Jun 05, 2013 12:22:45 PM com.google.apphosting.utils.config.AbstractConfigXmlRea
der readConfigXml
INFO: Successfully processed apps/SocialLoginProject\WEB-INF/web.xml
Jun 05, 2013 12:22:45 PM com.google.apphosting.utils.config.IndexesXmlReader rea
dConfigXml
INFO: Successfully processed apps\SocialLoginProject\WEB-INF\appengine-generated
\datastore-indexes-auto.xml


Beginning interaction for server default...
0% Created staging directory at: 'C:\Users\j1013366\AppData\Local\Temp\appcfg152
7926604447976257.tmp'
5% Scanning for jsp files.
8% Compiling jsp files.

Error Details:
Exception in thread "main" java.lang.ExceptionInInitializerError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilation
Context.java:238)
        at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilation
Context.java:214)
        at org.apache.jasper.JspC.processFile(JspC.java:1181)
        at org.apache.jasper.JspC.execute(JspC.java:1341)
        at com.google.appengine.tools.development.LocalJspC.main(LocalJspC.java:
40)
Caused by: java.lang.NullPointerException
        at com.google.appengine.tools.development.LocalJspC$LocalCompiler.<clini
t>(LocalJspC.java:53)
        ... 7 more

com.google.appengine.tools.admin.JspCompilationException: Failed to compile jsp
files.
Unable to update app: Failed to compile jsp files.
Please see the logs [C:\Users\j1013366\AppData\Local\Temp\appcfg5225288314554557
20.log] for further information.

C:\Users\j1013366\Desktop\social.login.2013\appengine-java-sdk-1.8.0\appengine-j
ava-sdk-1.8.0\bin>
4

1 回答 1

0

就我个人而言,我有意将其设置为通过将 appcfg.cmd 修改为从 SDK 中使用 JRE

"%JAVA_HOME%\bin\java" -Djava.home="%JAVA_HOME%\jre" -Xmx1100m -cp "%~dp0\..\lib\appengine-tools-api.jar" com.google.appengine.tools.admin.AppCfg %*

并将 JAVA_HOME 设置为指向 JDK。

我猜你可以修改-Djava.home="%JAVA_HOME%\jre"指向你喜欢的任何地方。

于 2014-01-14T07:54:28.393 回答