Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 2

Error: Could not create the Java Virtual Machine, extensions mechanism no longer supported

Hello.  I am using InstallAnywhere 2020 SP1 to create a silent windows deployment package for work.  What I'm trying to do:

  • We have a software suite of 2 java-based applications running
  • They're programmed to utilize c:\jre and both applications run using that Java install
  • One of those programs can receive updates (in a .jar format) and apply them (\jre\bin\java -jar application_name.jar).
  • I've built an exe file in InstallAnywhere that does the following:
    • kills the applications
    • renames \jre to \jre8 and replaces with a new \jre folder (the new application upgrade requires java 11
    • installs the new applications
      • running a script that includes \jre\bin\java -jar app_name.jar and this time it's running from the java 11 jre instead of 8
    • Changes some properties
    • reboots

This so, an app running on Jre 8 pulls down a new upgrade jar (which includes an install.bat and an upgrade.exe made in installanywhere). When the jar runs, it launches the install.bat, which calls the upgrade.exe.  In that upgrade.exe, all the moving/replacing files, properties within files, backing up the old app directories, renaming the old jre directory and putting the new one in place, all of the stuff it's supposed to do works. However, when using Execute Script/Batch file action, and the script has only:
cd \directory_with_application_update_jar\
\jre\bin\java -jar app_name.jar

It is failing.  If I open a command prompt and run this command it works just fine, and it is being called correctly.  However, when the InstallAnywhere-created exe tries to run it, I get this error:

C:\install_dir\>\jre\bin\java.exe -jar app-upgrade.jar

<JAVA_HOME>/lib/ext exists, extensions mechanism no longer supported; Use -classpath instead.

.Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.

There is no JAVA_HOME set on these registers (on purpose), and since it works when not called from the exe file, I'm thinking InstallAnywhere is the culprit, but I can't find any way to get this command to run successfully.  Not sure if it's because it was initially launched from an app running on jre8, that then java -jar'd the package, which ran a .bat script, that runs the exe...and all that started on something running JRE8 and the exe correctly renames that folder (from jre to jre8) and replaces it with an 11 \jre directory without any errors saying it's in use, since we killed all applications running on it.  

Any suggestions?  I have never seen that error like shown above before, and googling it revealed no results.  Thanks for any help!

0 Kudos
(1) Reply

What is the current size of the Java heap that you have? it can be  in InstallAnywhere.lax file,[size][size]

0 Kudos