Whitelisting modules in layers

2017-12-01 Thread Mark Raynsford
oduleFinder API a little, and came up with the following: https://github.com/io7m/moduledemo-20171201/blob/master/src/main/java/com/io7m/moduledemo/WhitelistModuleDemo.java However, the boot_layer.defineModulesWithOneLoader() call raises an exception: "Class loader must be the boot c

Re: Whitelisting modules in layers

2017-12-02 Thread Mark Raynsford
you aren't overriding. OK, thanks! It occurs to me that I'm essentially trying to do the work that the SecurityManager would have done in the past: Restrict access to packages (or in this case, entire modules). -- Mark Raynsford | http://www.io7m.com

Module resource as seekable byte channel?

2018-02-04 Thread Mark Raynsford
in the standard library? -- Mark Raynsford | http://www.io7m.com

Re: Module resource as seekable byte channel?

2018-02-05 Thread Mark Raynsford
the new stream A when B reaches EOF). It uses a constant amount of storage (the fixed-size read buffer per-stream) and doesn't seem to consume any extra file descriptors (because the JVM is obviously just reading bytes from a ZipEntry that it already has open behind the scenes). -- Mark Raynsford | http://www.io7m.com

Signing jlink code for macOS on other platforms

2018-02-12 Thread Mark Raynsford
tty awful! Are there any plans to implement anything that's capable of signing macOS binaries and resources in a platform-independent way so that jlink-produced distributions can work without warnings? Is that even a reasonable thing to request? I've no idea how "private" Apple

Finding module-info.class without loading a jar

2018-02-23 Thread Mark Raynsford
he jar for something that looks like a module-info.class, but I'd prefer not to have to. Is there a standard method in the JDK that can find the module descriptor class file for me based on the rules the JVM uses to find the descriptor upon loading a jar? -- Mark Raynsford | http://www.io7m.com

Re: Finding module-info.class without loading a jar

2018-02-24 Thread Mark Raynsford
s constructor. > ModuleDescriptor.read is an easy way to parse the module-info.class in > case you need it. Yes, I'm planning to move to this from ASM. -- Mark Raynsford | http://www.io7m.com

Re: Signing jlink code for macOS on other platforms

2018-02-26 Thread Mark Raynsford
On 2018-02-12T11:44:07 + Mark Raynsford wrote: > Hello! > > As a long time Java developer, I've only ever had to deal with signing > jar files. I can obviously sign jar files once on whatever platform I > choose to use to build the code, and then distribute the jar

Re: ClassLoader.getResources(String)

2018-03-07 Thread Mark Raynsford
e available" events until after they'd appeared doesn't mean you should miss the events. OSGi does handle this (it's written into the spec), but I don't know quite how the implementations handle it. -- Mark Raynsford | http://www.io7m.com

Re: JMOD, native libraries and the packaging of JavaFX

2018-05-09 Thread Mark Raynsford
d > nowhere but at least it'll be written down. How do the BSDs cope with this? I suspect that OpenBSD will not have any support for this at all, but FreeBSD might. -- Mark Raynsford | http://www.io7m.com

Re: JMOD, native libraries and the packaging of JavaFX

2018-05-09 Thread Mark Raynsford
On 2018-05-09T18:53:32 +0100 Mark Raynsford wrote: > On 2018-05-07T04:19:55 -0700 > Mike Hearn wrote: > > > I did a bit of experimentation to learn how different operating systems > > support loading shared libraries in-memory. I also did a bit of thinking on >

Compiling module descriptors is not reproducible?

2018-05-19 Thread Mark Raynsford
compilers. Inserting version information obviously breaks reproducibility, so it'd be nice if it could be turned off! The sources to the above module descriptor are available [2] if anyone wants to try compiling this for themselves. The SHA256 of the resulting module-info.class should be e7a94b5a2788a3c5cd6d7f586e70a0f2138a2eaa0e75144b6a16e75c4b297870 if your compiler produces the same output as mine. [0] https://reproducible-builds.org/ [1] https://adoptopenjdk.net/ [2] https://github.com/io7m/jtensors -- Mark Raynsford | http://www.io7m.com

Re: Compiling module descriptors is not reproducible?

2018-05-19 Thread Mark Raynsford
stion is why the compiler of the openjdk version 10.0.1 doesn't > generate the required module version. That is another good point! This build is the one distributed on Arch Linux. This was the procedure used to build it (no patches are applied): https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/java10-openjdk#n58 -- Mark Raynsford | http://www.io7m.com

Retrieving the bytes of platform classes

2017-10-23 Thread Mark Raynsford
a hack and wasn't future-proof. My tool is only designed to work with JDK 9 and up. Note that I'm *not* asking to get from loaded Class instances to bytes: I'm analyzing classes statically and none of the analyzed classes will actually be loaded by any ClassLoader. -- Mark Raynsford | http://www.io7m.com

Re: Retrieving the bytes of platform classes

2017-10-23 Thread Mark Raynsford
scheme-for-naming-stored-modules-classes-and-resources Ah, thanks! I hadn't seen this. Looks like exactly what I need. -- Mark Raynsford | http://www.io7m.com