Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened [v3]

2024-02-19 Thread Christian Stein
On Mon, 19 Feb 2024 15:42:05 GMT, Christian Stein wrote: >> Please review this PR that makes the launcher helper keep a reference to the >> executable JAR file active after extracting the name of the main class and >> returning it as Class instance. Now, when loading classes from the JAR file,

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened [v3]

2024-02-19 Thread Jaikiran Pai
On Mon, 19 Feb 2024 15:42:05 GMT, Christian Stein wrote: >> Please review this PR that makes the launcher helper keep a reference to the >> executable JAR file active after extracting the name of the main class and >> returning it as Class instance. Now, when loading classes from the JAR file,

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened [v3]

2024-02-19 Thread Christian Stein
On Thu, 15 Feb 2024 08:53:12 GMT, Alan Bateman wrote: >> `String jarname` is filled by the caller with the value of `String what`, >> and therefore contains the entire path to the executable JAR file. Using >> only `jarFile.getName()` will prevent any parent directories from being >> noted in

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened [v3]

2024-02-19 Thread Sean Coffey
On Mon, 19 Feb 2024 15:42:05 GMT, Christian Stein wrote: >> Please review this PR that makes the launcher helper keep a reference to the >> executable JAR file active after extracting the name of the main class and >> returning it as Class instance. Now, when loading classes from the JAR file,

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened [v3]

2024-02-19 Thread Christian Stein
> Please review this PR that makes the launcher helper keep a reference to the > executable JAR file active after extracting the name of the main class and > returning it as Class instance. Now, when loading classes from the JAR file, > it hasn't to be re-opened. Christian Stein has updated

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened [v2]

2024-02-19 Thread Christian Stein
On Mon, 19 Feb 2024 07:32:31 GMT, Jaikiran Pai wrote: > Both the files will need a copyright year update. Right. Updating both files. > The JBS issue would need an appropriate noreg label too > https://openjdk.org/guide/#noreg Added `noreg-cleanup` to the issue. - PR Comment:

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened [v2]

2024-02-19 Thread Christian Stein
On Mon, 19 Feb 2024 10:41:03 GMT, Alan Bateman wrote: >> src/java.base/share/classes/sun/launcher/LauncherHelper.java line 821: >> >>> 819: // In LM_JAR mode, put the underlying file in the >>> JarFile/ZipFile cache. >>> 820: // This will avoid needing to re-parse the manifest

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened [v2]

2024-02-19 Thread Alan Bateman
On Mon, 19 Feb 2024 10:30:24 GMT, Sean Coffey wrote: > Nice improvement to have. would it be ok to pad out this comment a bit more ? > I found it difficult to understand the specifics. Perhaps : > > ``` > // In LM_JAR mode, keep the underlying file open to retain it > in >

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened [v2]

2024-02-19 Thread Sean Coffey
On Thu, 15 Feb 2024 06:29:24 GMT, Christian Stein wrote: >> Please review this PR that makes the launcher helper keep a reference to the >> executable JAR file active after extracting the name of the main class and >> returning it as Class instance. Now, when loading classes from the JAR file,

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened [v2]

2024-02-18 Thread Jaikiran Pai
On Thu, 15 Feb 2024 06:29:24 GMT, Christian Stein wrote: >> Please review this PR that makes the launcher helper keep a reference to the >> executable JAR file active after extracting the name of the main class and >> returning it as Class instance. Now, when loading classes from the JAR file,

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened [v2]

2024-02-15 Thread Alan Bateman
On Thu, 15 Feb 2024 06:29:24 GMT, Christian Stein wrote: >> Please review this PR that makes the launcher helper keep a reference to the >> executable JAR file active after extracting the name of the main class and >> returning it as Class instance. Now, when loading classes from the JAR file,

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened [v2]

2024-02-15 Thread Alan Bateman
On Wed, 14 Feb 2024 15:42:48 GMT, Christian Stein wrote: > `String jarname` is filled by the caller with the value of `String what`, and > therefore contains the entire path to the executable JAR file. Using only > `jarFile.getName()` will prevent any parent directories from being noted in >

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened [v2]

2024-02-14 Thread Christian Stein
> Please review this PR that makes the launcher helper keep a reference to the > executable JAR file active after extracting the name of the main class and > returning it as Class instance. Now, when loading classes from the JAR file, > it hasn't to be re-opened. Christian Stein has updated

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened

2024-02-14 Thread Alan Bateman
On Wed, 14 Feb 2024 15:49:01 GMT, Christian Stein wrote: >> src/java.base/share/classes/sun/launcher/LauncherHelper.java line 596: >> >>> 594: String mainValue; >>> 595: try { >>> 596: Manifest manifest = jarFile.getManifest(); >> >> I think the try-catch around the

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened

2024-02-14 Thread Christian Stein
On Wed, 14 Feb 2024 11:41:43 GMT, Alan Bateman wrote: >> Please review this PR that makes the launcher helper keep a reference to the >> executable JAR file active after extracting the name of the main class and >> returning it as Class instance. Now, when loading classes from the JAR file,

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened

2024-02-14 Thread Christian Stein
On Wed, 14 Feb 2024 11:40:16 GMT, Alan Bateman wrote: >> Please review this PR that makes the launcher helper keep a reference to the >> executable JAR file active after extracting the name of the main class and >> returning it as Class instance. Now, when loading classes from the JAR file,

Re: RFR: 8318812: LauncherHelper.checkAndLoadMain closes jar file that's about to be re-opened

2024-02-14 Thread Alan Bateman
On Wed, 14 Feb 2024 11:03:07 GMT, Christian Stein wrote: > Please review this PR that makes the launcher helper keep a reference to the > executable JAR file active after extracting the name of the main class and > returning it as Class instance. Now, when loading classes from the JAR file, >