2

After upgrading the java to version 17, I have to install the sencha 7.8 version. But in compare with other versions there is no way to choose Sencha CMD with jre included or not. So the versions WIndows and Mac work properly, but the LINUX says:

No suitable Java Virtual Machine could be found on your system.
The version of the JVM must be 1.8.
Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.

Does anyone know what should we do here?

1

2 Answers 2

3

Sencha CMD Linux never shipped with embedded JRE.

If you have a support contract, please open a ticket with Sencha so that they are aware that more users have issues with that.

By analyzing their script I found that it is sufficient to install e. g. OpenJDK 8. It doesn't even have to be in the path, neither in JAVA_HOME, Sencha searches for it at the "usual" places.

I was also successful with export app_java_home=$JAVA_HOME, where JAVA_HOME points to my Java 17+, when no JDK 8 is installed. This essentially skips all searches and checks for Java in the install and run script. Installation and basic usage works, but I didn't try to build with this.

In my view this is a regression over Sencha Cmd 7.7, which at least supported Java 11 fully.

0

i wrote a script to set the JAVA_HOME and path to include the correct jvm.

 #!/usr/bin/bash

JAVA_HOME_21=/home/orderpt/software/jdk21
JAVA_HOME_17=/home/orderpt/software/jdk17
JAVA_HOME_8=/home/orderpt/software/jdk8


if [ $1 == '21' ]
then
        echo 21
        JAVA_HOME=$JAVA_HOME_21
        PATH=`echo $PATH | sed -e "s|$JAVA_HOME_21/bin:||g" | sed -e "s|$JAVA_HOME_17/bin:||g" |sed -e "s|$JAVA_HOME_8/bin:||g"`

elif [ $1 == '17' ]
then
        echo 17
        JAVA_HOME=$JAVA_HOME_17
        PATH=`echo $PATH | sed -e "s|$JAVA_HOME_21/bin:||g" | sed -e "s|$JAVA_HOME_17/bin:||g" |sed -e "s|$JAVA_HOME_8/bin:||g"`
elif [ $1 == '8' ]
then
        echo 8
        JAVA_HOME=$JAVA_HOME_8
        PATH=`echo $PATH | sed -e "s|$JAVA_HOME_21/bin:||g" | sed -e "s|$JAVA_HOME_17/bin:||g" |sed -e "s|$JAVA_HOME_8/bin:||g"`
fi


PATH=$JAVA_HOME/bin:$PATH

echo $JAVA_HOME
echo $PATH

you pass in the jdk you want to use, ie 8 17 or 21.

you run this in your shell with a dot so like this: . setjdk 17 This will update your path and JAVA_HOME.

or

you can run with sencha command like this:

source setjdk 17 && sencha app build production

Of course you can write a script that will run sencha command like this.

Not the answer you're looking for? Browse other questions tagged or ask your own question.