我在将Java应用部署到App Engine时遇到了这个问题:
无法更新应用程序:无法获取系统Java编译器。请使用JDK而不是JRE。
请参阅部署控制台以获取更多详细信息
无法更新应用程序:无法获取系统Java编译器。请使用JDK而不是JRE。
这很荒谬,因为我已经在安装的JRE中设置了jdk1.7,如下图所示:
在日志文件中,可以找到调试信息:C:\Users\AppData\Local\Temp\appengine-deploy3218365179732638698.log
Unable to update:
java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
at com.google.appengine.tools.admin.Application.compileJavaFiles(Application.java:904)
at com.google.appengine.tools.admin.Application.compileJsps(Application.java:892)
at com.google.appengine.tools.admin.Application.populateStagingDirectory(Application.java:687)
at com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:629)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:569)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:58)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:433)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:158)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
有什么问题吗?
这是我的eclipse.ini
文件。
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Program Files (x86)\Java\jdk1.7.0_79\bin
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m