From tjwatson at us.ibm.com Tue Aug 9 15:29:43 2016 From: tjwatson at us.ibm.com (Thomas Watson) Date: Tue, 9 Aug 2016 10:29:43 -0500 Subject: Experiment with JPMS integration with existing module systems Message-ID: Hi JPMS experts. Recently I did an experiment with integrating JPMS with an existing module system (OSGi). I wrote up details in a blog post [1] which outlines what I had to do to get this to work. I also list some issues and possible improvements to JPMS that would make interop/integration work better with existing module systems in Java. Tom [1] http://blog.osgi.org/2016/08/osgi-with-java-modules-all-way-down.html From forax at univ-mlv.fr Sat Aug 27 22:30:40 2016 From: forax at univ-mlv.fr (Remi Forax) Date: Sun, 28 Aug 2016 00:30:40 +0200 (CEST) Subject: Issue #ClassFileModuleName Message-ID: <836374085.1142363.1472337040296.JavaMail.zimbra@u-pem.fr> Hi everybody, I've just updated ASM 6 to the new version of the class file format, which fix issue #ClassFileAccPublic [1] and part of #StandardModuleAttributes [2]. The API is not too bad, see an example at the end of this mail. Can we move and fix the last two issues related to the class file format ? #ClassFileModuleName: i've proposed to fix by introducing an index (u2) at the start of the Module that point to the module name encoded in the constant pool as an UTF8. #ClassFileAccModule: just choose between 0x0040 and 0x0080 and call it a day. regards, R?mi [1] http://openjdk.java.net/projects/jigsaw/spec/issues/#ClassFileAccPublic [2] http://openjdk.java.net/projects/jigsaw/spec/issues/#StandardModuleAttributes [3] http://openjdk.java.net/projects/jigsaw/spec/issues/#ClassFileModuleName [4] http://openjdk.java.net/projects/jigsaw/spec/issues/#ClassFileAccModule How to create a module-info.class with ASM6: ClassWriter writer = new ClassWriter(0); writer.visit(Opcodes.V1_9, Opcodes.ACC_MODULE, "genmodule/module-info", null, null, null); ModuleVisitor module = writer.visitModule(); module.visitVersion("1.0.0"); module.visitMainClass("org/objectweb/asm/FunMain"); module.visitTargetPlatform("MyOS", null, "3.4"); module.visitConcealedPackage("org/objectweb/asm/concealed"); module.visitConcealedPackage("org/objectweb/asm/concealed2"); module.visitRequire("asm.fun", Opcodes.ACC_TRANSITIVE); module.visitRequire("asm.static", Opcodes.ACC_STATIC_PHASE); module.visitRequire("asm.foo", 0); module.visitExport("org/objectweb/asm", 0, (String[])null); module.visitExport("org/objectweb/asm/util", Opcodes.ACC_DYNAMIC_PHASE, "java.base", "java.sql"); module.visitUse("org/objectweb/asm/FunInterface"); module.visitProvide("org/objectweb/asm/FunInterface", "org/objectweb/asm/FunImpl"); module.visitEnd(); writer.visitEnd();