diff -Nru openjdk.orig/jdk/make/com/sun/Makefile openjdk/jdk/make/com/sun/Makefile
--- openjdk.orig/jdk/make/com/sun/Makefile	2014-07-15 23:03:29.000000000 +0100
+++ openjdk/jdk/make/com/sun/Makefile	2014-08-01 06:44:48.417757008 +0100
@@ -31,13 +31,6 @@
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
 
-ifndef OPENJDK
-  ORG_EXISTS := $(call DirExists,$(CLOSED_SRC)/share/classes/sun/org,,)
-  ifneq ("$(ORG_EXISTS)", "") 
-    SCRIPT_SUBDIR = script
-  endif
-endif
-
 # jarsigner is part of JRE
 SUBDIRS = java security net/ssl jarsigner
 
@@ -45,7 +38,7 @@
 SUBDIRS_desktop    = image
 SUBDIRS_enterprise = crypto/provider jndi \
                      org rowset net/httpserver
-SUBDIRS_misc       = $(SCRIPT_SUBDIR) tracing nio demo
+SUBDIRS_misc       = script tracing nio demo
 
 # Omit mirror since it's built with the apt tool.
 SUBDIRS_tools      = tools
diff -Nru openjdk.orig/jdk/make/com/sun/script/Makefile openjdk/jdk/make/com/sun/script/Makefile
--- openjdk.orig/jdk/make/com/sun/script/Makefile	2014-07-15 23:03:29.000000000 +0100
+++ openjdk/jdk/make/com/sun/script/Makefile	2014-08-01 06:44:48.417757008 +0100
@@ -31,6 +31,8 @@
 
 AUTO_FILES_JAVA_DIRS = com/sun/script
 
+OTHER_JAVACFLAGS = -classpath $(RHINO_JAR)
+
 #
 # Files that need to be copied
 #
diff -Nru openjdk.orig/jdk/make/common/Release.gmk openjdk/jdk/make/common/Release.gmk
--- openjdk.orig/jdk/make/common/Release.gmk	2014-07-15 23:03:29.000000000 +0100
+++ openjdk/jdk/make/common/Release.gmk	2014-08-01 06:44:48.417757008 +0100
@@ -830,6 +830,7 @@
 	$(CP) $(RT_JAR) $(JRE_IMAGE_DIR)/lib/rt.jar
 	$(CP) $(RESOURCES_JAR) $(JRE_IMAGE_DIR)/lib/resources.jar
 	$(CP) $(JSSE_JAR) $(JRE_IMAGE_DIR)/lib/jsse.jar
+	$(CP) $(RHINO_JAR) $(JRE_IMAGE_DIR)/lib/rhino.jar
 ifneq ($(JFR_JAR),)
 	$(CP) $(JFR_JAR) $(JRE_IMAGE_DIR)/lib/jfr.jar
 endif
diff -Nru openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/ExternalScriptable.java openjdk/jdk/src/share/classes/com/sun/script/javascript/ExternalScriptable.java
--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/ExternalScriptable.java	2014-07-15 23:03:29.000000000 +0100
+++ openjdk/jdk/src/share/classes/com/sun/script/javascript/ExternalScriptable.java	2014-08-01 06:44:48.417757008 +0100
@@ -24,7 +24,7 @@
  */
 
 package com.sun.script.javascript;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
 import javax.script.*;
 import java.util.*;
 
diff -Nru openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/JavaAdapter.java openjdk/jdk/src/share/classes/com/sun/script/javascript/JavaAdapter.java
--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/JavaAdapter.java	2014-07-15 23:03:29.000000000 +0100
+++ openjdk/jdk/src/share/classes/com/sun/script/javascript/JavaAdapter.java	2014-08-01 06:44:48.417757008 +0100
@@ -26,7 +26,7 @@
 package com.sun.script.javascript;
 
 import javax.script.Invocable;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
 
 /**
  * This class implements Rhino-like JavaAdapter to help implement a Java
diff -Nru openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/JSAdapter.java openjdk/jdk/src/share/classes/com/sun/script/javascript/JSAdapter.java
--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/JSAdapter.java	2014-07-15 23:03:29.000000000 +0100
+++ openjdk/jdk/src/share/classes/com/sun/script/javascript/JSAdapter.java	2014-08-01 06:44:48.417757008 +0100
@@ -25,7 +25,7 @@
 
 package com.sun.script.javascript;
 
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
 import java.util.*;
 
 /**
diff -Nru openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoClassShutter.java openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoClassShutter.java
--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoClassShutter.java	2014-07-15 23:03:29.000000000 +0100
+++ openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoClassShutter.java	2014-08-01 06:44:48.417757008 +0100
@@ -26,7 +26,7 @@
 package com.sun.script.javascript;
 
 import java.util.*;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
 
 /**
  * This class prevents script access to certain sensitive classes.
diff -Nru openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoCompiledScript.java openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoCompiledScript.java
--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoCompiledScript.java	2014-07-15 23:03:29.000000000 +0100
+++ openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoCompiledScript.java	2014-08-01 06:44:48.417757008 +0100
@@ -25,7 +25,7 @@
 
 package com.sun.script.javascript;
 import javax.script.*;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
 
 /**
  * Represents compiled JavaScript code.
diff -Nru openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngineFactory.java openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngineFactory.java
--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngineFactory.java	2014-07-15 23:03:29.000000000 +0100
+++ openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngineFactory.java	2014-08-01 06:44:48.421757065 +0100
@@ -26,7 +26,7 @@
 package com.sun.script.javascript;
 import javax.script.*;
 import java.util.*;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
 import com.sun.script.util.*;
 
 /**
diff -Nru openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java
--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java	2014-07-15 23:03:29.000000000 +0100
+++ openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java	2014-08-01 06:44:48.421757065 +0100
@@ -26,7 +26,7 @@
 package com.sun.script.javascript;
 import com.sun.script.util.*;
 import javax.script.*;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
 import java.lang.reflect.Method;
 import java.io.*;
 import java.security.*;
diff -Nru openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoTopLevel.java openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoTopLevel.java
--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoTopLevel.java	2014-07-15 23:03:29.000000000 +0100
+++ openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoTopLevel.java	2014-08-01 06:45:05.201993433 +0100
@@ -25,7 +25,7 @@
 
 package com.sun.script.javascript;
 
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
 import javax.script.*;
 import java.security.AccessControlContext;
 
diff -Nru openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoWrapFactory.java openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoWrapFactory.java
--- openjdk.orig/jdk/src/share/classes/com/sun/script/javascript/RhinoWrapFactory.java	2014-07-15 23:03:29.000000000 +0100
+++ openjdk/jdk/src/share/classes/com/sun/script/javascript/RhinoWrapFactory.java	2014-08-01 06:44:48.421757065 +0100
@@ -27,7 +27,7 @@
 
 import java.lang.reflect.*;
 import static sun.security.util.SecurityConstants.*;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
 
 /**
  * This wrap factory is used for security reasons. JSR 223 script
