8341134: Deprecate for removal the jrunscript tool

Reviewed-by: mchung, alanb, sundar
This commit is contained in:
Jaikiran Pai 2024-10-18 00:57:11 +00:00
parent ffe60919df
commit 7a16906ed0
4 changed files with 14 additions and 4 deletions
src/java.scripting/share

@ -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);

@ -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.

@ -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, <em>{@index jrunscript jrunscript tool}</em>,
* that supports executing JavaScript and other languages if its corresponding
* script engine is installed.
* <p> The {@code jrunscript} tool is deprecated and will be removed
* in a future release.
*
* @toolGuide jrunscript
*

@ -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