diff --git a/src/java.scripting/share/classes/com/sun/tools/script/shell/Main.java b/src/java.scripting/share/classes/com/sun/tools/script/shell/Main.java index 55b0daa1a61..f1ac21bbfbb 100644 --- a/src/java.scripting/share/classes/com/sun/tools/script/shell/Main.java +++ b/src/java.scripting/share/classes/com/sun/tools/script/shell/Main.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2024, 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 @@ -40,6 +40,10 @@ public class Main { * @param args command line argument array */ public static void main(String[] args) { + // print deprecation warning + getError().println(getMessage("deprecated.warning", + new Object[] { PROGRAM_NAME })); + // parse command line options String[] scriptArgs = processOptions(args); diff --git a/src/java.scripting/share/classes/com/sun/tools/script/shell/messages.properties b/src/java.scripting/share/classes/com/sun/tools/script/shell/messages.properties index 096842465b6..a6c7762ed34 100644 --- a/src/java.scripting/share/classes/com/sun/tools/script/shell/messages.properties +++ b/src/java.scripting/share/classes/com/sun/tools/script/shell/messages.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2024, 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 @@ -63,3 +63,6 @@ argument is script file and the rest of the arguments, if any, are passed\n\ as script arguments. If [arguments..] and -e or -f option is used, then all\n\ [arguments..] are passed as script arguments. If [arguments..], -e, -f are\n\ missing, then interactive mode is used. + +deprecated.warning=\ + Warning: {0} is deprecated and will be removed in a future release. \ No newline at end of file diff --git a/src/java.scripting/share/classes/module-info.java b/src/java.scripting/share/classes/module-info.java index 4367a55a5a1..db7ac3db1b5 100644 --- a/src/java.scripting/share/classes/module-info.java +++ b/src/java.scripting/share/classes/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2024, 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 @@ -30,6 +30,8 @@ * command-line script shell, {@index jrunscript jrunscript tool}, * that supports executing JavaScript and other languages if its corresponding * script engine is installed. + *

The {@code jrunscript} tool is deprecated and will be removed + * in a future release. * * @toolGuide jrunscript * diff --git a/src/java.scripting/share/man/jrunscript.1 b/src/java.scripting/share/man/jrunscript.1 index 59389c274d1..491c3cb3be3 100644 --- a/src/java.scripting/share/man/jrunscript.1 +++ b/src/java.scripting/share/man/jrunscript.1 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved. +.\" Copyright (c) 2006, 2024, 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 @@ -46,6 +46,7 @@ and batch modes \f[B]Note:\f[R] .PP This tool is \f[B]experimental\f[R] and unsupported. +It is deprecated and will be removed in a future release. .PP \f[V]jrunscript\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]] .TP