Re: RFR: 8286122: [macos]: App bundle cannot upload to Mac App Store due to info.plist embedded in java exe

2022-05-12 Thread Scott Palmer
> On May 12, 2022, at 8:10 AM, Michael Hall wrote: > >  > >> >> My primary suggestion would to be to use an UUID for the unique ID. They are >> of fixed length, are for all intents and purposes unique and you can conjure >> them up from your hat. (An alternative is that the user needs to

Re: [External] : Re: What causes java.lang.InternalError: platform encoding not initialized ?

2021-09-22 Thread Scott Palmer
/utils/fetchurl/ 3988 Wed Sep 22 11:10:30 EDT 2021 io/m3si/utils/fetchurl/Main.class 1000 Wed Sep 22 11:10:30 EDT 2021 io/m3si/utils/ClassLoaderUtils$Agent.class 4613 Wed Sep 22 11:10:30 EDT 2021 io/m3si/utils/ClassLoaderUtils.class I extracted MANIFEST.MF just to be sure … Manifest-Vers

Re: [External] : Re: What causes java.lang.InternalError: platform encoding not initialized ?

2021-09-22 Thread Scott Palmer
Sorry That last build with the Oracle OpenJDK needed the build file changed to have vendor = JvmVendorSpec.ORACLE as well as the command line property pointing to the path to the jdk, Scott > On Sep 22, 2021, at 10:24 AM, Scott Palmer wrote: > > I reproduced it with t

Re: [External] : Re: What causes java.lang.InternalError: platform encoding not initialized ?

2021-09-22 Thread Scott Palmer
m it > causes first. > > /Andy > > On 9/21/2021 12:12 PM, Andy Herrick wrote: >> I thought I could create a reproduction scenario by using an app with >> "-splash:" arg then moving the jre as you did, but I have not >> yet been able make it fail. &g

Re: [External] : Re: What causes java.lang.InternalError: platform encoding not initialized ?

2021-09-21 Thread Scott Palmer
I’ve uploaded a project that reproduces the problem to JDK-8274087 <https://bugs.openjdk.java.net/browse/JDK-8274087> Regards, Scott > On Sep 21, 2021, at 3:49 PM, Scott Palmer wrote: > > I have discovered that I have to have my Java Agent configured in the .cfg > fil

Re: [External] : Re: What causes java.lang.InternalError: platform encoding not initialized ?

2021-09-21 Thread Scott Palmer
> On Sep 21, 2021, at 12:12 PM, Andy Herrick wrote: > > I thought I could create a reproduction scenario by using an app with > "-splash:" arg then moving the jre as you did, but I have not yet > been able make it fail. > > /Andy > > On 9/21/2021 11:43 AM, Sc

Re: [External] : Re: What causes java.lang.InternalError: platform encoding not initialized ?

2021-09-21 Thread Scott Palmer
> On Sep 21, 2021, at 11:40 AM, Alan Bateman wrote: > > On 21/09/2021 15:54, Andy Herrick wrote: >> >> I found the problem in >> open/src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp >> >> we call SetDllDirectory() with the path to the bin dir in the default >> runtime

Re: What causes java.lang.InternalError: platform encoding not initialized ?

2021-09-21 Thread Scott Palmer
owing experiment: > > manually edit the cfg file line: > > app.runtime=$APPDIR\..\my_own_folder\where_the_jre_is_deeper\jre > > to contain the canonical path to > ...\my_own_folder\where_the_jre_is_deeper\jre > > and try again ? > > > /Andy > > On 9/20/2021 5:37 PM,

What causes java.lang.InternalError: platform encoding not initialized ?

2021-09-20 Thread Scott Palmer
This is likely not the right place to ask this (sorry).. but I'm trying to get info to write a bug report and want to make sure I'm not doing something stupid first. I've created a JRE image from JDK 17 with jlink. I've made an application image with jpackage. I've moved the default location of

Re: Proposal to add JavaScript platform to jpackage

2021-04-24 Thread Scott Palmer
This doesn’t seem like something that should be the job of jpackage. The jpackage tool is currently used for producing platform-specific packages or installers targeted at end-users that include native launchers and a JRE. Web-based applications are an entirely different beast. This seems

Re: jpackage: support for environment variables in --java-options

2020-09-03 Thread Scott Palmer
> On Sep 3, 2020, at 8:55 AM, Michael Hall wrote: > > > >> On Sep 3, 2020, at 7:12 AM, Scott Palmer > <mailto:swpal...@gmail.com>> wrote: >> >> >> >>> On Sep 3, 2020, at 4:26 AM, Michael Hall >> <mailto:mik3h...@gmail.c

Re: jpackage: support for environment variables in --java-options

2020-09-03 Thread Scott Palmer
> On Sep 3, 2020, at 4:26 AM, Michael Hall wrote: > > > >> On Sep 2, 2020, at 10:07 PM, Scott Palmer > <mailto:swpal...@gmail.com>> wrote: >> >> There is already a way to supply a custom Info.plist. >> That can have the LSEnvironment entrie

Re: jpackage: support for environment variables in --java-options

2020-09-02 Thread Scott Palmer
t 1:20 PM, Michael Hall wrote: > > > >> On Sep 2, 2020, at 12:14 PM, Scott Palmer wrote: >> >> If your app need to use environment variables to configure something for >> runtime it is probably best to have your own stub launcher and launch a >> sub-proc

Re: jpackage: support for environment variables in --java-options

2020-09-02 Thread Scott Palmer
If your app need to use environment variables to configure something for runtime it is probably best to have your own stub launcher and launch a sub-process. It can be tricky to have a smooth user experience with that though. You would want to avoid an extra icon in the dock/start bar. You

Re: jpackage: support for environment variables in --java-options

2020-09-01 Thread Scott Palmer
> On Sep 1, 2020, at 5:22 PM, Michael Hall wrote: > >  >> >> >>> Is there a way to pass values from environment variables when using >>> --java-options? >>> >>> It would be nice to be able to write something like this: >>> --java-options "-DmyAppData=$HOME/.myData" >>> >>> (Instead of

Re: RFR: JDK-8244634:, LoadLibraryW failed from tools/jpackage tests after JDK-8242302

2020-05-12 Thread Scott Palmer
I think that sorry if things is usually handled in an “Application Manifest” on Windows https://docs.microsoft.com/en-us/windows/win32/sbscs/application-manifests Scott > On May 12, 2020, at 8:33 AM, Kevin Rushforth > wrote: > > Is there a way you can link the launcher (e.g., something

Re: RFR(S): 8242848: Improve performance of InflaterOutputStream.write()

2020-04-22 Thread Scott Palmer
Typo in the benchmark javadoc: “avarage” instead of “average" > On Apr 22, 2020, at 4:47 PM, Claes Redestad wrote: > > > > On 2020-04-22 22:08, Volker Simonis wrote: >> http://cr.openjdk.java.net/~simonis/webrevs/2020/8242848.02/ >> Notice that this new version only changes the

Re: jpackage current status

2020-02-21 Thread Scott Palmer
It's included as a preview feature, so it's still incubating. On Fri, Feb 21, 2020 at 10:24 AM Michael Hall wrote: > If I look at the jpackage page… > > The jpackage tool has been integrated into the JDK, and is now included in > JDK 14 early access builds. > > The normal early access page now

Re: jpackage runtime binaries

2020-02-18 Thread Scott Palmer
I’m using jlink to build my own runtime for exactly this reason. My app needs to launch Java sub-processes, so it needs to be able to find the java executable. Scott > On Feb 18, 2020, at 1:10 PM, Michael Hall wrote: > > I was wondering if there is any way to include java executable

Re: New issues in notarization of jpackage-created Mac applications

2020-02-08 Thread Scott Palmer
See https://bugs.openjdk.java.net/browse/JDK-8235687 I noticed this was recently discussed on the OpenJDK email list. Scott > On Feb 8, 2020, at 11:06 PM, James Elliott wrote: > > As I noted earlier on this mailing list, until this past week I had been > successfully notarizing Mac disk

Re: jpackager

2019-12-15 Thread Scott Palmer
Welcome to Windows. The .exe is a Windows app not a Console app. This is a distinction that only Microsoft seemed to think was needed. All other platforms are sane. There is command line option to make a console app. --win-console Scott > On Dec 14, 2019, at 12:22 PM, Thomas Vatter

Re: Class-Path (in jar file) semantics different between Java 11 and 13 (on Windows)?

2019-11-20 Thread Scott Palmer
/C:/blah... is “root relative”. The (old) spec says the URL must be "relative to the code base". What does "code base" mean when not referring to Applets or RMI? This seems like a bad idea (security hole) that worked by accident. Scott On Wed, Nov 20, 2019 at 10:00 AM Alan Bateman wrote: >

Re: jpackage on MacOs: app from pkg cannot write files and create directories inside itself

2019-09-09 Thread Scott Palmer
You should never write inside an application bundle. (Thank the malware writers for these restrictions.) On macOS your writable files should go somewhere under /Library/Application Support/ or ~/Library/Application Support/ On Windows you should write to somewhere under %ProgramData%,

Re: Comments on jpackage (JEP 343)

2019-09-05 Thread Scott Palmer
I use a very similar workflow, but I’m building for all platforms. I want the image to produce a simple zipped version of the app, and I want all the installer/bundles/packages as well. I also agree with all of the “would be nice to haves” - Particularly service/daemon support. I also agree

Re: jdk-14-jpackage+1-33 on jdk.java.net

2019-08-27 Thread Scott Palmer
Unless you added the --win-console option, I think this is expected. Windows has a rather silly concept of console vs. window applications. To avoid a console window popping up when you don’t expected it, the default launcher is in ‘window’ mode, not ‘console’ mode. You need to know which

Re: Mechanism to maintain backwards compatibility when moving classes to different packages

2019-07-02 Thread Scott Palmer
Not worth it. How will package level access be affected? How can this be exploited? How will it affect security and signing when things from the same package aren’t *really* from the same package? Now that the recommendation is to bundle a JRE with your application, that kind of backwards

Re: JPackage application image file system layout

2019-07-01 Thread Scott Palmer
> On Jul 1, 2019, at 2:47 AM, Robert Lichtenberger > wrote: > > While trying to update our application to the (ea-version of) jpackager I > noticed that the executable files are now in a bin/ subdirectory, which > will make the application update from javapackager a real pain. > > For Linux

Re: JPackage EA build 8 ( jdk-14-jpackage+1-8 )

2019-06-27 Thread Scott Palmer
> On Jun 27, 2019, at 4:29 PM, Andy Herrick wrote: > > > > On 6/27/2019 4:07 PM, Scott Palmer wrote: >> I also just noticed that "--icon" is not allowed with "--package-type msi" >> when creating the msi using --app-image. It should be, unl

Re: JPackage EA build 8 ( jdk-14-jpackage+1-8 )

2019-06-27 Thread Scott Palmer
On Wed, Jun 26, 2019 at 2:39 PM Andy Herrick wrote: > > > On 6/25/2019 1:44 PM, Scott Palmer wrote: > > I just tried this out. One thing that has changed since my last testing > was the “create-installer” vs “--package-type” parameter. > > > > “--package-type a

Re: JPackage EA build 8 ( jdk-14-jpackage+1-8 )

2019-06-25 Thread Scott Palmer
I just tried this out. One thing that has changed since my last testing was the “create-installer” vs “--package-type” parameter. “--package-type all” isn’t allowed. If I want to create .rpm and .deb, or .exe. and .msi, do I need to run twice now? Maybe this could be a comma separated list

Re: jpackage DMG creation trouble

2019-06-13 Thread Scott Palmer
DMG isn’t an installer type. The common thing would be for the Application Bundle to be wrapped in a DMG for distribution, or if a Package is needed, that would be wrapped in the DMG instead. Creating the DMG wrapper is independent of the kind of “installer” . On Mac this means no installer -

Re: JEP 343: Packaging Tool

2019-06-05 Thread Scott Palmer
A couple comments inline... > On Jun 5, 2019, at 5:16 PM, mark.reinh...@oracle.com wrote: > > I saw that you moved JEP 343 to “Proposed to Target,” so I spent a > couple of hours looking at it. You’ve made good progress but I don’t > think this is in the “nearly finished” state that we ask of

Re: RFR: JDK-8212780: JEP 343: Packaging Tool Implementation

2019-05-02 Thread Scott Palmer
Ideally the wix code should be generated by running the heat.exe tool on the application image. Scott > On May 2, 2019, at 5:08 PM, Andy Herrick wrote: > > Alexey: > > Please file Bugs for these two issues. > > /Andy > > >> On 5/2/2019 1:49 PM, Alexey Semenyuk wrote: >> Some findings: >>

Re: Proposal: JDK-8148917 Enhanced-For Statement Should Allow Streams

2019-03-06 Thread Scott Palmer
I don’t mean any offence, but I have to say, I strongly disagree with nearly everything you’ve written below. To me, the idea of making a stream of integers for a simple loop counter is hackish, confusing, verbose, and basically abusing the stream concept. The only part I agree with is that it

Re: jpackage OS X Classes directory

2019-01-19 Thread Scott Palmer
I don’t see the need. Can’t you just include whatever files you want in the application image? Scott > On Jan 19, 2019, at 9:41 AM, Michael Hall wrote: > > Going back to old legacy application building code on OS X the original OS X > port project came up with AppBundler. That had included a

Re: Jpackage Windows shortcuts

2019-01-18 Thread Scott Palmer
For there record, a reboot fixed my uninstall issues. Scott > On Jan 18, 2019, at 1:18 PM, Scott Palmer wrote: > > Add/Remove programs is called Apps & Features now, I guess. So we are in > the same place. I’m going to reboot, as I have a Windows update to install > any

Re: Jpackage Windows shortcuts

2019-01-18 Thread Scott Palmer
ing upgrade? > <https://bugs.openjdk.java.net/browse/JDK-8214564> > > (You might already be able to tell Windows isn't my main platform, only > having to use it for this! ;-) ) > > -- > Rachel > > On 17/01/2019 16:21, Scott Palmer wrote: >> Note that the

Re: Compact Number Formatting and Fraction Digits

2019-01-17 Thread Scott Palmer
raction digits to 1 does. Scott > >> Am Do., 17. Jan. 2019 um 19:15 Uhr schrieb Scott Palmer : >> >> >> On Jan 17, 2019, at 12:42 PM, Gunnar Morling wrote: >> >>>> this could be a good value add to introduce an API [...] >>> >>&g

Re: Compact Number Formatting and Fraction Digits

2019-01-17 Thread Scott Palmer
ve that there's no fraction digit(s) in case of > trailing 0s. Yes it does. I just tried. Don’t set a minimum fraction digits, since you don’t actually want a minimum. Scott > >> Am Do., 17. Jan. 2019 um 15:50 Uhr schrieb Scott Palmer : >> >> Wouldn’t t

Re: Jpackage Windows shortcuts

2019-01-17 Thread Scott Palmer
<https://bugs.openjdk.java.net/browse/JDK-8217331> and will address. > > /Andy > > On 1/17/2019 10:37 AM, Scott Palmer wrote: > > I'm creating a MSI installer. My application name did have spaces in it. I > can confirm that changing the --name parameter to something without spaces > av

Re: Jpackage Windows shortcuts

2019-01-17 Thread Scott Palmer
ons on Windows 7 are > working for me. Shortcuts are created as expected when running either > the exe or msi installer generated. > > Can you share the full OS version and full command you use , perhaps > some combination of options is not working. > > /Andy > > > O

Re: Compact Number Formatting and Fraction Digits

2019-01-17 Thread Scott Palmer
Wouldn’t this be accomplished with setMaximumFractionDigits(1) ? > On Jan 17, 2019, at 5:13 AM, Nishit Jain wrote: > > Hi Gunnar, > > Currently there is no way to obtain the below expected behavior (to get 1K) > when min fraction digit is set to non-zero value. I think that is not even >

Jpackage Windows shortcuts

2019-01-16 Thread Scott Palmer
Are the flags to create shortcuts in the start menu and on the desktop supposed to be working at this point? I tried them and they had no effect. Scott

Re: jpackage custom resources not found

2019-01-15 Thread Scott Palmer
> On Jan 15, 2019, at 11:43 AM, Michael Hall wrote: >> On Jan 15, 2019, at 10:35 AM, Andy Herrick wrote: >> On 1/15/2019 11:25 AM, Michael Hall wrote: On Jan 15, 2019, at 10:19 AM, Andy Herrick wrote: On 1/15/2019 11:04 AM, Michael Hall wrote: > java -version > openjdk

Re: Modular Applications - Regression

2019-01-14 Thread Scott Palmer
-- > http://bernd.eckenfels.net > > > Von: core-libs-dev im Auftrag von > Scott Palmer > Gesendet: Montag, Januar 14, 2019 8:16 PM > An: Alan Bateman > Cc: core-libs-dev > Betreff: Re: Modular Applications - Regression > > > >> On

Re: Modular Applications - Regression

2019-01-14 Thread Scott Palmer
> On Jan 14, 2019, at 10:33 AM, Alan Bateman wrote: > > On 14/01/2019 15:03, Scott Palmer wrote: >> : >> >> Does this not require ALL dependencies - down the entire dependency chain, >> including every transitive dependency, to be 100% modular? > Look

Modular Applications - Regression

2019-01-14 Thread Scott Palmer
Hi, I’ld like to confirm something, because I see suggestions to “build X as a modular app” or “build as a modular jar” and I’m wondering if I’m missing something. These options don’t seem to be practical for most applications. Does this not require ALL dependencies - down the entire

Re: latest changes in java.lang.Class

2018-12-30 Thread Scott Palmer
The string concatenation nested in the append argument is also strange. Won’t javac make an new StringBuilder to handle that? And single character appends should be done with chars ‘.’ not strings “.” Scott > On Dec 30, 2018, at 7:16 AM, Andrew Luo > wrote: > > Stream.of should not be used

Re: jpackage EA Build 0

2018-12-19 Thread Scott Palmer
If the main jar is in a subfolder the .cfg file is written incorrectly leading to: Error: Could not find or load main class Caused by: java.lang.ClassNotFoundException: Which I only found by manually running: ./MyApp.app/Contents/MacOS/MyApp as double clicking doesn’t seem to show

Re: Proposal: ArrayList constructor perforrmance improvement

2018-12-18 Thread Scott Palmer
> On Dec 18, 2018, at 12:58 PM, Jason Mehrens wrote: > > Hi Steve, > >> ArrayList has a constructor which takes an arbitrary Collection as a >> parameter. This constructor will create an iterator over the collection >> ;and it will add each entry returned to the ArrayList. > >> We have

Re: jpackage EA Build 0

2018-12-17 Thread Scott Palmer
I finally got to the point where I can play with this… I’m just using trial and error, trying to figure out what to do based on the output of package --help and responding to error messages to guide me. I’ve already used jlink to create a runtime (including JavaFX) that I want to use with my

Re: jpackage EA Build 0

2018-12-17 Thread Scott Palmer
Building a non-modular app on macOS: In the output folder I find a .dmg file and a .pkg file. However, the .dmg produced contains both the application bundle AND the .pkg installer. It should not contain the .pkg Scott > On Dec 14, 2018, at 7:46 AM, Andy Herrick wrote: > > I am pleased to

Re: -jar option and the modulepath

2018-11-23 Thread Scott Palmer
I’m curious how this relates to the -m or —module option. I had though it looked like the module equivalent of the -jar option. Cheers, Scott > On Nov 23, 2018, at 12:41 PM, Richard Hillegas wrote: > > Thanks, Alan. > > On 11/23/18 12:06 AM, Alan Bateman wrote: >> On 22/11/2018 19:27,

Re: RFR: JDK-8212780: JEP 343: Packaging Tool Implementation

2018-11-01 Thread Scott Palmer
On Oct 30, 2018, at 1:10 PM, Andy Herrick wrote: > > On 10/30/2018 12:09 PM, Alan Bateman wrote: >>> ... >> Alex has suggested jdk.jpackager to avoid giving the impression that it's >> the "JDK packager". Also several existing tool modules have the tool name in >> the module name (jdk.jdeps,

Re: Draft JEP proposal: JDK-8200758: Packaging Tool

2018-07-27 Thread Scott Palmer
>> JREs seems like the most challenging part. We can add it to the "if there is >> time" list of features, but I don't know how feasible it is for the first >> version. Andy or Alexey can comment as to whether the current prototype has >> done anything that would ma

Re: Draft JEP proposal: JDK-8200758: Packaging Tool

2018-07-27 Thread Scott Palmer
for our projects > > @Scott: please, let me know, how to achieve this with javapackager > > Cheers > Jörg > > > -Original Message- > From: core-libs-dev [mailto:core-libs-dev-boun...@openjdk.java.net > <mailto:core-libs-dev-boun...@openjdk.java.net>

Re: Draft JEP proposal: JDK-8200758: Packaging Tool

2018-07-26 Thread Scott Palmer
"The input to jpackager includes: a Java runtime image, and a Java application in one of several formats..." Will it be possible to NOT include the JRE, but specify instead a pre-existing location for the JRE? As an example use-case consider an office productivity suite where there are

Re: RFR : 8207395: jar has issues with UNC-path arguments for the jar -C parameter [windows]

2018-07-18 Thread Scott Palmer
That gives a different result. Original: "///" -> “/" replaceAll: "///" -> “//" > On Jul 18, 2018, at 7:18 AM, Baesken, Matthias > wrote: > > Hi Götz, thanks for the input ! > Should we maybe use > > dir.replaceAll > > and not the while loop ? > >> while

Re: Prototype of jpackager in jdk/sandbox [was: Draft JEP proposal: JDK-8200758: Packaging Tool]

2018-07-11 Thread Scott Palmer
Since support for services/daemons was already in javapackager, why does this have to be a stretch goal? Isn’t it mostly already done? I would like to see this in the initial implementation. It is something I’m currently using via javapackager. I’m still trying to figure out the best strategy

Re: Useless null check in HashMap.merge()

2018-07-04 Thread Scott Palmer
On Jul 4, 2018, at 5:42 AM, Zheka Kozlov wrote: > > I noticed dead code in java.util.HashMap.merge(): > > public V merge(K key, V value, > BiFunction > remappingFunction) { >if (value == null) >throw new NullPointerException(); > >... > >if (value !=

Re: Draft JEP proposal: JDK-8200758: Packaging Tool

2018-06-28 Thread Scott Palmer
Doesn’t jlink require a *fully* modularized application? I.e. no non-module dependencies. The packaging tool should work with all runnable Java applications, not just fully modularized ones. Modularization seems to be a bit of an effort and is one of the main reasons my application(s) are

Re: Reducing Garbage Generated by URLClassLoader

2016-12-05 Thread Scott Palmer
> On Dec 5, 2016, at 1:31 AM, Max Kanat-Alexander wrote: > > Yeah, I have implemented a fast-path byte-only ZipCoder in a customized JDK > and it makes a big difference for allocations in long classpaths. I expected to see an improvement, but haven’t made any attempt at

Reducing Garbage Generated by URLClassLoader

2016-12-04 Thread Scott Palmer
Excuse me if this is the wrong list for this discussion. Please direct me to the right place if this isn’t it. When doing an analysis of garbage generation in our application we discovered a significant number of redundant strings generated by the class loader. In my case there are hundreds

Re: Java 8 RFR 8011194: Apps launched via double-clicked .jars have file.encoding value of US-ASCII on Mac OS X

2013-07-31 Thread Scott Palmer
Then shouldn't you be complaining to Apple that the value returned by nl_langinfo needs to be changed? David's point seems to be that second guessing the character set reported by the OS is likely to cause a different set of problems. Scott On Tue, Jul 30, 2013 at 10:14 AM, Johannes Schindelin