8012251: jjs should support -fx option
authorjlaskey
Wed, 24 Apr 2013 14:25:28 -0300
changeset 17244 041afba4cec5
parent 17243 938e98863d5f
child 17245 c49b17cd464b
8012251: jjs should support -fx option Reviewed-by: sundar, attila, lagergren Contributed-by: james.laskey@oracle.com
nashorn/src/jdk/nashorn/internal/runtime/Context.java
nashorn/src/jdk/nashorn/internal/runtime/ScriptEnvironment.java
nashorn/src/jdk/nashorn/internal/runtime/resources/Options.properties
nashorn/src/jdk/nashorn/internal/runtime/resources/fx/base.js
nashorn/src/jdk/nashorn/internal/runtime/resources/fx/bootstrap.js
nashorn/src/jdk/nashorn/internal/runtime/resources/fx/controls.js
nashorn/src/jdk/nashorn/internal/runtime/resources/fx/fxml.js
nashorn/src/jdk/nashorn/internal/runtime/resources/fx/graphics.js
nashorn/src/jdk/nashorn/internal/runtime/resources/fx/media.js
nashorn/src/jdk/nashorn/internal/runtime/resources/fx/swing.js
nashorn/src/jdk/nashorn/internal/runtime/resources/fx/swt.js
nashorn/src/jdk/nashorn/internal/runtime/resources/fx/web.js
nashorn/src/jdk/nashorn/tools/Shell.java
nashorn/tools/fxshell/jdk/nashorn/tools/FXShell.java
--- a/nashorn/src/jdk/nashorn/internal/runtime/Context.java	Wed Apr 24 13:36:31 2013 +0200
+++ b/nashorn/src/jdk/nashorn/internal/runtime/Context.java	Wed Apr 24 14:25:28 2013 -0300
@@ -54,7 +54,6 @@
 import jdk.nashorn.internal.ir.debug.ASTWriter;
 import jdk.nashorn.internal.ir.debug.PrintVisitor;
 import jdk.nashorn.internal.parser.Parser;
-import jdk.nashorn.internal.runtime.linker.JavaAdapterFactory;
 import jdk.nashorn.internal.runtime.options.Options;
 
 /**
@@ -415,6 +414,28 @@
         return ScriptRuntime.apply(func, evalThis);
     }
 
+    private Source loadInternal(final String srcStr, final String prefix, final String resourcePath) {
+        if (srcStr.startsWith(prefix)) {
+            final String resource = resourcePath + srcStr.substring(prefix.length());
+            // NOTE: even sandbox scripts should be able to load scripts in nashorn: scheme
+            // These scripts are always available and are loaded from nashorn.jar's resources.
+            return AccessController.doPrivileged(
+                    new PrivilegedAction<Source>() {
+                        @Override
+                        public Source run() {
+                            try {
+                                final URL resURL = Context.class.getResource(resource);
+                                return (resURL != null)? new Source(srcStr, resURL) : null;
+                            } catch (final IOException exp) {
+                                return null;
+                            }
+                        }
+                    });
+        }
+
+        return null;
+    }
+
     /**
      * Implementation of {@code load} Nashorn extension. Load a script file from a source
      * expression
@@ -427,33 +448,18 @@
      * @throws IOException if source cannot be found or loaded
      */
     public Object load(final ScriptObject scope, final Object from) throws IOException {
-        Object src = (from instanceof ConsString)?  from.toString() : from;
+        final Object src = (from instanceof ConsString)?  from.toString() : from;
         Source source = null;
 
         // load accepts a String (which could be a URL or a file name), a File, a URL
         // or a ScriptObject that has "name" and "source" (string valued) properties.
         if (src instanceof String) {
             final String srcStr = (String)src;
-            final File   file   = new File(srcStr);
+            final File file = new File(srcStr);
             if (srcStr.indexOf(':') != -1) {
-                if (srcStr.startsWith("nashorn:")) {
-                    final String resource = "resources/" + srcStr.substring("nashorn:".length());
-                    // NOTE: even sandbox scripts should be able to load scripts in nashorn: scheme
-                    // These scripts are always available and are loaded from nashorn.jar's resources.
-                    source = AccessController.doPrivileged(
-                            new PrivilegedAction<Source>() {
-                                @Override
-                                public Source run() {
-                                    try {
-                                        final URL resURL = Context.class.getResource(resource);
-                                        return (resURL != null)? new Source(srcStr, resURL) : null;
-                                    } catch (final IOException exp) {
-                                        return null;
-                                    }
-                                }
-                            });
-                } else {
-                    URL url = null;
+                if ((source = loadInternal(srcStr, "nashorn:", "resources/")) == null &&
+                    (source = loadInternal(srcStr, "fx:", "resources/fx/")) == null) {
+                    URL url;
                     try {
                         //check for malformed url. if malformed, it may still be a valid file
                         url = new URL(srcStr);
--- a/nashorn/src/jdk/nashorn/internal/runtime/ScriptEnvironment.java	Wed Apr 24 13:36:31 2013 +0200
+++ b/nashorn/src/jdk/nashorn/internal/runtime/ScriptEnvironment.java	Wed Apr 24 14:25:28 2013 -0300
@@ -82,6 +82,9 @@
     /** Show full Nashorn version */
     public final boolean _fullversion;
 
+    /** Launch using as fx application */
+    public final boolean _fx;
+
     /** Should lazy compilation take place */
     public final boolean _lazy_compilation;
 
@@ -158,6 +161,7 @@
         _early_lvalue_error   = options.getBoolean("early.lvalue.error");
         _empty_statements     = options.getBoolean("empty.statements");
         _fullversion          = options.getBoolean("fullversion");
+        _fx                   = options.getBoolean("fx");
         _lazy_compilation     = options.getBoolean("lazy.compilation");
         _loader_per_compile   = options.getBoolean("loader.per.compile");
         _no_syntax_extensions = options.getBoolean("no.syntax.extensions");
--- a/nashorn/src/jdk/nashorn/internal/runtime/resources/Options.properties	Wed Apr 24 13:36:31 2013 +0200
+++ b/nashorn/src/jdk/nashorn/internal/runtime/resources/Options.properties	Wed Apr 24 14:25:28 2013 -0300
@@ -144,6 +144,12 @@
     desc="Print full version info of Nashorn." \
 }
 
+nashorn.option.fx = {                           \
+    name="-fx",                                 \
+    desc="Launch script as an fx application.", \
+    default=false                               \
+}
+
 nashorn.option.log = {                                                       \
     name="--log",                                                            \
     is_undocumented=true,                                                    \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/src/jdk/nashorn/internal/runtime/resources/fx/base.js	Wed Apr 24 14:25:28 2013 -0300
@@ -0,0 +1,223 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+Scene                                   = Java.type("javafx.scene.Scene");
+Group                                   = Java.type("javafx.scene.Group");
+Stage                                   = Java.type("javafx.stage.Stage");
+
+Binding                                 = Java.type("javafx.beans.binding.Binding");
+Bindings                                = Java.type("javafx.beans.binding.Bindings");
+BooleanBinding                          = Java.type("javafx.beans.binding.BooleanBinding");
+BooleanExpression                       = Java.type("javafx.beans.binding.BooleanExpression");
+DoubleBinding                           = Java.type("javafx.beans.binding.DoubleBinding");
+DoubleExpression                        = Java.type("javafx.beans.binding.DoubleExpression");
+FloatBinding                            = Java.type("javafx.beans.binding.FloatBinding");
+FloatExpression                         = Java.type("javafx.beans.binding.FloatExpression");
+IntegerBinding                          = Java.type("javafx.beans.binding.IntegerBinding");
+IntegerExpression                       = Java.type("javafx.beans.binding.IntegerExpression");
+ListBinding                             = Java.type("javafx.beans.binding.ListBinding");
+ListExpression                          = Java.type("javafx.beans.binding.ListExpression");
+LongBinding                             = Java.type("javafx.beans.binding.LongBinding");
+LongExpression                          = Java.type("javafx.beans.binding.LongExpression");
+MapBinding                              = Java.type("javafx.beans.binding.MapBinding");
+MapExpression                           = Java.type("javafx.beans.binding.MapExpression");
+NumberBinding                           = Java.type("javafx.beans.binding.NumberBinding");
+NumberExpression                        = Java.type("javafx.beans.binding.NumberExpression");
+NumberExpressionBase                    = Java.type("javafx.beans.binding.NumberExpressionBase");
+ObjectBinding                           = Java.type("javafx.beans.binding.ObjectBinding");
+ObjectExpression                        = Java.type("javafx.beans.binding.ObjectExpression");
+SetBinding                              = Java.type("javafx.beans.binding.SetBinding");
+SetExpression                           = Java.type("javafx.beans.binding.SetExpression");
+StringBinding                           = Java.type("javafx.beans.binding.StringBinding");
+StringExpression                        = Java.type("javafx.beans.binding.StringExpression");
+When                                    = Java.type("javafx.beans.binding.When");
+DefaultProperty                         = Java.type("javafx.beans.DefaultProperty");
+InvalidationListener                    = Java.type("javafx.beans.InvalidationListener");
+Observable                              = Java.type("javafx.beans.Observable");
+JavaBeanBooleanProperty                 = Java.type("javafx.beans.property.adapter.JavaBeanBooleanProperty");
+JavaBeanBooleanPropertyBuilder          = Java.type("javafx.beans.property.adapter.JavaBeanBooleanPropertyBuilder");
+JavaBeanDoubleProperty                  = Java.type("javafx.beans.property.adapter.JavaBeanDoubleProperty");
+JavaBeanDoublePropertyBuilder           = Java.type("javafx.beans.property.adapter.JavaBeanDoublePropertyBuilder");
+JavaBeanFloatProperty                   = Java.type("javafx.beans.property.adapter.JavaBeanFloatProperty");
+JavaBeanFloatPropertyBuilder            = Java.type("javafx.beans.property.adapter.JavaBeanFloatPropertyBuilder");
+JavaBeanIntegerProperty                 = Java.type("javafx.beans.property.adapter.JavaBeanIntegerProperty");
+JavaBeanIntegerPropertyBuilder          = Java.type("javafx.beans.property.adapter.JavaBeanIntegerPropertyBuilder");
+JavaBeanLongProperty                    = Java.type("javafx.beans.property.adapter.JavaBeanLongProperty");
+JavaBeanLongPropertyBuilder             = Java.type("javafx.beans.property.adapter.JavaBeanLongPropertyBuilder");
+JavaBeanObjectProperty                  = Java.type("javafx.beans.property.adapter.JavaBeanObjectProperty");
+JavaBeanObjectPropertyBuilder           = Java.type("javafx.beans.property.adapter.JavaBeanObjectPropertyBuilder");
+JavaBeanProperty                        = Java.type("javafx.beans.property.adapter.JavaBeanProperty");
+JavaBeanStringProperty                  = Java.type("javafx.beans.property.adapter.JavaBeanStringProperty");
+JavaBeanStringPropertyBuilder           = Java.type("javafx.beans.property.adapter.JavaBeanStringPropertyBuilder");
+ReadOnlyJavaBeanBooleanProperty         = Java.type("javafx.beans.property.adapter.ReadOnlyJavaBeanBooleanProperty");
+ReadOnlyJavaBeanBooleanPropertyBuilder  = Java.type("javafx.beans.property.adapter.ReadOnlyJavaBeanBooleanPropertyBuilder");
+ReadOnlyJavaBeanDoubleProperty          = Java.type("javafx.beans.property.adapter.ReadOnlyJavaBeanDoubleProperty");
+ReadOnlyJavaBeanDoublePropertyBuilder   = Java.type("javafx.beans.property.adapter.ReadOnlyJavaBeanDoublePropertyBuilder");
+ReadOnlyJavaBeanFloatProperty           = Java.type("javafx.beans.property.adapter.ReadOnlyJavaBeanFloatProperty");
+ReadOnlyJavaBeanFloatPropertyBuilder    = Java.type("javafx.beans.property.adapter.ReadOnlyJavaBeanFloatPropertyBuilder");
+ReadOnlyJavaBeanIntegerProperty         = Java.type("javafx.beans.property.adapter.ReadOnlyJavaBeanIntegerProperty");
+ReadOnlyJavaBeanIntegerPropertyBuilder  = Java.type("javafx.beans.property.adapter.ReadOnlyJavaBeanIntegerPropertyBuilder");
+ReadOnlyJavaBeanLongProperty            = Java.type("javafx.beans.property.adapter.ReadOnlyJavaBeanLongProperty");
+ReadOnlyJavaBeanLongPropertyBuilder     = Java.type("javafx.beans.property.adapter.ReadOnlyJavaBeanLongPropertyBuilder");
+ReadOnlyJavaBeanObjectProperty          = Java.type("javafx.beans.property.adapter.ReadOnlyJavaBeanObjectProperty");
+ReadOnlyJavaBeanObjectPropertyBuilder   = Java.type("javafx.beans.property.adapter.ReadOnlyJavaBeanObjectPropertyBuilder");
+ReadOnlyJavaBeanProperty                = Java.type("javafx.beans.property.adapter.ReadOnlyJavaBeanProperty");
+ReadOnlyJavaBeanStringProperty          = Java.type("javafx.beans.property.adapter.ReadOnlyJavaBeanStringProperty");
+ReadOnlyJavaBeanStringPropertyBuilder   = Java.type("javafx.beans.property.adapter.ReadOnlyJavaBeanStringPropertyBuilder");
+BooleanProperty                         = Java.type("javafx.beans.property.BooleanProperty");
+BooleanPropertyBase                     = Java.type("javafx.beans.property.BooleanPropertyBase");
+DoubleProperty                          = Java.type("javafx.beans.property.DoubleProperty");
+DoublePropertyBase                      = Java.type("javafx.beans.property.DoublePropertyBase");
+FloatProperty                           = Java.type("javafx.beans.property.FloatProperty");
+FloatPropertyBase                       = Java.type("javafx.beans.property.FloatPropertyBase");
+IntegerProperty                         = Java.type("javafx.beans.property.IntegerProperty");
+IntegerPropertyBase                     = Java.type("javafx.beans.property.IntegerPropertyBase");
+ListProperty                            = Java.type("javafx.beans.property.ListProperty");
+ListPropertyBase                        = Java.type("javafx.beans.property.ListPropertyBase");
+LongProperty                            = Java.type("javafx.beans.property.LongProperty");
+LongPropertyBase                        = Java.type("javafx.beans.property.LongPropertyBase");
+MapProperty                             = Java.type("javafx.beans.property.MapProperty");
+MapPropertyBase                         = Java.type("javafx.beans.property.MapPropertyBase");
+ObjectProperty                          = Java.type("javafx.beans.property.ObjectProperty");
+ObjectPropertyBase                      = Java.type("javafx.beans.property.ObjectPropertyBase");
+Property                                = Java.type("javafx.beans.property.Property");
+ReadOnlyBooleanProperty                 = Java.type("javafx.beans.property.ReadOnlyBooleanProperty");
+ReadOnlyBooleanPropertyBase             = Java.type("javafx.beans.property.ReadOnlyBooleanPropertyBase");
+ReadOnlyBooleanWrapper                  = Java.type("javafx.beans.property.ReadOnlyBooleanWrapper");
+ReadOnlyDoubleProperty                  = Java.type("javafx.beans.property.ReadOnlyDoubleProperty");
+ReadOnlyDoublePropertyBase              = Java.type("javafx.beans.property.ReadOnlyDoublePropertyBase");
+ReadOnlyDoubleWrapper                   = Java.type("javafx.beans.property.ReadOnlyDoubleWrapper");
+ReadOnlyFloatProperty                   = Java.type("javafx.beans.property.ReadOnlyFloatProperty");
+ReadOnlyFloatPropertyBase               = Java.type("javafx.beans.property.ReadOnlyFloatPropertyBase");
+ReadOnlyFloatWrapper                    = Java.type("javafx.beans.property.ReadOnlyFloatWrapper");
+ReadOnlyIntegerProperty                 = Java.type("javafx.beans.property.ReadOnlyIntegerProperty");
+ReadOnlyIntegerPropertyBase             = Java.type("javafx.beans.property.ReadOnlyIntegerPropertyBase");
+ReadOnlyIntegerWrapper                  = Java.type("javafx.beans.property.ReadOnlyIntegerWrapper");
+ReadOnlyListProperty                    = Java.type("javafx.beans.property.ReadOnlyListProperty");
+ReadOnlyListPropertyBase                = Java.type("javafx.beans.property.ReadOnlyListPropertyBase");
+ReadOnlyListWrapper                     = Java.type("javafx.beans.property.ReadOnlyListWrapper");
+ReadOnlyLongProperty                    = Java.type("javafx.beans.property.ReadOnlyLongProperty");
+ReadOnlyLongPropertyBase                = Java.type("javafx.beans.property.ReadOnlyLongPropertyBase");
+ReadOnlyLongWrapper                     = Java.type("javafx.beans.property.ReadOnlyLongWrapper");
+ReadOnlyMapProperty                     = Java.type("javafx.beans.property.ReadOnlyMapProperty");
+ReadOnlyMapPropertyBase                 = Java.type("javafx.beans.property.ReadOnlyMapPropertyBase");
+ReadOnlyMapWrapper                      = Java.type("javafx.beans.property.ReadOnlyMapWrapper");
+ReadOnlyObjectProperty                  = Java.type("javafx.beans.property.ReadOnlyObjectProperty");
+ReadOnlyObjectPropertyBase              = Java.type("javafx.beans.property.ReadOnlyObjectPropertyBase");
+ReadOnlyObjectWrapper                   = Java.type("javafx.beans.property.ReadOnlyObjectWrapper");
+ReadOnlyProperty                        = Java.type("javafx.beans.property.ReadOnlyProperty");
+ReadOnlySetProperty                     = Java.type("javafx.beans.property.ReadOnlySetProperty");
+ReadOnlySetPropertyBase                 = Java.type("javafx.beans.property.ReadOnlySetPropertyBase");
+ReadOnlySetWrapper                      = Java.type("javafx.beans.property.ReadOnlySetWrapper");
+ReadOnlyStringProperty                  = Java.type("javafx.beans.property.ReadOnlyStringProperty");
+ReadOnlyStringPropertyBase              = Java.type("javafx.beans.property.ReadOnlyStringPropertyBase");
+ReadOnlyStringWrapper                   = Java.type("javafx.beans.property.ReadOnlyStringWrapper");
+SetProperty                             = Java.type("javafx.beans.property.SetProperty");
+SetPropertyBase                         = Java.type("javafx.beans.property.SetPropertyBase");
+SimpleBooleanProperty                   = Java.type("javafx.beans.property.SimpleBooleanProperty");
+SimpleDoubleProperty                    = Java.type("javafx.beans.property.SimpleDoubleProperty");
+SimpleFloatProperty                     = Java.type("javafx.beans.property.SimpleFloatProperty");
+SimpleIntegerProperty                   = Java.type("javafx.beans.property.SimpleIntegerProperty");
+SimpleListProperty                      = Java.type("javafx.beans.property.SimpleListProperty");
+SimpleLongProperty                      = Java.type("javafx.beans.property.SimpleLongProperty");
+SimpleMapProperty                       = Java.type("javafx.beans.property.SimpleMapProperty");
+SimpleObjectProperty                    = Java.type("javafx.beans.property.SimpleObjectProperty");
+SimpleSetProperty                       = Java.type("javafx.beans.property.SimpleSetProperty");
+SimpleStringProperty                    = Java.type("javafx.beans.property.SimpleStringProperty");
+StringProperty                          = Java.type("javafx.beans.property.StringProperty");
+StringPropertyBase                      = Java.type("javafx.beans.property.StringPropertyBase");
+ChangeListener                          = Java.type("javafx.beans.value.ChangeListener");
+ObservableBooleanValue                  = Java.type("javafx.beans.value.ObservableBooleanValue");
+ObservableDoubleValue                   = Java.type("javafx.beans.value.ObservableDoubleValue");
+ObservableFloatValue                    = Java.type("javafx.beans.value.ObservableFloatValue");
+ObservableIntegerValue                  = Java.type("javafx.beans.value.ObservableIntegerValue");
+ObservableListValue                     = Java.type("javafx.beans.value.ObservableListValue");
+ObservableLongValue                     = Java.type("javafx.beans.value.ObservableLongValue");
+ObservableMapValue                      = Java.type("javafx.beans.value.ObservableMapValue");
+ObservableNumberValue                   = Java.type("javafx.beans.value.ObservableNumberValue");
+ObservableObjectValue                   = Java.type("javafx.beans.value.ObservableObjectValue");
+ObservableSetValue                      = Java.type("javafx.beans.value.ObservableSetValue");
+ObservableStringValue                   = Java.type("javafx.beans.value.ObservableStringValue");
+ObservableValue                         = Java.type("javafx.beans.value.ObservableValue");
+ObservableValueBase                     = Java.type("javafx.beans.value.ObservableValueBase");
+WeakChangeListener                      = Java.type("javafx.beans.value.WeakChangeListener");
+WritableBooleanValue                    = Java.type("javafx.beans.value.WritableBooleanValue");
+WritableDoubleValue                     = Java.type("javafx.beans.value.WritableDoubleValue");
+WritableFloatValue                      = Java.type("javafx.beans.value.WritableFloatValue");
+WritableIntegerValue                    = Java.type("javafx.beans.value.WritableIntegerValue");
+WritableListValue                       = Java.type("javafx.beans.value.WritableListValue");
+WritableLongValue                       = Java.type("javafx.beans.value.WritableLongValue");
+WritableMapValue                        = Java.type("javafx.beans.value.WritableMapValue");
+WritableNumberValue                     = Java.type("javafx.beans.value.WritableNumberValue");
+WritableObjectValue                     = Java.type("javafx.beans.value.WritableObjectValue");
+WritableSetValue                        = Java.type("javafx.beans.value.WritableSetValue");
+WritableStringValue                     = Java.type("javafx.beans.value.WritableStringValue");
+WritableValue                           = Java.type("javafx.beans.value.WritableValue");
+WeakInvalidationListener                = Java.type("javafx.beans.WeakInvalidationListener");
+WeakListener                            = Java.type("javafx.beans.WeakListener");
+FXCollections                           = Java.type("javafx.collections.FXCollections");
+ListChangeListener                      = Java.type("javafx.collections.ListChangeListener");
+ListChangeListener$Change               = Java.type("javafx.collections.ListChangeListener$Change");
+MapChangeListener                       = Java.type("javafx.collections.MapChangeListener");
+MapChangeListener$Change                = Java.type("javafx.collections.MapChangeListener$Change");
+ObservableList                          = Java.type("javafx.collections.ObservableList");
+ObservableMap                           = Java.type("javafx.collections.ObservableMap");
+ObservableSet                           = Java.type("javafx.collections.ObservableSet");
+SetChangeListener                       = Java.type("javafx.collections.SetChangeListener");
+SetChangeListener$Change                = Java.type("javafx.collections.SetChangeListener$Change");
+WeakListChangeListener                  = Java.type("javafx.collections.WeakListChangeListener");
+WeakMapChangeListener                   = Java.type("javafx.collections.WeakMapChangeListener");
+WeakSetChangeListener                   = Java.type("javafx.collections.WeakSetChangeListener");
+ActionEvent                             = Java.type("javafx.event.ActionEvent");
+Event                                   = Java.type("javafx.event.Event");
+EventDispatchChain                      = Java.type("javafx.event.EventDispatchChain");
+EventDispatcher                         = Java.type("javafx.event.EventDispatcher");
+EventHandler                            = Java.type("javafx.event.EventHandler");
+EventTarget                             = Java.type("javafx.event.EventTarget");
+EventType                               = Java.type("javafx.event.EventType");
+Builder                                 = Java.type("javafx.util.Builder");
+BuilderFactory                          = Java.type("javafx.util.BuilderFactory");
+Callback                                = Java.type("javafx.util.Callback");
+BigDecimalStringConverter               = Java.type("javafx.util.converter.BigDecimalStringConverter");
+BigIntegerStringConverter               = Java.type("javafx.util.converter.BigIntegerStringConverter");
+BooleanStringConverter                  = Java.type("javafx.util.converter.BooleanStringConverter");
+ByteStringConverter                     = Java.type("javafx.util.converter.ByteStringConverter");
+CharacterStringConverter                = Java.type("javafx.util.converter.CharacterStringConverter");
+CurrencyStringConverter                 = Java.type("javafx.util.converter.CurrencyStringConverter");
+DateStringConverter                     = Java.type("javafx.util.converter.DateStringConverter");
+DateTimeStringConverter                 = Java.type("javafx.util.converter.DateTimeStringConverter");
+DefaultStringConverter                  = Java.type("javafx.util.converter.DefaultStringConverter");
+DoubleStringConverter                   = Java.type("javafx.util.converter.DoubleStringConverter");
+FloatStringConverter                    = Java.type("javafx.util.converter.FloatStringConverter");
+FormatStringConverter                   = Java.type("javafx.util.converter.FormatStringConverter");
+IntegerStringConverter                  = Java.type("javafx.util.converter.IntegerStringConverter");
+LongStringConverter                     = Java.type("javafx.util.converter.LongStringConverter");
+NumberStringConverter                   = Java.type("javafx.util.converter.NumberStringConverter");
+PercentageStringConverter               = Java.type("javafx.util.converter.PercentageStringConverter");
+ShortStringConverter                    = Java.type("javafx.util.converter.ShortStringConverter");
+TimeStringConverter                     = Java.type("javafx.util.converter.TimeStringConverter");
+Duration                                = Java.type("javafx.util.Duration");
+Pair                                    = Java.type("javafx.util.Pair");
+StringConverter                         = Java.type("javafx.util.StringConverter");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/src/jdk/nashorn/internal/runtime/resources/fx/bootstrap.js	Wed Apr 24 14:25:28 2013 -0300
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// Check for fx presence.
+if (typeof javafx.application.Application != "function") {
+    print("JavaFX is not available.");
+    exit(1);
+}
+
+// Extend the javafx.application.Application class overriding init, start and stop.
+com.sun.javafx.application.LauncherImpl.launchApplication((Java.extend(javafx.application.Application, {
+    // Overridden javafx.application.Application.init();
+    init: function() {
+        // Java FX packages and classes must be defined here because
+        // they may not be viable until launch time due to clinit ordering.
+
+        load("fx:base.js");
+    },
+
+    // Overridden javafx.application.Application.start(Stage stage);
+    start: function(stage) {
+        // Set up stage global.
+        $STAGE = stage;
+
+        // Load user FX scripts.
+        for each (var script in $SCRIPTS) {
+            load(script);
+        }
+
+        // Call the global init function if present.
+        if ($GLOBAL.init) {
+            init();
+        }
+
+        // Call the global start function if present.  Otherwise show the stage.
+        if ($GLOBAL.start) {
+            start(stage);
+        } else {
+            stage.show();
+        }
+    },
+
+    // Overridden javafx.application.Application.stop();
+    stop: function() {
+        // Call the global stop function if present.
+        if ($GLOBAL.stop) {
+            stop();
+        }
+    }
+
+    // No arguments passed to application (handled thru $ARG.)
+})).class, new (Java.type("java.lang.String[]"))(0));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/src/jdk/nashorn/internal/runtime/resources/fx/controls.js	Wed Apr 24 14:25:28 2013 -0300
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+AreaChart                               = Java.type("javafx.scene.chart.AreaChart");
+AreaChartBuilder                        = Java.type("javafx.scene.chart.AreaChartBuilder");
+Axis                                    = Java.type("javafx.scene.chart.Axis");
+Axis$TickMark                           = Java.type("javafx.scene.chart.Axis$TickMark");
+AxisBuilder                             = Java.type("javafx.scene.chart.AxisBuilder");
+BarChart                                = Java.type("javafx.scene.chart.BarChart");
+BarChartBuilder                         = Java.type("javafx.scene.chart.BarChartBuilder");
+BubbleChart                             = Java.type("javafx.scene.chart.BubbleChart");
+BubbleChartBuilder                      = Java.type("javafx.scene.chart.BubbleChartBuilder");
+CategoryAxis                            = Java.type("javafx.scene.chart.CategoryAxis");
+CategoryAxisBuilder                     = Java.type("javafx.scene.chart.CategoryAxisBuilder");
+Chart                                   = Java.type("javafx.scene.chart.Chart");
+ChartBuilder                            = Java.type("javafx.scene.chart.ChartBuilder");
+LineChart                               = Java.type("javafx.scene.chart.LineChart");
+LineChartBuilder                        = Java.type("javafx.scene.chart.LineChartBuilder");
+NumberAxis                              = Java.type("javafx.scene.chart.NumberAxis");
+NumberAxis$DefaultFormatter             = Java.type("javafx.scene.chart.NumberAxis$DefaultFormatter");
+NumberAxisBuilder                       = Java.type("javafx.scene.chart.NumberAxisBuilder");
+PieChart                                = Java.type("javafx.scene.chart.PieChart");
+PieChart$Data                           = Java.type("javafx.scene.chart.PieChart$Data");
+PieChartBuilder                         = Java.type("javafx.scene.chart.PieChartBuilder");
+ScatterChart                            = Java.type("javafx.scene.chart.ScatterChart");
+ScatterChartBuilder                     = Java.type("javafx.scene.chart.ScatterChartBuilder");
+StackedAreaChart                        = Java.type("javafx.scene.chart.StackedAreaChart");
+StackedAreaChartBuilder                 = Java.type("javafx.scene.chart.StackedAreaChartBuilder");
+StackedBarChart                         = Java.type("javafx.scene.chart.StackedBarChart");
+StackedBarChartBuilder                  = Java.type("javafx.scene.chart.StackedBarChartBuilder");
+ValueAxis                               = Java.type("javafx.scene.chart.ValueAxis");
+ValueAxisBuilder                        = Java.type("javafx.scene.chart.ValueAxisBuilder");
+XYChart                                 = Java.type("javafx.scene.chart.XYChart");
+XYChart$Data                            = Java.type("javafx.scene.chart.XYChart$Data");
+XYChart$Series                          = Java.type("javafx.scene.chart.XYChart$Series");
+XYChartBuilder                          = Java.type("javafx.scene.chart.XYChartBuilder");
+Accordion                               = Java.type("javafx.scene.control.Accordion");
+AccordionBuilder                        = Java.type("javafx.scene.control.AccordionBuilder");
+Button                                  = Java.type("javafx.scene.control.Button");
+ButtonBase                              = Java.type("javafx.scene.control.ButtonBase");
+ButtonBaseBuilder                       = Java.type("javafx.scene.control.ButtonBaseBuilder");
+ButtonBuilder                           = Java.type("javafx.scene.control.ButtonBuilder");
+Cell                                    = Java.type("javafx.scene.control.Cell");
+CheckBoxListCell                        = Java.type("javafx.scene.control.cell.CheckBoxListCell");
+CheckBoxListCellBuilder                 = Java.type("javafx.scene.control.cell.CheckBoxListCellBuilder");
+CheckBoxTableCell                       = Java.type("javafx.scene.control.cell.CheckBoxTableCell");
+CheckBoxTableCellBuilder                = Java.type("javafx.scene.control.cell.CheckBoxTableCellBuilder");
+CheckBoxTreeCell                        = Java.type("javafx.scene.control.cell.CheckBoxTreeCell");
+CheckBoxTreeCellBuilder                 = Java.type("javafx.scene.control.cell.CheckBoxTreeCellBuilder");
+ChoiceBoxListCell                       = Java.type("javafx.scene.control.cell.ChoiceBoxListCell");
+ChoiceBoxListCellBuilder                = Java.type("javafx.scene.control.cell.ChoiceBoxListCellBuilder");
+ChoiceBoxTableCell                      = Java.type("javafx.scene.control.cell.ChoiceBoxTableCell");
+ChoiceBoxTableCellBuilder               = Java.type("javafx.scene.control.cell.ChoiceBoxTableCellBuilder");
+ChoiceBoxTreeCell                       = Java.type("javafx.scene.control.cell.ChoiceBoxTreeCell");
+ChoiceBoxTreeCellBuilder                = Java.type("javafx.scene.control.cell.ChoiceBoxTreeCellBuilder");
+ComboBoxListCell                        = Java.type("javafx.scene.control.cell.ComboBoxListCell");
+ComboBoxListCellBuilder                 = Java.type("javafx.scene.control.cell.ComboBoxListCellBuilder");
+ComboBoxTableCell                       = Java.type("javafx.scene.control.cell.ComboBoxTableCell");
+ComboBoxTableCellBuilder                = Java.type("javafx.scene.control.cell.ComboBoxTableCellBuilder");
+ComboBoxTreeCell                        = Java.type("javafx.scene.control.cell.ComboBoxTreeCell");
+ComboBoxTreeCellBuilder                 = Java.type("javafx.scene.control.cell.ComboBoxTreeCellBuilder");
+MapValueFactory                         = Java.type("javafx.scene.control.cell.MapValueFactory");
+ProgressBarTableCell                    = Java.type("javafx.scene.control.cell.ProgressBarTableCell");
+PropertyValueFactory                    = Java.type("javafx.scene.control.cell.PropertyValueFactory");
+PropertyValueFactoryBuilder             = Java.type("javafx.scene.control.cell.PropertyValueFactoryBuilder");
+TextFieldListCell                       = Java.type("javafx.scene.control.cell.TextFieldListCell");
+TextFieldListCellBuilder                = Java.type("javafx.scene.control.cell.TextFieldListCellBuilder");
+TextFieldTableCell                      = Java.type("javafx.scene.control.cell.TextFieldTableCell");
+TextFieldTableCellBuilder               = Java.type("javafx.scene.control.cell.TextFieldTableCellBuilder");
+TextFieldTreeCell                       = Java.type("javafx.scene.control.cell.TextFieldTreeCell");
+TextFieldTreeCellBuilder                = Java.type("javafx.scene.control.cell.TextFieldTreeCellBuilder");
+CellBuilder                             = Java.type("javafx.scene.control.CellBuilder");
+CheckBox                                = Java.type("javafx.scene.control.CheckBox");
+CheckBoxBuilder                         = Java.type("javafx.scene.control.CheckBoxBuilder");
+CheckBoxTreeItem                        = Java.type("javafx.scene.control.CheckBoxTreeItem");
+CheckBoxTreeItem$TreeModificationEvent  = Java.type("javafx.scene.control.CheckBoxTreeItem$TreeModificationEvent");
+CheckBoxTreeItemBuilder                 = Java.type("javafx.scene.control.CheckBoxTreeItemBuilder");
+CheckMenuItem                           = Java.type("javafx.scene.control.CheckMenuItem");
+CheckMenuItemBuilder                    = Java.type("javafx.scene.control.CheckMenuItemBuilder");
+ChoiceBox                               = Java.type("javafx.scene.control.ChoiceBox");
+ChoiceBoxBuilder                        = Java.type("javafx.scene.control.ChoiceBoxBuilder");
+ColorPicker                             = Java.type("javafx.scene.control.ColorPicker");
+ColorPickerBuilder                      = Java.type("javafx.scene.control.ColorPickerBuilder");
+ComboBox                                = Java.type("javafx.scene.control.ComboBox");
+ComboBoxBase                            = Java.type("javafx.scene.control.ComboBoxBase");
+ComboBoxBaseBuilder                     = Java.type("javafx.scene.control.ComboBoxBaseBuilder");
+ComboBoxBuilder                         = Java.type("javafx.scene.control.ComboBoxBuilder");
+ContentDisplay                          = Java.type("javafx.scene.control.ContentDisplay");
+ContextMenu                             = Java.type("javafx.scene.control.ContextMenu");
+ContextMenuBuilder                      = Java.type("javafx.scene.control.ContextMenuBuilder");
+Control                                 = Java.type("javafx.scene.control.Control");
+ControlBuilder                          = Java.type("javafx.scene.control.ControlBuilder");
+CustomMenuItem                          = Java.type("javafx.scene.control.CustomMenuItem");
+CustomMenuItemBuilder                   = Java.type("javafx.scene.control.CustomMenuItemBuilder");
+FocusModel                              = Java.type("javafx.scene.control.FocusModel");
+Hyperlink                               = Java.type("javafx.scene.control.Hyperlink");
+HyperlinkBuilder                        = Java.type("javafx.scene.control.HyperlinkBuilder");
+IndexedCell                             = Java.type("javafx.scene.control.IndexedCell");
+IndexedCellBuilder                      = Java.type("javafx.scene.control.IndexedCellBuilder");
+IndexRange                              = Java.type("javafx.scene.control.IndexRange");
+IndexRangeBuilder                       = Java.type("javafx.scene.control.IndexRangeBuilder");
+Label                                   = Java.type("javafx.scene.control.Label");
+LabelBuilder                            = Java.type("javafx.scene.control.LabelBuilder");
+Labeled                                 = Java.type("javafx.scene.control.Labeled");
+LabeledBuilder                          = Java.type("javafx.scene.control.LabeledBuilder");
+ListCell                                = Java.type("javafx.scene.control.ListCell");
+ListCellBuilder                         = Java.type("javafx.scene.control.ListCellBuilder");
+ListView                                = Java.type("javafx.scene.control.ListView");
+ListView$EditEvent                      = Java.type("javafx.scene.control.ListView$EditEvent");
+ListViewBuilder                         = Java.type("javafx.scene.control.ListViewBuilder");
+Menu                                    = Java.type("javafx.scene.control.Menu");
+MenuBar                                 = Java.type("javafx.scene.control.MenuBar");
+MenuBarBuilder                          = Java.type("javafx.scene.control.MenuBarBuilder");
+MenuBuilder                             = Java.type("javafx.scene.control.MenuBuilder");
+MenuButton                              = Java.type("javafx.scene.control.MenuButton");
+MenuButtonBuilder                       = Java.type("javafx.scene.control.MenuButtonBuilder");
+MenuItem                                = Java.type("javafx.scene.control.MenuItem");
+MenuItemBuilder                         = Java.type("javafx.scene.control.MenuItemBuilder");
+MultipleSelectionModel                  = Java.type("javafx.scene.control.MultipleSelectionModel");
+MultipleSelectionModelBuilder           = Java.type("javafx.scene.control.MultipleSelectionModelBuilder");
+OverrunStyle                            = Java.type("javafx.scene.control.OverrunStyle");
+Pagination                              = Java.type("javafx.scene.control.Pagination");
+PaginationBuilder                       = Java.type("javafx.scene.control.PaginationBuilder");
+PasswordField                           = Java.type("javafx.scene.control.PasswordField");
+PasswordFieldBuilder                    = Java.type("javafx.scene.control.PasswordFieldBuilder");
+PopupControl                            = Java.type("javafx.scene.control.PopupControl");
+PopupControlBuilder                     = Java.type("javafx.scene.control.PopupControlBuilder");
+ProgressBar                             = Java.type("javafx.scene.control.ProgressBar");
+ProgressBarBuilder                      = Java.type("javafx.scene.control.ProgressBarBuilder");
+ProgressIndicator                       = Java.type("javafx.scene.control.ProgressIndicator");
+ProgressIndicatorBuilder                = Java.type("javafx.scene.control.ProgressIndicatorBuilder");
+RadioButton                             = Java.type("javafx.scene.control.RadioButton");
+RadioButtonBuilder                      = Java.type("javafx.scene.control.RadioButtonBuilder");
+RadioMenuItem                           = Java.type("javafx.scene.control.RadioMenuItem");
+RadioMenuItemBuilder                    = Java.type("javafx.scene.control.RadioMenuItemBuilder");
+ScrollBar                               = Java.type("javafx.scene.control.ScrollBar");
+ScrollBarBuilder                        = Java.type("javafx.scene.control.ScrollBarBuilder");
+ScrollPane                              = Java.type("javafx.scene.control.ScrollPane");
+ScrollPane$ScrollBarPolicy              = Java.type("javafx.scene.control.ScrollPane$ScrollBarPolicy");
+ScrollPaneBuilder                       = Java.type("javafx.scene.control.ScrollPaneBuilder");
+SelectionMode                           = Java.type("javafx.scene.control.SelectionMode");
+SelectionModel                          = Java.type("javafx.scene.control.SelectionModel");
+Separator                               = Java.type("javafx.scene.control.Separator");
+SeparatorBuilder                        = Java.type("javafx.scene.control.SeparatorBuilder");
+SeparatorMenuItem                       = Java.type("javafx.scene.control.SeparatorMenuItem");
+SeparatorMenuItemBuilder                = Java.type("javafx.scene.control.SeparatorMenuItemBuilder");
+SingleSelectionModel                    = Java.type("javafx.scene.control.SingleSelectionModel");
+Skin                                    = Java.type("javafx.scene.control.Skin");
+Skinnable                               = Java.type("javafx.scene.control.Skinnable");
+Slider                                  = Java.type("javafx.scene.control.Slider");
+SliderBuilder                           = Java.type("javafx.scene.control.SliderBuilder");
+SplitMenuButton                         = Java.type("javafx.scene.control.SplitMenuButton");
+SplitMenuButtonBuilder                  = Java.type("javafx.scene.control.SplitMenuButtonBuilder");
+SplitPane                               = Java.type("javafx.scene.control.SplitPane");
+SplitPane$Divider                       = Java.type("javafx.scene.control.SplitPane$Divider");
+SplitPaneBuilder                        = Java.type("javafx.scene.control.SplitPaneBuilder");
+Tab                                     = Java.type("javafx.scene.control.Tab");
+TabBuilder                              = Java.type("javafx.scene.control.TabBuilder");
+TableCell                               = Java.type("javafx.scene.control.TableCell");
+TableCellBuilder                        = Java.type("javafx.scene.control.TableCellBuilder");
+TableColumn                             = Java.type("javafx.scene.control.TableColumn");
+TableColumn$CellDataFeatures            = Java.type("javafx.scene.control.TableColumn$CellDataFeatures");
+TableColumn$CellEditEvent               = Java.type("javafx.scene.control.TableColumn$CellEditEvent");
+TableColumn$SortType                    = Java.type("javafx.scene.control.TableColumn$SortType");
+TableColumnBuilder                      = Java.type("javafx.scene.control.TableColumnBuilder");
+TablePosition                           = Java.type("javafx.scene.control.TablePosition");
+//TablePositionBuilder                    = Java.type("javafx.scene.control.TablePositionBuilder");
+TableRow                                = Java.type("javafx.scene.control.TableRow");
+TableRowBuilder                         = Java.type("javafx.scene.control.TableRowBuilder");
+TableView                               = Java.type("javafx.scene.control.TableView");
+TableView$ResizeFeatures                = Java.type("javafx.scene.control.TableView$ResizeFeatures");
+TableView$TableViewFocusModel           = Java.type("javafx.scene.control.TableView$TableViewFocusModel");
+TableView$TableViewSelectionModel       = Java.type("javafx.scene.control.TableView$TableViewSelectionModel");
+TableViewBuilder                        = Java.type("javafx.scene.control.TableViewBuilder");
+TabPane                                 = Java.type("javafx.scene.control.TabPane");
+TabPane$TabClosingPolicy                = Java.type("javafx.scene.control.TabPane$TabClosingPolicy");
+TabPaneBuilder                          = Java.type("javafx.scene.control.TabPaneBuilder");
+TextArea                                = Java.type("javafx.scene.control.TextArea");
+TextAreaBuilder                         = Java.type("javafx.scene.control.TextAreaBuilder");
+TextField                               = Java.type("javafx.scene.control.TextField");
+TextFieldBuilder                        = Java.type("javafx.scene.control.TextFieldBuilder");
+TextInputControl                        = Java.type("javafx.scene.control.TextInputControl");
+TextInputControl$Content                = Java.type("javafx.scene.control.TextInputControl$Content");
+TextInputControlBuilder                 = Java.type("javafx.scene.control.TextInputControlBuilder");
+TitledPane                              = Java.type("javafx.scene.control.TitledPane");
+TitledPaneBuilder                       = Java.type("javafx.scene.control.TitledPaneBuilder");
+Toggle                                  = Java.type("javafx.scene.control.Toggle");
+ToggleButton                            = Java.type("javafx.scene.control.ToggleButton");
+ToggleButtonBuilder                     = Java.type("javafx.scene.control.ToggleButtonBuilder");
+ToggleGroup                             = Java.type("javafx.scene.control.ToggleGroup");
+ToggleGroupBuilder                      = Java.type("javafx.scene.control.ToggleGroupBuilder");
+ToolBar                                 = Java.type("javafx.scene.control.ToolBar");
+ToolBarBuilder                          = Java.type("javafx.scene.control.ToolBarBuilder");
+Tooltip                                 = Java.type("javafx.scene.control.Tooltip");
+TooltipBuilder                          = Java.type("javafx.scene.control.TooltipBuilder");
+TreeCell                                = Java.type("javafx.scene.control.TreeCell");
+TreeCellBuilder                         = Java.type("javafx.scene.control.TreeCellBuilder");
+TreeItem                                = Java.type("javafx.scene.control.TreeItem");
+TreeItem$TreeModificationEvent          = Java.type("javafx.scene.control.TreeItem$TreeModificationEvent");
+TreeItemBuilder                         = Java.type("javafx.scene.control.TreeItemBuilder");
+TreeView                                = Java.type("javafx.scene.control.TreeView");
+TreeView$EditEvent                      = Java.type("javafx.scene.control.TreeView$EditEvent");
+TreeViewBuilder                         = Java.type("javafx.scene.control.TreeViewBuilder");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/src/jdk/nashorn/internal/runtime/resources/fx/fxml.js	Wed Apr 24 14:25:28 2013 -0300
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+FXML                                    = Java.type("javafx.fxml.FXML");
+FXMLLoader                              = Java.type("javafx.fxml.FXMLLoader");
+Initializable                           = Java.type("javafx.fxml.Initializable");
+JavaFXBuilderFactory                    = Java.type("javafx.fxml.JavaFXBuilderFactory");
+LoadException                           = Java.type("javafx.fxml.LoadException");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/src/jdk/nashorn/internal/runtime/resources/fx/graphics.js	Wed Apr 24 14:25:28 2013 -0300
@@ -0,0 +1,327 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+Animation                               = Java.type("javafx.animation.Animation");
+Animation$Status                        = Java.type("javafx.animation.Animation$Status");
+AnimationBuilder                        = Java.type("javafx.animation.AnimationBuilder");
+AnimationTimer                          = Java.type("javafx.animation.AnimationTimer");
+FadeTransition                          = Java.type("javafx.animation.FadeTransition");
+FadeTransitionBuilder                   = Java.type("javafx.animation.FadeTransitionBuilder");
+FillTransition                          = Java.type("javafx.animation.FillTransition");
+FillTransitionBuilder                   = Java.type("javafx.animation.FillTransitionBuilder");
+Interpolatable                          = Java.type("javafx.animation.Interpolatable");
+Interpolator                            = Java.type("javafx.animation.Interpolator");
+KeyFrame                                = Java.type("javafx.animation.KeyFrame");
+KeyValue                                = Java.type("javafx.animation.KeyValue");
+ParallelTransition                      = Java.type("javafx.animation.ParallelTransition");
+ParallelTransitionBuilder               = Java.type("javafx.animation.ParallelTransitionBuilder");
+PathTransition                          = Java.type("javafx.animation.PathTransition");
+PathTransition$OrientationType          = Java.type("javafx.animation.PathTransition$OrientationType");
+PathTransitionBuilder                   = Java.type("javafx.animation.PathTransitionBuilder");
+PauseTransition                         = Java.type("javafx.animation.PauseTransition");
+PauseTransitionBuilder                  = Java.type("javafx.animation.PauseTransitionBuilder");
+RotateTransition                        = Java.type("javafx.animation.RotateTransition");
+RotateTransitionBuilder                 = Java.type("javafx.animation.RotateTransitionBuilder");
+ScaleTransition                         = Java.type("javafx.animation.ScaleTransition");
+ScaleTransitionBuilder                  = Java.type("javafx.animation.ScaleTransitionBuilder");
+SequentialTransition                    = Java.type("javafx.animation.SequentialTransition");
+SequentialTransitionBuilder             = Java.type("javafx.animation.SequentialTransitionBuilder");
+StrokeTransition                        = Java.type("javafx.animation.StrokeTransition");
+StrokeTransitionBuilder                 = Java.type("javafx.animation.StrokeTransitionBuilder");
+Timeline                                = Java.type("javafx.animation.Timeline");
+TimelineBuilder                         = Java.type("javafx.animation.TimelineBuilder");
+Transition                              = Java.type("javafx.animation.Transition");
+TransitionBuilder                       = Java.type("javafx.animation.TransitionBuilder");
+TranslateTransition                     = Java.type("javafx.animation.TranslateTransition");
+TranslateTransitionBuilder              = Java.type("javafx.animation.TranslateTransitionBuilder");
+Application                             = Java.type("javafx.application.Application");
+Application$Parameters                  = Java.type("javafx.application.Application$Parameters");
+ConditionalFeature                      = Java.type("javafx.application.ConditionalFeature");
+HostServices                            = Java.type("javafx.application.HostServices");
+Platform                                = Java.type("javafx.application.Platform");
+Preloader                               = Java.type("javafx.application.Preloader");
+Preloader$ErrorNotification             = Java.type("javafx.application.Preloader$ErrorNotification");
+Preloader$PreloaderNotification         = Java.type("javafx.application.Preloader$PreloaderNotification");
+Preloader$ProgressNotification          = Java.type("javafx.application.Preloader$ProgressNotification");
+Preloader$StateChangeNotification       = Java.type("javafx.application.Preloader$StateChangeNotification");
+Preloader$StateChangeNotification$Type  = Java.type("javafx.application.Preloader$StateChangeNotification$Type");
+Service                                 = Java.type("javafx.concurrent.Service");
+Task                                    = Java.type("javafx.concurrent.Task");
+Worker                                  = Java.type("javafx.concurrent.Worker");
+Worker$State                            = Java.type("javafx.concurrent.Worker$State");
+WorkerStateEvent                        = Java.type("javafx.concurrent.WorkerStateEvent");
+BoundingBox                             = Java.type("javafx.geometry.BoundingBox");
+BoundingBoxBuilder                      = Java.type("javafx.geometry.BoundingBoxBuilder");
+Bounds                                  = Java.type("javafx.geometry.Bounds");
+Dimension2D                             = Java.type("javafx.geometry.Dimension2D");
+Dimension2DBuilder                      = Java.type("javafx.geometry.Dimension2DBuilder");
+HorizontalDirection                     = Java.type("javafx.geometry.HorizontalDirection");
+HPos                                    = Java.type("javafx.geometry.HPos");
+Insets                                  = Java.type("javafx.geometry.Insets");
+InsetsBuilder                           = Java.type("javafx.geometry.InsetsBuilder");
+Orientation                             = Java.type("javafx.geometry.Orientation");
+Point2D                                 = Java.type("javafx.geometry.Point2D");
+Point2DBuilder                          = Java.type("javafx.geometry.Point2DBuilder");
+Point3D                                 = Java.type("javafx.geometry.Point3D");
+Point3DBuilder                          = Java.type("javafx.geometry.Point3DBuilder");
+Pos                                     = Java.type("javafx.geometry.Pos");
+Rectangle2D                             = Java.type("javafx.geometry.Rectangle2D");
+Rectangle2DBuilder                      = Java.type("javafx.geometry.Rectangle2DBuilder");
+Side                                    = Java.type("javafx.geometry.Side");
+VerticalDirection                       = Java.type("javafx.geometry.VerticalDirection");
+VPos                                    = Java.type("javafx.geometry.VPos");
+CacheHint                               = Java.type("javafx.scene.CacheHint");
+Camera                                  = Java.type("javafx.scene.Camera");
+Canvas                                  = Java.type("javafx.scene.canvas.Canvas");
+CanvasBuilder                           = Java.type("javafx.scene.canvas.CanvasBuilder");
+GraphicsContext                         = Java.type("javafx.scene.canvas.GraphicsContext");
+Cursor                                  = Java.type("javafx.scene.Cursor");
+DepthTest                               = Java.type("javafx.scene.DepthTest");
+Blend                                   = Java.type("javafx.scene.effect.Blend");
+BlendBuilder                            = Java.type("javafx.scene.effect.BlendBuilder");
+BlendMode                               = Java.type("javafx.scene.effect.BlendMode");
+Bloom                                   = Java.type("javafx.scene.effect.Bloom");
+BloomBuilder                            = Java.type("javafx.scene.effect.BloomBuilder");
+BlurType                                = Java.type("javafx.scene.effect.BlurType");
+BoxBlur                                 = Java.type("javafx.scene.effect.BoxBlur");
+BoxBlurBuilder                          = Java.type("javafx.scene.effect.BoxBlurBuilder");
+ColorAdjust                             = Java.type("javafx.scene.effect.ColorAdjust");
+ColorAdjustBuilder                      = Java.type("javafx.scene.effect.ColorAdjustBuilder");
+ColorInput                              = Java.type("javafx.scene.effect.ColorInput");
+ColorInputBuilder                       = Java.type("javafx.scene.effect.ColorInputBuilder");
+DisplacementMap                         = Java.type("javafx.scene.effect.DisplacementMap");
+DisplacementMapBuilder                  = Java.type("javafx.scene.effect.DisplacementMapBuilder");
+DropShadow                              = Java.type("javafx.scene.effect.DropShadow");
+DropShadowBuilder                       = Java.type("javafx.scene.effect.DropShadowBuilder");
+Effect                                  = Java.type("javafx.scene.effect.Effect");
+FloatMap                                = Java.type("javafx.scene.effect.FloatMap");
+FloatMapBuilder                         = Java.type("javafx.scene.effect.FloatMapBuilder");
+GaussianBlur                            = Java.type("javafx.scene.effect.GaussianBlur");
+GaussianBlurBuilder                     = Java.type("javafx.scene.effect.GaussianBlurBuilder");
+Glow                                    = Java.type("javafx.scene.effect.Glow");
+GlowBuilder                             = Java.type("javafx.scene.effect.GlowBuilder");
+ImageInput                              = Java.type("javafx.scene.effect.ImageInput");
+ImageInputBuilder                       = Java.type("javafx.scene.effect.ImageInputBuilder");
+InnerShadow                             = Java.type("javafx.scene.effect.InnerShadow");
+InnerShadowBuilder                      = Java.type("javafx.scene.effect.InnerShadowBuilder");
+Light                                   = Java.type("javafx.scene.effect.Light");
+Light$Distant                           = Java.type("javafx.scene.effect.Light$Distant");
+Light$Point                             = Java.type("javafx.scene.effect.Light$Point");
+Light$Spot                              = Java.type("javafx.scene.effect.Light$Spot");
+LightBuilder                            = Java.type("javafx.scene.effect.LightBuilder");
+Lighting                                = Java.type("javafx.scene.effect.Lighting");
+LightingBuilder                         = Java.type("javafx.scene.effect.LightingBuilder");
+MotionBlur                              = Java.type("javafx.scene.effect.MotionBlur");
+MotionBlurBuilder                       = Java.type("javafx.scene.effect.MotionBlurBuilder");
+PerspectiveTransform                    = Java.type("javafx.scene.effect.PerspectiveTransform");
+PerspectiveTransformBuilder             = Java.type("javafx.scene.effect.PerspectiveTransformBuilder");
+Reflection                              = Java.type("javafx.scene.effect.Reflection");
+ReflectionBuilder                       = Java.type("javafx.scene.effect.ReflectionBuilder");
+SepiaTone                               = Java.type("javafx.scene.effect.SepiaTone");
+SepiaToneBuilder                        = Java.type("javafx.scene.effect.SepiaToneBuilder");
+Shadow                                  = Java.type("javafx.scene.effect.Shadow");
+ShadowBuilder                           = Java.type("javafx.scene.effect.ShadowBuilder");
+GroupBuilder                            = Java.type("javafx.scene.GroupBuilder");
+Image                                   = Java.type("javafx.scene.image.Image");
+ImageView                               = Java.type("javafx.scene.image.ImageView");
+ImageViewBuilder                        = Java.type("javafx.scene.image.ImageViewBuilder");
+PixelFormat                             = Java.type("javafx.scene.image.PixelFormat");
+PixelFormat$Type                        = Java.type("javafx.scene.image.PixelFormat$Type");
+PixelReader                             = Java.type("javafx.scene.image.PixelReader");
+PixelWriter                             = Java.type("javafx.scene.image.PixelWriter");
+WritableImage                           = Java.type("javafx.scene.image.WritableImage");
+WritablePixelFormat                     = Java.type("javafx.scene.image.WritablePixelFormat");
+ImageCursor                             = Java.type("javafx.scene.ImageCursor");
+ImageCursorBuilder                      = Java.type("javafx.scene.ImageCursorBuilder");
+Clipboard                               = Java.type("javafx.scene.input.Clipboard");
+ClipboardContent                        = Java.type("javafx.scene.input.ClipboardContent");
+ClipboardContentBuilder                 = Java.type("javafx.scene.input.ClipboardContentBuilder");
+ContextMenuEvent                        = Java.type("javafx.scene.input.ContextMenuEvent");
+DataFormat                              = Java.type("javafx.scene.input.DataFormat");
+Dragboard                               = Java.type("javafx.scene.input.Dragboard");
+DragEvent                               = Java.type("javafx.scene.input.DragEvent");
+GestureEvent                            = Java.type("javafx.scene.input.GestureEvent");
+InputEvent                              = Java.type("javafx.scene.input.InputEvent");
+InputMethodEvent                        = Java.type("javafx.scene.input.InputMethodEvent");
+InputMethodHighlight                    = Java.type("javafx.scene.input.InputMethodHighlight");
+InputMethodRequests                     = Java.type("javafx.scene.input.InputMethodRequests");
+InputMethodTextRun                      = Java.type("javafx.scene.input.InputMethodTextRun");
+KeyCharacterCombination                 = Java.type("javafx.scene.input.KeyCharacterCombination");
+KeyCharacterCombinationBuilder          = Java.type("javafx.scene.input.KeyCharacterCombinationBuilder");
+KeyCode                                 = Java.type("javafx.scene.input.KeyCode");
+KeyCodeCombination                      = Java.type("javafx.scene.input.KeyCodeCombination");
+KeyCodeCombinationBuilder               = Java.type("javafx.scene.input.KeyCodeCombinationBuilder");
+KeyCombination                          = Java.type("javafx.scene.input.KeyCombination");
+KeyCombination$Modifier                 = Java.type("javafx.scene.input.KeyCombination$Modifier");
+KeyCombination$ModifierValue            = Java.type("javafx.scene.input.KeyCombination$ModifierValue");
+KeyEvent                                = Java.type("javafx.scene.input.KeyEvent");
+Mnemonic                                = Java.type("javafx.scene.input.Mnemonic");
+MnemonicBuilder                         = Java.type("javafx.scene.input.MnemonicBuilder");
+MouseButton                             = Java.type("javafx.scene.input.MouseButton");
+MouseDragEvent                          = Java.type("javafx.scene.input.MouseDragEvent");
+MouseEvent                              = Java.type("javafx.scene.input.MouseEvent");
+RotateEvent                             = Java.type("javafx.scene.input.RotateEvent");
+ScrollEvent                             = Java.type("javafx.scene.input.ScrollEvent");
+ScrollEvent$HorizontalTextScrollUnits   = Java.type("javafx.scene.input.ScrollEvent$HorizontalTextScrollUnits");
+ScrollEvent$VerticalTextScrollUnits     = Java.type("javafx.scene.input.ScrollEvent$VerticalTextScrollUnits");
+SwipeEvent                              = Java.type("javafx.scene.input.SwipeEvent");
+TouchEvent                              = Java.type("javafx.scene.input.TouchEvent");
+TouchPoint                              = Java.type("javafx.scene.input.TouchPoint");
+TouchPoint$State                        = Java.type("javafx.scene.input.TouchPoint$State");
+TransferMode                            = Java.type("javafx.scene.input.TransferMode");
+ZoomEvent                               = Java.type("javafx.scene.input.ZoomEvent");
+AnchorPane                              = Java.type("javafx.scene.layout.AnchorPane");
+AnchorPaneBuilder                       = Java.type("javafx.scene.layout.AnchorPaneBuilder");
+BorderPane                              = Java.type("javafx.scene.layout.BorderPane");
+BorderPaneBuilder                       = Java.type("javafx.scene.layout.BorderPaneBuilder");
+ColumnConstraints                       = Java.type("javafx.scene.layout.ColumnConstraints");
+ColumnConstraintsBuilder                = Java.type("javafx.scene.layout.ColumnConstraintsBuilder");
+ConstraintsBase                         = Java.type("javafx.scene.layout.ConstraintsBase");
+FlowPane                                = Java.type("javafx.scene.layout.FlowPane");
+FlowPaneBuilder                         = Java.type("javafx.scene.layout.FlowPaneBuilder");
+GridPane                                = Java.type("javafx.scene.layout.GridPane");
+GridPaneBuilder                         = Java.type("javafx.scene.layout.GridPaneBuilder");
+HBox                                    = Java.type("javafx.scene.layout.HBox");
+HBoxBuilder                             = Java.type("javafx.scene.layout.HBoxBuilder");
+Pane                                    = Java.type("javafx.scene.layout.Pane");
+PaneBuilder                             = Java.type("javafx.scene.layout.PaneBuilder");
+Priority                                = Java.type("javafx.scene.layout.Priority");
+Region                                  = Java.type("javafx.scene.layout.Region");
+RegionBuilder                           = Java.type("javafx.scene.layout.RegionBuilder");
+RowConstraints                          = Java.type("javafx.scene.layout.RowConstraints");
+RowConstraintsBuilder                   = Java.type("javafx.scene.layout.RowConstraintsBuilder");
+StackPane                               = Java.type("javafx.scene.layout.StackPane");
+StackPaneBuilder                        = Java.type("javafx.scene.layout.StackPaneBuilder");
+TilePane                                = Java.type("javafx.scene.layout.TilePane");
+TilePaneBuilder                         = Java.type("javafx.scene.layout.TilePaneBuilder");
+VBox                                    = Java.type("javafx.scene.layout.VBox");
+VBoxBuilder                             = Java.type("javafx.scene.layout.VBoxBuilder");
+Node                                    = Java.type("javafx.scene.Node");
+NodeBuilder                             = Java.type("javafx.scene.NodeBuilder");
+Color                                   = Java.type("javafx.scene.paint.Color");
+ColorBuilder                            = Java.type("javafx.scene.paint.ColorBuilder");
+CycleMethod                             = Java.type("javafx.scene.paint.CycleMethod");
+ImagePattern                            = Java.type("javafx.scene.paint.ImagePattern");
+ImagePatternBuilder                     = Java.type("javafx.scene.paint.ImagePatternBuilder");
+LinearGradient                          = Java.type("javafx.scene.paint.LinearGradient");
+LinearGradientBuilder                   = Java.type("javafx.scene.paint.LinearGradientBuilder");
+Paint                                   = Java.type("javafx.scene.paint.Paint");
+RadialGradient                          = Java.type("javafx.scene.paint.RadialGradient");
+RadialGradientBuilder                   = Java.type("javafx.scene.paint.RadialGradientBuilder");
+Stop                                    = Java.type("javafx.scene.paint.Stop");
+StopBuilder                             = Java.type("javafx.scene.paint.StopBuilder");
+ParallelCamera                          = Java.type("javafx.scene.ParallelCamera");
+Parent                                  = Java.type("javafx.scene.Parent");
+ParentBuilder                           = Java.type("javafx.scene.ParentBuilder");
+PerspectiveCamera                       = Java.type("javafx.scene.PerspectiveCamera");
+PerspectiveCameraBuilder                = Java.type("javafx.scene.PerspectiveCameraBuilder");
+//SceneAccessor                           = Java.type("javafx.scene.SceneAccessor");
+SceneBuilder                            = Java.type("javafx.scene.SceneBuilder");
+Arc                                     = Java.type("javafx.scene.shape.Arc");
+ArcBuilder                              = Java.type("javafx.scene.shape.ArcBuilder");
+ArcTo                                   = Java.type("javafx.scene.shape.ArcTo");
+ArcToBuilder                            = Java.type("javafx.scene.shape.ArcToBuilder");
+ArcType                                 = Java.type("javafx.scene.shape.ArcType");
+Circle                                  = Java.type("javafx.scene.shape.Circle");
+CircleBuilder                           = Java.type("javafx.scene.shape.CircleBuilder");
+ClosePath                               = Java.type("javafx.scene.shape.ClosePath");
+ClosePathBuilder                        = Java.type("javafx.scene.shape.ClosePathBuilder");
+CubicCurve                              = Java.type("javafx.scene.shape.CubicCurve");
+CubicCurveBuilder                       = Java.type("javafx.scene.shape.CubicCurveBuilder");
+CubicCurveTo                            = Java.type("javafx.scene.shape.CubicCurveTo");
+CubicCurveToBuilder                     = Java.type("javafx.scene.shape.CubicCurveToBuilder");
+Ellipse                                 = Java.type("javafx.scene.shape.Ellipse");
+EllipseBuilder                          = Java.type("javafx.scene.shape.EllipseBuilder");
+FillRule                                = Java.type("javafx.scene.shape.FillRule");
+HLineTo                                 = Java.type("javafx.scene.shape.HLineTo");
+HLineToBuilder                          = Java.type("javafx.scene.shape.HLineToBuilder");
+Line                                    = Java.type("javafx.scene.shape.Line");
+LineBuilder                             = Java.type("javafx.scene.shape.LineBuilder");
+LineTo                                  = Java.type("javafx.scene.shape.LineTo");
+LineToBuilder                           = Java.type("javafx.scene.shape.LineToBuilder");
+MoveTo                                  = Java.type("javafx.scene.shape.MoveTo");
+MoveToBuilder                           = Java.type("javafx.scene.shape.MoveToBuilder");
+Path                                    = Java.type("javafx.scene.shape.Path");
+PathBuilder                             = Java.type("javafx.scene.shape.PathBuilder");
+PathElement                             = Java.type("javafx.scene.shape.PathElement");
+PathElementBuilder                      = Java.type("javafx.scene.shape.PathElementBuilder");
+Polygon                                 = Java.type("javafx.scene.shape.Polygon");
+PolygonBuilder                          = Java.type("javafx.scene.shape.PolygonBuilder");
+Polyline                                = Java.type("javafx.scene.shape.Polyline");
+PolylineBuilder                         = Java.type("javafx.scene.shape.PolylineBuilder");
+QuadCurve                               = Java.type("javafx.scene.shape.QuadCurve");
+QuadCurveBuilder                        = Java.type("javafx.scene.shape.QuadCurveBuilder");
+QuadCurveTo                             = Java.type("javafx.scene.shape.QuadCurveTo");
+QuadCurveToBuilder                      = Java.type("javafx.scene.shape.QuadCurveToBuilder");
+Rectangle                               = Java.type("javafx.scene.shape.Rectangle");
+RectangleBuilder                        = Java.type("javafx.scene.shape.RectangleBuilder");
+Shape                                   = Java.type("javafx.scene.shape.Shape");
+ShapeBuilder                            = Java.type("javafx.scene.shape.ShapeBuilder");
+StrokeLineCap                           = Java.type("javafx.scene.shape.StrokeLineCap");
+StrokeLineJoin                          = Java.type("javafx.scene.shape.StrokeLineJoin");
+StrokeType                              = Java.type("javafx.scene.shape.StrokeType");
+SVGPath                                 = Java.type("javafx.scene.shape.SVGPath");
+SVGPathBuilder                          = Java.type("javafx.scene.shape.SVGPathBuilder");
+VLineTo                                 = Java.type("javafx.scene.shape.VLineTo");
+VLineToBuilder                          = Java.type("javafx.scene.shape.VLineToBuilder");
+SnapshotParameters                      = Java.type("javafx.scene.SnapshotParameters");
+SnapshotParametersBuilder               = Java.type("javafx.scene.SnapshotParametersBuilder");
+SnapshotResult                          = Java.type("javafx.scene.SnapshotResult");
+Font                                    = Java.type("javafx.scene.text.Font");
+FontBuilder                             = Java.type("javafx.scene.text.FontBuilder");
+FontPosture                             = Java.type("javafx.scene.text.FontPosture");
+FontSmoothingType                       = Java.type("javafx.scene.text.FontSmoothingType");
+FontWeight                              = Java.type("javafx.scene.text.FontWeight");
+Text                                    = Java.type("javafx.scene.text.Text");
+TextAlignment                           = Java.type("javafx.scene.text.TextAlignment");
+TextBoundsType                          = Java.type("javafx.scene.text.TextBoundsType");
+TextBuilder                             = Java.type("javafx.scene.text.TextBuilder");
+Affine                                  = Java.type("javafx.scene.transform.Affine");
+AffineBuilder                           = Java.type("javafx.scene.transform.AffineBuilder");
+Rotate                                  = Java.type("javafx.scene.transform.Rotate");
+RotateBuilder                           = Java.type("javafx.scene.transform.RotateBuilder");
+Scale                                   = Java.type("javafx.scene.transform.Scale");
+ScaleBuilder                            = Java.type("javafx.scene.transform.ScaleBuilder");
+Shear                                   = Java.type("javafx.scene.transform.Shear");
+ShearBuilder                            = Java.type("javafx.scene.transform.ShearBuilder");
+Transform                               = Java.type("javafx.scene.transform.Transform");
+Translate                               = Java.type("javafx.scene.transform.Translate");
+TranslateBuilder                        = Java.type("javafx.scene.transform.TranslateBuilder");
+DirectoryChooser                        = Java.type("javafx.stage.DirectoryChooser");
+DirectoryChooserBuilder                 = Java.type("javafx.stage.DirectoryChooserBuilder");
+FileChooser                             = Java.type("javafx.stage.FileChooser");
+FileChooser$ExtensionFilter             = Java.type("javafx.stage.FileChooser$ExtensionFilter");
+FileChooserBuilder                      = Java.type("javafx.stage.FileChooserBuilder");
+Modality                                = Java.type("javafx.stage.Modality");
+Popup                                   = Java.type("javafx.stage.Popup");
+PopupBuilder                            = Java.type("javafx.stage.PopupBuilder");
+PopupWindow                             = Java.type("javafx.stage.PopupWindow");
+PopupWindowBuilder                      = Java.type("javafx.stage.PopupWindowBuilder");
+Stage                                   = Java.type("javafx.stage.Stage");
+StageBuilder                            = Java.type("javafx.stage.StageBuilder");
+StageStyle                              = Java.type("javafx.stage.StageStyle");
+Window                                  = Java.type("javafx.stage.Window");
+WindowBuilder                           = Java.type("javafx.stage.WindowBuilder");
+WindowEvent                             = Java.type("javafx.stage.WindowEvent");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/src/jdk/nashorn/internal/runtime/resources/fx/media.js	Wed Apr 24 14:25:28 2013 -0300
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+AudioClip                               = Java.type("javafx.scene.media.AudioClip");
+AudioClipBuilder                        = Java.type("javafx.scene.media.AudioClipBuilder");
+AudioEqualizer                          = Java.type("javafx.scene.media.AudioEqualizer");
+AudioSpectrumListener                   = Java.type("javafx.scene.media.AudioSpectrumListener");
+AudioTrack                              = Java.type("javafx.scene.media.AudioTrack");
+EqualizerBand                           = Java.type("javafx.scene.media.EqualizerBand");
+Media                                   = Java.type("javafx.scene.media.Media");
+MediaBuilder                            = Java.type("javafx.scene.media.MediaBuilder");
+MediaErrorEvent                         = Java.type("javafx.scene.media.MediaErrorEvent");
+MediaException                          = Java.type("javafx.scene.media.MediaException");
+MediaException$Type                     = Java.type("javafx.scene.media.MediaException$Type");
+MediaMarkerEvent                        = Java.type("javafx.scene.media.MediaMarkerEvent");
+MediaPlayer                             = Java.type("javafx.scene.media.MediaPlayer");
+MediaPlayer$Status                      = Java.type("javafx.scene.media.MediaPlayer$Status");
+MediaPlayerBuilder                      = Java.type("javafx.scene.media.MediaPlayerBuilder");
+MediaView                               = Java.type("javafx.scene.media.MediaView");
+MediaViewBuilder                        = Java.type("javafx.scene.media.MediaViewBuilder");
+Track                                   = Java.type("javafx.scene.media.Track");
+VideoTrack                              = Java.type("javafx.scene.media.VideoTrack");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/src/jdk/nashorn/internal/runtime/resources/fx/swing.js	Wed Apr 24 14:25:28 2013 -0300
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+JFXPanel                                = Java.type("javafx.embed.swing.JFXPanel");
+JFXPanelBuilder                         = Java.type("javafx.embed.swing.JFXPanelBuilder");
+SwingFXUtils                            = Java.type("javafx.embed.swing.SwingFXUtils");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/src/jdk/nashorn/internal/runtime/resources/fx/swt.js	Wed Apr 24 14:25:28 2013 -0300
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+CustomTransfer                          = Java.type("javafx.embed.swt.CustomTransfer");
+CustomTransferBuilder                   = Java.type("javafx.embed.swt.CustomTransferBuilder");
+FXCanvas                                = Java.type("javafx.embed.swt.FXCanvas");
+SWTFXUtils                              = Java.type("javafx.embed.swt.SWTFXUtils");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/src/jdk/nashorn/internal/runtime/resources/fx/web.js	Wed Apr 24 14:25:28 2013 -0300
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+HTMLEditor                              = Java.type("javafx.scene.web.HTMLEditor");
+HTMLEditorBuilder                       = Java.type("javafx.scene.web.HTMLEditorBuilder");
+PopupFeatures                           = Java.type("javafx.scene.web.PopupFeatures");
+PromptData                              = Java.type("javafx.scene.web.PromptData");
+PromptDataBuilder                       = Java.type("javafx.scene.web.PromptDataBuilder");
+WebEngine                               = Java.type("javafx.scene.web.WebEngine");
+WebEngineBuilder                        = Java.type("javafx.scene.web.WebEngineBuilder");
+WebEvent                                = Java.type("javafx.scene.web.WebEvent");
+WebHistory                              = Java.type("javafx.scene.web.WebHistory");
+WebView                                 = Java.type("javafx.scene.web.WebView");
+WebViewBuilder                          = Java.type("javafx.scene.web.WebViewBuilder");
--- a/nashorn/src/jdk/nashorn/tools/Shell.java	Wed Apr 24 13:36:31 2013 +0200
+++ b/nashorn/src/jdk/nashorn/tools/Shell.java	Wed Apr 24 14:25:28 2013 -0300
@@ -47,6 +47,7 @@
 import jdk.nashorn.internal.parser.Parser;
 import jdk.nashorn.internal.runtime.Context;
 import jdk.nashorn.internal.runtime.ErrorManager;
+import jdk.nashorn.internal.runtime.Property;
 import jdk.nashorn.internal.runtime.ScriptEnvironment;
 import jdk.nashorn.internal.runtime.ScriptFunction;
 import jdk.nashorn.internal.runtime.ScriptObject;
@@ -170,7 +171,11 @@
             return compileScripts(context, global, files);
         }
 
-        return runScripts(context, global, files);
+        if (env._fx) {
+            return runFXScripts(context, global, files);
+        } else {
+            return runScripts(context, global, files);
+        }
     }
 
     /**
@@ -328,6 +333,46 @@
     }
 
     /**
+     * Runs launches "fx:bootstrap.js" with the given JavaScript files provided
+     * as arguments.
+     *
+     * @param context the nashorn context
+     * @param global the global scope
+     * @param files the list of script files to provide
+     *
+     * @return error code
+     * @throws IOException when any script file read results in I/O error
+     */
+    private int runFXScripts(final Context context, final ScriptObject global, final List<String> files) throws IOException {
+        final ScriptObject oldGlobal = Context.getGlobal();
+        final boolean globalChanged = (oldGlobal != global);
+        try {
+            if (globalChanged) {
+                Context.setGlobal(global);
+            }
+
+            global.addOwnProperty("$GLOBAL", Property.NOT_ENUMERABLE, global);
+            global.addOwnProperty("$SCRIPTS", Property.NOT_ENUMERABLE, files);
+            context.load(global, "fx:bootstrap.js");
+        } catch (final NashornException e) {
+            context.getErrorManager().error(e.toString());
+            if (context.getEnv()._dump_on_error) {
+                e.printStackTrace(context.getErr());
+            }
+
+            return RUNTIME_ERROR;
+        } finally {
+            context.getOut().flush();
+            context.getErr().flush();
+            if (globalChanged) {
+                Context.setGlobal(oldGlobal);
+            }
+        }
+
+        return SUCCESS;
+    }
+
+    /**
      * Hook to ScriptFunction "apply". A performance metering shell may
      * introduce enter/exit timing here.
      *
--- a/nashorn/tools/fxshell/jdk/nashorn/tools/FXShell.java	Wed Apr 24 13:36:31 2013 +0200
+++ b/nashorn/tools/fxshell/jdk/nashorn/tools/FXShell.java	Wed Apr 24 14:25:28 2013 -0300
@@ -178,7 +178,7 @@
      *
      * @param path Path to UTF-8 encoded JavaScript file.
      *
-     * @return Last evalulation result (discarded.)
+     * @return Last evaluation result (discarded.)
      */
     private Object load(String path) {
         try {