[Penrose-discuss] Questions about creating a simple module

Thomas Watson tjwatson at us.ibm.com
Fri Sep 7 13:02:20 PDT 2012



From
http://planet.jboss.org/post/java_8_extensible_module_definitions_with_json
I see that David Bosschaert has added support to penrose builds for json
modue-info files.  This is great since it seems like it would be an easy
way to insert the necessary json text file into an existing jar to make it
a module without having to use the latest jigsaw javac to compile the
module-info.java file.  But I am struggling with creating a very simple
"hello module".  My basic assumption is that I could insert a
module-info.json file into the root of a simple jar file that looked like
this:

{
	"module" :
	{
		"name" : "x.test.mod1",
		"version" : "1.0",
		"exports" : [ { "name" : "x.test.mod1"} ]
	}
}

But when I do that and follow the quick start guide for jigsaw I get the
following error trying to add such a jar to the module

	jmod -L mlib install x.test.mod1.jar
	org.openjdk.jigsaw.ConfigurationException: x.test.mod1.jar: not a
modular JAR file

Am I doing something wrong?  How do I go about creating and running a
modular JAR with json descriptor with penrose?

Tom


More information about the penrose-discuss mailing list