--- a/make/mksample/Makefile Fri Aug 08 04:41:06 2008 -0700
+++ b/make/mksample/Makefile Tue Aug 12 15:00:52 2008 -0700
@@ -37,7 +37,7 @@ else
WEBSERVICES_SUBDIR = webservices
endif
-SUBDIRS = nio jmx scripting $(WEBSERVICES_SUBDIR) nbproject
+SUBDIRS = nio jmx scripting $(WEBSERVICES_SUBDIR) nbproject modules
# include dtrace samples in Solaris builds
ifeq ($(PLATFORM), solaris)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/mksample/modules/Makefile Tue Aug 12 15:00:52 2008 -0700
@@ -0,0 +1,54 @@
+#
+# Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+#
+# Makefile for the modules sample code
+#
+
+BUILDDIR = ../..
+
+PRODUCT = java
+
+include $(BUILDDIR)/common/Defs.gmk
+
+SAMPLE_SRC_DIR = $(SHARE_SRC)/sample/modules
+SAMPLE_DST_DIR = $(SAMPLEDIR)/modules
+
+SAMPLE_FILES = \
+ $(SAMPLE_DST_DIR)/README.txt \
+ $(SAMPLE_DST_DIR)/dependencies/dep/Entry.java \
+ $(SAMPLE_DST_DIR)/dependencies/dep/module-info.java \
+ $(SAMPLE_DST_DIR)/hello-world/hello/Main.java \
+ $(SAMPLE_DST_DIR)/hello-world/hello/module-info.java
+
+all build: $(SAMPLE_FILES)
+
+$(SAMPLE_DST_DIR)/%: $(SAMPLE_SRC_DIR)/%
+ $(install-file)
+
+clean clobber:
+ $(RM) -r $(SAMPLE_DST_DIR)
+
+.PHONY: all build clean clobber
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/sample/modules/README.txt Tue Aug 12 15:00:52 2008 -0700
@@ -0,0 +1,35 @@
+
+This directory contains two modules
+ A. A simple hello-world module in the directory hello-world
+ B. A simple module dep which depends on the hello module in A
+
+
+The directory hello-world contains the following:
+ a. module-info.java - the 'hello' module description file
+ b. hello/Main.java - a simple Java application
+
+To build and run the module:
+ [set your path to point to the "bin" directory of a OpenJDK Modules build]
+ % find hello-world -name "*.java" > hello.classes
+ % javac -source 7 @hello.classes
+ % jam cvf hello.jam -C hello-world hello
+ % java -jam hello.jam
+ Hello world from module hello 1.0
+
+The directory dependencies contains the module dep
+ a. module-info.java - the 'dep' module description file
+ b. dep/Entry.java - a simple application which depends on 'hello'
+
+Now lets try the other module:
+ % find dependencies -name "*.java" > dep.classes
+ % javac -source 7 -sourcepath hello-world/ @dep.classes
+ % jam cvf dep.jam -C dependencies dep
+ % java -jam dep.jam
+ Module 'dep' calling module 'hello'...
+ Hello world from module instance hello v1.0 (application repository)
+
+
+Thank you for trying out modules.
+Feel free to ask any questions at modules-dev@openjdk.java.net
+
+- The Modules team
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/sample/modules/dependencies/dep/module-info.java Tue Aug 12 15:00:52 2008 -0700
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+
+/**
+ * Declare the module "dep" with its exported class "dep.Entry".
+ */
+@MainClass("dep.Entry")
+@Version("1.0")
+@ImportModules({
+ @ImportModule(name="java.se"),
+ @ImportModule(name="hello")
+})
+module dep;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/sample/modules/hello-world/hello/module-info.java Tue Aug 12 15:00:52 2008 -0700
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * Declare the module "hello" with its exported class "hello.Main".
+ */
+@MainClass("hello.Main")
+@Version("1.0")
+@ImportModules({
+ @ImportModule(name="java.se")
+})
+module hello;
--- a/src/share/sample/modules/README Fri Aug 08 04:41:06 2008 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-
-This directory contains two modules
- A. A simple hello-world module in the directory hello-world
- B. A simple module dep which depends on the hello module in A
-
-
-The directory hello-world contains the following:
- a. module-info.java - the 'hello' module description file
- b. hello/Main.java - a simple Java application
-
-To build and run the module:
- [set your path to point to the "bin" directory of a OpenJDK Modules build]
- % find hello-world -name "*.java" > hello.classes
- % javac -source 7 @hello.classes
- % jam cvf hello.jam -C hello-world module-info.class -C hello-world hello/Main.class
- % java -jam hello.jam
- Hello world from module hello 1.0
-
-The directory dependencies contains the module dep
- a. module-info.java - the 'dep' module description file
- b. dep/Entry.java - a simple application which depends on 'hello'
-
-Now lets try the other module:
- % find dependencies -name "*.java" > dep.classes
- % javac -source 7 -sourcepath hello-world/ @dep.classes
- % jam cvf dep.jam -C dependencies module-info.class -C dependencies dep/Entry.class
- % java -jam dep.jam
- Module 'dep' calling module 'hello'...
- Hello world from module instance hello v1.0 (application repository)
-
-
-Thank you for trying out modules.
-Feel free to ask any questions at modules-dev@openjdk.java.net
-
-- The Modules team
--- a/src/share/sample/modules/dependencies/module-info.java Fri Aug 08 04:41:06 2008 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
- * Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-
-/**
- * Declare the module "dep" with its exported class "dep.Entry".
- */
-@MainClass("dep.Entry")
-@Version("1.0")
-@ImportModules({
- @ImportModule(name="java.se"),
- @ImportModule(name="hello")
-})
-module dep;
--- a/src/share/sample/modules/hello-world/module-info.java Fri Aug 08 04:41:06 2008 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
- * Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-/**
- * Declare the module "hello" with its exported class "hello.Main".
- */
-@MainClass("hello.Main")
-@Version("1.0")
-@ImportModules({
- @ImportModule(name="java.se")
-})
-module hello;