appcfg.cmd java version; 1.7 installed; 1.6 in path; tells me it needs 1.6 ti yokiad - google-app-engine

I try to use this command to deploy my application to
appspot.google.com:
c:\a\appeng\bin\appcfg.cmd --use_java7 update c:\a\u3e
Generates the error messsage.
C:\a>c:\a\appeng\bin\appcfg.cmd --use_java7 update c:\a\u3e
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.7', but '1.6' is required.
Error: could not find java.dll
Error: could not find Java SE Runtime Environment.
I tried setting the path to use the Java 1.6 SDK we downloaded
but that did not help or change any thing.
The web resources talk about what version of Java is used
by the application once it appears on Google's servers; I
did not see anything about the Java version for the upload
process including developers.google.com/appengine/docs/java/gettingstarted/uploading and developers.google.com/appengine/docs/java/tools/uploadinganapp#Command_Line_Arguments as well as searching this site specifically and checking google.
Can I deploy
an application from the computer in my house without
deinstalling the Java 1.7 I use for other purposes?

Thank you for looking at this question. I resolved the problem. It was not related to Google Application Development
Server. It was a difficult-to-resolve path problem to the directory where the Java executables were kept.

Related

Google App engine Deploy Exception : Cannot get the System Java Compiler. Please use a JDK, not a JRE

Error message :
------------ Deploying frontend ------------
Preparing to deploy:
Created staging directory at: 'C:\Users\JAMESY~1\AppData\Local\Temp\appcfg5730205859174689794.tmp'
Scanning for jsp files.
Compiling jsp files.
java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
Debugging information may be found in C:\Users\James Yang\AppData\Local\Temp\appengine-deploy1938777867658475857.log
I have added
-vm
G:\Jdk8\bin\javaw.exe
in eclipse.ini
and My java_home is G:\Jdk8\bin\
Make sure you have the Java Development Kit (JDK) installed in your computer.
Check if you have Java 8 installed, while trying to compile with Java 7, or viceversa. In other words, check if the JDK is set to the wrong version.
Make sure the JDK is FIRST in your Path, by placing %JAVA_HOME%\bin at the beginning of your Path in your System variables.

GAE: Cannot get the System Java Compiler. Please use a JDK, not a JRE

When trying to deploy my application to the Google App Engine server I get the following error:
Cannot get the System Java Compiler. Please use a JDK, not a JRE.
All solutions I've seen for this involve editing an eclipse configuration file, but I'm not using eclipse. I'm executing appcfg.cmd from the dos prompt. I have a jdk installed and my JAVA_HOME is pointing to it:
c:\program files\java\jdk1.6.0_43
Obviously appcfg.cmd is not looking at JAVA_HOME. It must be getting the JDK location from somewhere else.
Any ideas?
As noted in the comments: Make sure the JDK is FIRST in your PATH.
I had the same issue with appengine sdk 1.8.1 and sts 3.6.4.
I tried adding vm properties to sts.ini file, added %JAVA_HOME% to the beginning of the path variable. But nothing was working as I kept getting the same error.
Cannot get the System Java Compiler. Please use a JDK, not a JRE
Then I found the issue was with Windows\system32\java* file. The appengine was reading the java from Windows\system32.
There were three files.
java.exe
javaw.exe
javaws.exe
I replaced these files from JAVA JDK home as they were from JAVA JRE home during installation. After that, I restarted my sts and everything worked fine as I am able to deploy without issue.

I upgraded the GAE in Eclipse to 1.7.4

My JSP based application now doesn't deploy. I get the following error:
Cannot get the System Java Compiler. Please use a JDK, not a JRE.
Has anyone found a workaround?
It is likely that you are using some Java code in your JSP as a result of which the JDK is needed to compile that.
Here are some points that you can try:
Check that you are using a JDK and not a JRE. In Eclipse, go to Window --> Preferences and then Java --> Installed JREs. If it is pointing to a JRE and not JDK, I suggest you change that. So install a JDK, remove references to the JRE in the settings here and point it to the JDK only.
If you are still getting the exception above, then I suggest to provide the -vmsetting in eclipse.ini which is found in the same folder as your Eclipse executable.

apache-cxf client works with exec-maven-plugin, but not from outside

I am having problems triying to create a WS client in java.
The libraries I'm using is apache-cxf 2.12. This is an old version but I want the web service to be added to a JBoss application that is already running and uses Spring 2.5.6, so this org.apache.cxf version uses same spring version.
But the question is (I know is quite generic, is related to maven, netbeans and apache-cxf)
When I execute my client project (maven proyect) from netbeans, it works sort of Ok.
When I try to run this class with a script (bot windows an linux) it gives me this error:
"Invocation failed with the following: org.apache.cxf.ws.policy.PolicyException: None of the policy alternatives can be satisfied."
Java versions are the same, I've copied all the dependency jar into lib dir and added then to %classpath%
So, what can be different that when I execute my sample program with maven org.codehaus.mojo:exec-maven-plugin:1.2.1:exec it works and it doesn't when I run it with a srcipt? (I have checked all dependencies, java version, ... )
I guess it has to be related to JAX-WS o JCE (Java Cryptography Architecture) initialization.
¿Is there a way to see what %classpath maven is creating when in runs java.exe?
Maven script that works:
JAVA_HOME=D:\\LOCAL\\Java\\jdk1.5.0_15
D:\\LOCAL\\apache-maven-2.0.9\\bin\\mvn.bat
-Dexec.classpathScope=runtime
-DskipTests=true
"-Dexec.args=-Djavax.net.debug=all -classpath %classpath es.webservice.aaTest TESTFILE"
-Dexec.executable=D:\\LOCAL\\Java\\jdk1.5.0_15\\bin\\java.exe
-Dmaven.repo.local=D:\\bsrepo\\.m2 process-classes
org.codehaus.mojo:exec-maven-plugin:1.2:exec
Thanks

Unable to deploy app to App engine

I have a GWT based web application that I have previously uploaded to Appspot.
However now, I am getting this error:
Unable to update:
com.google.appengine.tools.admin.JspCompilationException: Failed to compile jsp files.
at com.google.appengine.tools.admin.Application.compileJsps(Application.java:583)
at com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:434)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:327)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:52)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:400)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:148)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
The application used JDK (not JRE)
There's a JSP file (dummy) on the war file
The application works in hosted mode
Do a clean build first. Alt+P, N in eclipse. If this fails, delete /war/WEB-INF/classes and try again. If this also fails, right click your war folder and select validate; this will tell you if there are any actual errors in your jsp files.
If this fails, your appengine jars may be corrupted. Try unzipping a fresh SDK and using it to deploy.
Also, have you changed java versions recently? Compiling JSPs requires JAVA_HOME points to a JDK, not a JRE. What is the result of echo $JAVA_HOME?
this thread will solve your problem
Cannot get the System Java Compiler. Please use a JDK, not a JRE
Other wise, you need to set your JAVA_HOME to point to your jdk folder and add javaw.exe path in your eclipse.ini

Resources