src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/NashornScriptEngine.java
equal
deleted
inserted
replaced
65 * JSR-223 compliant script engine for Nashorn. Instances are not created directly, but rather returned through |
65 * JSR-223 compliant script engine for Nashorn. Instances are not created directly, but rather returned through |
66 * {@link NashornScriptEngineFactory#getScriptEngine()}. Note that this engine implements the {@link Compilable} and |
66 * {@link NashornScriptEngineFactory#getScriptEngine()}. Note that this engine implements the {@link Compilable} and |
67 * {@link Invocable} interfaces, allowing for efficient precompilation and repeated execution of scripts. |
67 * {@link Invocable} interfaces, allowing for efficient precompilation and repeated execution of scripts. |
68 * @see NashornScriptEngineFactory |
68 * @see NashornScriptEngineFactory |
69 * |
69 * |
|
70 * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool |
|
71 * are deprecated with the intent to remove them in a future release. |
|
72 * |
70 * @since 1.8u40 |
73 * @since 1.8u40 |
71 */ |
74 */ |
|
75 @Deprecated(since="11", forRemoval=true) |
72 public final class NashornScriptEngine extends AbstractScriptEngine implements Compilable, Invocable { |
76 public final class NashornScriptEngine extends AbstractScriptEngine implements Compilable, Invocable { |
73 /** |
77 /** |
74 * Key used to associate Nashorn global object mirror with arbitrary Bindings instance. |
78 * Key used to associate Nashorn global object mirror with arbitrary Bindings instance. |
75 */ |
79 */ |
76 public static final String NASHORN_GLOBAL = "nashorn.global"; |
80 public static final String NASHORN_GLOBAL = "nashorn.global"; |
132 } |
136 } |
133 throw e; |
137 throw e; |
134 } |
138 } |
135 } |
139 } |
136 }, CREATE_CONTEXT_ACC_CTXT); |
140 }, CREATE_CONTEXT_ACC_CTXT); |
|
141 |
|
142 if (!nashornContext.getEnv()._no_deprecation_warning) { |
|
143 System.err.println("Warning: Nashorn engine is planned to be removed from a future JDK release"); |
|
144 } |
137 |
145 |
138 // cache this option that is used often |
146 // cache this option that is used often |
139 this._global_per_engine = nashornContext.getEnv()._global_per_engine; |
147 this._global_per_engine = nashornContext.getEnv()._global_per_engine; |
140 |
148 |
141 // create new global object |
149 // create new global object |