8165595: Main class should be set for nashorn modules
authorsundar
Thu, 08 Sep 2016 14:35:02 +0530
changeset 40780 37037af93049
parent 40777 e384420383a5
child 40781 32474320c9fd
8165595: Main class should be set for nashorn modules Reviewed-by: jlaskey, erikj
make/CreateJmods.gmk
--- a/make/CreateJmods.gmk	Wed Jul 05 22:10:57 2017 +0200
+++ b/make/CreateJmods.gmk	Thu Sep 08 14:35:02 2016 +0530
@@ -82,6 +82,14 @@
   endif
 endif
 
+ifeq ($(MODULE), jdk.scripting.nashorn.shell)
+  JMOD_FLAGS += --main-class jdk.nashorn.tools.jjs.Main
+endif
+
+ifeq ($(MODULE), jdk.scripting.nashorn)
+  JMOD_FLAGS += --main-class jdk.nashorn.tools.Shell
+endif
+
 # Changes to the jmod tool itself should also trigger a rebuild of all jmods.
 # The variable JMOD_CMD could contain an environment variable assignment before
 # the actual command. Filter that out using wildcard before adding to DEPS.