< prev index next >

test/javax/script/ExceptionTest.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2006, 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. --- 1,7 ---- /* ! * Copyright (c) 2006, 2016, 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.
*** 24,37 **** /* * @test * @bug 6474943 6705893 * @summary Test that script engine exception messages are * available from ScriptException. */ ! import java.io.*; ! import javax.script.*; public class ExceptionTest { private static final String ERROR_MSG = "error from JavaScript"; public static void main(String[] args) throws Exception { --- 24,41 ---- /* * @test * @bug 6474943 6705893 * @summary Test that script engine exception messages are * available from ScriptException. + * @modules jdk.scripting.nashorn */ ! import javax.script.Compilable; ! import javax.script.CompiledScript; ! import javax.script.ScriptEngine; ! import javax.script.ScriptEngineManager; ! import javax.script.ScriptException; public class ExceptionTest { private static final String ERROR_MSG = "error from JavaScript"; public static void main(String[] args) throws Exception {
< prev index next >