Sencha Cmd 5 + Java 8 Error

After installing the Java 8 JDK on my Windows build server, I am executing the following error when running the sencha :

 C:\> sencha Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.8', but '1.7' is required. Error: could not find java.dll Error: Could not find Java SE Runtime Environment. 

The Sencha Cmd manual assumes that Java 8 is not yet supported (however, Sencha Cmd works fine on my Mac OS X workstation with Java 8):

Sencha Cmd requires Java Runtime Environment version 1.7 to support all functions ...

I still have JDK 7 installed on the server. Is there a way to force Sencha Cmd to use a different JDK installation? Changing JAVA_HOME and PATH sysenvs does not work, and editing the registry is not an option.

UPDATE: I came across this question where several java.exe files cause the same error (and this is definitely an opportunity here) however maven, ant, tomcat, jenkins and many other Java tools work fine. I saw this error only with Sencha Cmd.

+5
source share
4 answers

To make this a little more specific, I followed the ben tip and created the following sencha.bat file in the installation directory:

 @echo off set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_75 set PATH=%JAVA_HOME%\bin;%PATH% set SENCHA_HOME=%~dp0 java -jar "%SENCHA_HOME%\sencha.jar" %* 

and I renamed the existing sencha.exe to something harmless. Now I can just type "sencha" on the command line without too much fuss. Of course, if you have another younger version of Java 7, you will need to change JAVA_HOME above.

+7
source

My 'Path' environment variable displays 'C: \ ProgramData \ Oracle \ Java \ javapath', which contains 3 shortcuts for the following files from 'C: \ Program Files \ Java \ jre1.8.0_xx \ bin':

  • java.exe
  • javaw.exe
  • javaws.exe

But these files are also present in 'C: \ Windows \ System32'; if you call "java" from this directory, you will have the same error (error: registry key ...) Replacing these 3 files in "C: \ Windows \ System32" with one of "C: \ Program Files \ Java \ jre1.8.0_xx \ bin "; he will solve the problem.

+7
source

Try the following workaround to use the latest SenchaCMD working with JDK8:

  • check the PATH environment variable; especially the correct way to install Java.
  • open a command prompt and go to the sencha-cmd folder
  • to use SenchaCMD just execute the sencha.jar file with java:

      java -jar sencha.jar
    

You should now see all the information about the SenchaCMD-Tool version.

Tested with JDK 1.8.0u25 and SenchaCMD 5.1.0.26 on W7 Prof. x64

+2
source

I had the same thing, it turned out that I needed to update sencha itself. I had extjs 5.1 cmd 5.1.0, downloaded extjs 6.0.1 and tried to update the appench application {new_extjs6_path}. Having received the above error, it turned out that I needed to update cmd to 6.0.1.

0
source

Source: https://habr.com/ru/post/1210421/


All Articles