Packing Apps with built in JRE...

Copper Contributor

I have a couple of applications that I am trying to capture that install their own JRE however after creating the MSIX they complain that the JRE can't be found and suggest setting JAVA_HOME.


Error launching IDEA
Failed to load JVM DLL C:\Program Files\WindowsApps\IntelliJIDEACommunityEdition2016.3.4_163.12024.16.0_x64__p1z46hfsarpje\VFS\ProgramFilesX86\JetBrains\IntelliJ IDEA Community Edition 2016.3.4\jre\jre\bin\server\jvm.dll
If you already have a 32-bit JDK installed, define a JAVA_HOME variable in Computer > System Properties > System Settings > Environment Variables.


The application works fine when installed from original source without an additional JRE installed or a JAVA_HOME Environment Variable set.  The file that can't be found is present in the location that the app is looking for them, I have tried capturing the app both with and without installing to VFS as well as installing to a location without spaces in the target folder structure.  I have also launched the application during the capture phase and for the first use settings.


I have also used the PSF Trace Fixup but all that seems to do is confirm the error message I am getting from the application.


I'm not sure what else I can try or why the app wouldn't be able to find the JRE when it is looking in the correct place.


18 Replies
Hi @AndrewMason....
Is this resovled???? I am also facing this.
Hi @Siva116,

No, this isn’t resolved yet but I have noticed that if you inspect the main EXE with ProcMon you can see that the JRE bin folder and at least one other JRE path is present in the path environment variable for the EXE so it looks like that is created at runtime and the path is correct but it still says the JRE is invalid.

I’m not sure if there is something else missing or if maybe it wants to write somewhere in the JRE location.

Hi @AndrewMason
Thanks for the reply..
While I suspect that there is more at play here, you can use the PSF to provide virtual environment variables like JAVA_HOME as container-specific environment variables (this is the purpose of the EnvVarFixup).

But I'm also guessing that you'll find the need for the registry fixup - you'd need to procmon the the access_denied registry entries --, the FileRedirectionFixup, and possibly DynamicLibraryFixup.

Thanks @TIMOTHY MANGAN.  I have tried the EnvVar fixup but it doesn't seem to have any effect on the behaviour of the app, possible because more than one fix up is needed as you suggest.


Is it possible to set/add to the PATH env var with the EnvVar fix up as that is where the app is adding the "missing" paths at runtime?


The same type of issue faced with one more application "Universal Village Corporate", the source installer of this app automatically prompt us to install JRE 1.6.0, as specified we have installed and bundled JRE along with the main application, also implemented all the fixups suggested by PSF Tool of latest version (psflauncher, FileRedirection,Env fixups), still no luck.. while launching the shortcut it through the attached error "Failed to load jvm.dll (Java VM Library) please make sure of 1.4 or higher is installed". In second attempt I have specified the environment variable JAVA_HOME in to the MSIX package, but still no luck, with one more attempt.. tried to inject Registry and Dynamic Library Fixups too, still it also not working.....

as a part of trouble shooing, used procmon and filted the available outcome with processname psflauncher.exe along with PATH which contains jvm.dll, to check from which location its trying to access the dll file, but with this filter no tasks available in the list...

Could you please help us to resolve these type JAVA pre-req issues.

Thanks in advance.



Reach out to me offline at tmangan @ It would be good to have you send me your package.
Thanks for the reply.
The package is in locked down environment, which can't be sharable from my end. I am giving the name of that app which I faced that Java environment variable issue to reproduce.

Name : UVC
Version : 9.3.0
Author : Universal Village Corporation
I found the installer, and it seems to install natively without a JRE. Can you provide detail on what version JRE you use, and how to test if the app is working?
@AndrewMason - Never mind. I just reread your original post which had at least the first half of that question answered. I'll test it soon and report back.

@Siva116 @AndrewMason 

I have looked into UVC.  It is an odd thing... 

I don't have it working yet, but getting closer.


What I know:

  • DynamicLibraryFixup is needed for a number of dlls..
  • vcruntime140.dll and vcruntime140_1.dll must still be copied to the Program Files\UVC folder (as the app uses fileexists before loadlibrary so DynamicLibraryFixup doesn't help.


The app makes use of FindFirstFile and gets confused.  This is something that I am investigating as a potential edge-case bug in the FileRedirectionFixup.  I'll drop a note back here if fixable.

Thanks for the update @TIMOTHY MANGAN 

Is this resolved now? I also got a package which require (Zulu) Java 1.8 and got the JVM.DLL loading error. Also here i guess the variables are not set, but I can't find the solution to get it working.
There are many problems with this app that will need fixes that are "in progress", however there may be additional unidentified issues.

I can say that if the installer sets a environment variable, then the EnvVarFixup is needed. PsfTooling should automatically detect the need for that fixup if that is the case.
Hi Tim thanks for your response. I tried using the PsfTooling and it did detect the environment needed, but I was not able to get it in my package. I tried manually which also failed....will try again until I get it working ;)


The new version of the free PsfTooling (4.14) is now available in the Microsoft Store or TMurgent website. This includes many important fixes to the PSF that I announced earlier today ( ).  This version solves a number of launching issues that we have been discussing, including PSF Scripting, and the launching of cmd files directly from the launcher.


Of importance for me to point out: The shell launch of a cmd/bat file by PsfLauncher used to drop out of the container and have no access to package files.  This is due to a change made by Microsoft a couple of years ago in the OS.  I found a way to overcome this in the 2021.09.23 PSF version, so that those shortcuts will work as you'd expect now.


I'll also mention that one of the apps with a "crappy java" I was pointed to was the UVC app.  This is a very old Java version which has additional behaviors that the PSF can't cope with today due to unanticipated OS limitations in the container.  Sorry!

Thanks a lot @TIMOTHY MANGAN for the new version of PSF Tool...

@TIMOTHY MANGAN Hi, when using the 4.14 toolbox I do get another psflauncher versions then when I download the psflauncher from the github location (

From the toolbox the size is much much larger and seems not to work with me.

When using the ones from github, the package starts working ;)