Hi,

I had sent in a question in January about the jpackage (see below link and 
email). Due to issues with our email filtering service I did not see the 
response and wandered upon it last night. So apologies in advance for such a 
long time between messages, I am now a subscriber and hopefully the email 
filtering issue is fixed properly by IT.

I'm experimenting with build 49 of jpackage in the JDK 13 EA. I'm still not 
sure if what I want to do is currently possible. I would like to execute 
"jpackage create-app-image" with all my info for a non-modular application 
image (input, output, name, icon, jar, main class). I would then like to move 
the cfg and jar up one directory so that the applauncher.dll, cfg, exe, ico and 
jar are all in the same folder. Then rename the cfg and exe, we have a standard 
exe name that I don't want to be used by windows as the app name (this all 
works fine as is as long as the cfg and exe names match). If I'm able to 
reorder the generated files from create-app-image, I can install our native 64 
bit C++ apps in the same folder and share the 64 bit dll's between all the C++ 
and Java applications. Lots of moving parts, hopefully the layout is clear in 
my initial message, I've had a hell of a time explaining this to my coworkers.

One thing I wanted to clarify from the previous thread is that we do not use 
the installer portion of javapackager, we use a different installer, with 
javapackager we just use the "-native image" option. I would like to also note 
that we have a fairly large install which has about 50 executables that are 
installed, including 6 java applications, so minimizing duplication helps save 
space and install time.

We are also in the process of porting several dozen more of these applications 
to 64 bit which makes that issue a little more important to sort out.

Previous thread: 
https://mail.openjdk.java.net/pipermail/core-libs-dev/2019-January/057775.html



Thanks again for any help, much appreciated!



interesting ...



I would think I would want to do this by first building the app image,

then moving the pieces around before building the installer.



But that doesn't work:



1.) the installer expects to find a "runtime" sub-directory of the

app-image directory.  This could be considered a bug, and I will fix it,

but it can be worked around by creating an extra empty "runtime" subdir

in the app image.



2.) the installer needs to find the app itself (for installing shortcuts

to it).  When using an app-image it determines the app name by looking

for a cfg file in the "app" sub-directory of the app-image.  Then given

the name, it looks for executable and ico of that name in the top level

app-image directory.



I suspect I could work around even that by using drop-in resources with

the new --resource-dir arg but not sure.  I will look into it and get

back to you. (this is significantly different since JDK-8215515

<https://bugs.openjdk.java.net/browse/JDK-8215515> , so even if I can

work around this in that way - you would have to wait for the next EA drop).



The bigger question is should there be some way to express the install

root differently from the app root ?



/Andy

Original Email Below
--------------------------------

We are currently using JDK 10 with javapackager and have looked at the Early 
Access build available for the jpackage enhancement. We have a question about 
an issue we are currently experiencing with javapackager, which appears to have 
the same behavior in jpackage.

Background:

In our install we have several 32 bit C++ applications, some 64 bit C++ 
applications and 64 bit JDK 10 Java applications. The 64 bit C++ and Java 
applications both use a set of C++ DLLs. This has forced us to place the 64 bit 
C++ applications in the app folder that the javapackager creates. Jpackage 
appears to create the same app folder.

Our folder structure is outlined below. The executable generated by 
javapackager appears to be hardcoded to use the app/*.cfg files. We would like 
the ability to place the contents of the app folder directly in our bin64 
folder along with the exe and ico that are generated.

Install / bin64 / app / native64.dll
Install / bin64 / app / cpp64bitapp.exe
Install / bin64 / app / javaapp.jar
Install / bin64 / app / javaapp.cfg
Install / bin64 / javaapp.exe
Install / bin64 / runtime <-- JRE 10 runtime
Install / native.dll
Install / cpp32bitapp.exe

Question:
Is it possible for us to rename or change the app folder, or to place the 
contents of the app folder in the parent directory?


Andrew Auclair
Software Engineer
Tactical Communications Group
A Curtiss-Wright Company
2 Highwood Drive, Building 2, Suite 200
Tewksbury, MA  01876-1157

Direct: 978-654-4849   Fax: 978-654-4801
www.g2tcg.com<http://www.g2tcg.com/>

Reply via email to