8193503: javah launcher was not removed by JDK-8191054

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

8193503: javah launcher was not removed by JDK-8191054

Alan Bateman
Jon removed the code for javah from the jdk.compiler module with
JDK-8191054 but the build still creates a launcher that is now DOA with
"Error: Could not find or load main class com.sun.tools.javah.Main in
module jdk.compiler". This is caught by one of the launcher tests that
checks the options of every tool in the bin directory.

The changes to drop the build of the javah launcher are trivial and I
think we should get this into jdk/jdk before the fork for jdk/jdk10.

-Alan


diff --git a/make/launcher/Launcher-jdk.compiler.gmk
b/make/launcher/Launcher-jdk.compiler.gmk
--- a/make/launcher/Launcher-jdk.compiler.gmk
+++ b/make/launcher/Launcher-jdk.compiler.gmk
@@ -1,5 +1,5 @@
  #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights
reserved.
+# Copyright (c) 2011, 2017, 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
@@ -31,11 +31,6 @@
     CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
  ))

-$(eval $(call SetupBuildLauncher, javah, \
-    MAIN_CLASS := com.sun.tools.javah.Main, \
-    CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
-))
-
  $(eval $(call SetupBuildLauncher, serialver, \
      MAIN_CLASS := sun.tools.serialver.SerialVer, \
      CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
diff --git a/test/jdk/tools/launcher/ToolsOpts.java
b/test/jdk/tools/launcher/ToolsOpts.java
--- a/test/jdk/tools/launcher/ToolsOpts.java
+++ b/test/jdk/tools/launcher/ToolsOpts.java
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, 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
@@ -24,7 +24,7 @@
  /*
   * @test
   * @bug 8002091
- * @summary Test options patterns for javac,javah,javap and javadoc using
+ * @summary Test options patterns for javac,javap and javadoc using
   * javac as a test launcher. Create a dummy javac and intercept
options to check
   * reception of options as passed through the launcher without having
to launch
   * javac. Only -J and -cp ./* options should be consumed by the launcher.
Reply | Threaded
Open this post in threaded view
|

Re: 8193503: javah launcher was not removed by JDK-8191054

joe darcy
On 12/14/2017 1:12 AM, Alan Bateman wrote:
> Jon removed the code for javah from the jdk.compiler module with
> JDK-8191054 but the build still creates a launcher that is now DOA
> with "Error: Could not find or load main class
> com.sun.tools.javah.Main in module jdk.compiler". This is caught by
> one of the launcher tests that checks the options of every tool in the
> bin directory.
>
> The changes to drop the build of the javah launcher are trivial and I
> think we should get this into jdk/jdk before the fork for jdk/jdk10.

I added a similar comment in JDK-8193492:
tools/launcher/VersionCheck.java need to be updated after JDK-8191054

https://bugs.openjdk.java.net/browse/JDK-8193492?focusedCommentId=14140245&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14140245

and with the update to Launcher-jdk.compiler.gmk the javah binary does
indeed seem to be omitted from the bin dir.

+1

-Joe

>
> -Alan
>
>
> diff --git a/make/launcher/Launcher-jdk.compiler.gmk
> b/make/launcher/Launcher-jdk.compiler.gmk
> --- a/make/launcher/Launcher-jdk.compiler.gmk
> +++ b/make/launcher/Launcher-jdk.compiler.gmk
> @@ -1,5 +1,5 @@
>  #
> -# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights
> reserved.
> +# Copyright (c) 2011, 2017, 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
> @@ -31,11 +31,6 @@
>     CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
>  ))
>
> -$(eval $(call SetupBuildLauncher, javah, \
> -    MAIN_CLASS := com.sun.tools.javah.Main, \
> -    CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
> -))
> -
>  $(eval $(call SetupBuildLauncher, serialver, \
>      MAIN_CLASS := sun.tools.serialver.SerialVer, \
>      CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
> diff --git a/test/jdk/tools/launcher/ToolsOpts.java
> b/test/jdk/tools/launcher/ToolsOpts.java
> --- a/test/jdk/tools/launcher/ToolsOpts.java
> +++ b/test/jdk/tools/launcher/ToolsOpts.java
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2012, Oracle and/or its affiliates. All rights
> reserved.
> + * Copyright (c) 2012, 2017, 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
> @@ -24,7 +24,7 @@
>  /*
>   * @test
>   * @bug 8002091
> - * @summary Test options patterns for javac,javah,javap and javadoc
> using
> + * @summary Test options patterns for javac,javap and javadoc using
>   * javac as a test launcher. Create a dummy javac and intercept
> options to check
>   * reception of options as passed through the launcher without having
> to launch
>   * javac. Only -J and -cp ./* options should be consumed by the
> launcher.

Reply | Threaded
Open this post in threaded view
|

Re: 8193503: javah launcher was not removed by JDK-8191054

Alan Bateman
In reply to this post by Alan Bateman
On 14/12/2017 09:21, Erik Joelsson wrote:
> Looks good!
>
> /Erik
I'll get this in now and also create another issue to remove the other
remnants of javah from the build (they won't impact the build output but
will need to be cleaned up).

-Alan
Reply | Threaded
Open this post in threaded view
|

Re: 8193503: javah launcher was not removed by JDK-8191054

Jonathan Gibbons
In reply to this post by Alan Bateman
Alan,

Thanks for catching and handling this. Sorry for the scramble. I'm
surprised it wasn't caught by the jdk-tier1 tests I ran before pushing
the changeset.

-- Jon

On 12/14/2017 01:12 AM, Alan Bateman wrote:

> Jon removed the code for javah from the jdk.compiler module with
> JDK-8191054 but the build still creates a launcher that is now DOA
> with "Error: Could not find or load main class
> com.sun.tools.javah.Main in module jdk.compiler". This is caught by
> one of the launcher tests that checks the options of every tool in the
> bin directory.
>
> The changes to drop the build of the javah launcher are trivial and I
> think we should get this into jdk/jdk before the fork for jdk/jdk10.
>
> -Alan
>
>
> diff --git a/make/launcher/Launcher-jdk.compiler.gmk
> b/make/launcher/Launcher-jdk.compiler.gmk
> --- a/make/launcher/Launcher-jdk.compiler.gmk
> +++ b/make/launcher/Launcher-jdk.compiler.gmk
> @@ -1,5 +1,5 @@
>  #
> -# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights
> reserved.
> +# Copyright (c) 2011, 2017, 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
> @@ -31,11 +31,6 @@
>     CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
>  ))
>
> -$(eval $(call SetupBuildLauncher, javah, \
> -    MAIN_CLASS := com.sun.tools.javah.Main, \
> -    CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
> -))
> -
>  $(eval $(call SetupBuildLauncher, serialver, \
>      MAIN_CLASS := sun.tools.serialver.SerialVer, \
>      CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
> diff --git a/test/jdk/tools/launcher/ToolsOpts.java
> b/test/jdk/tools/launcher/ToolsOpts.java
> --- a/test/jdk/tools/launcher/ToolsOpts.java
> +++ b/test/jdk/tools/launcher/ToolsOpts.java
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2012, Oracle and/or its affiliates. All rights
> reserved.
> + * Copyright (c) 2012, 2017, 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
> @@ -24,7 +24,7 @@
>  /*
>   * @test
>   * @bug 8002091
> - * @summary Test options patterns for javac,javah,javap and javadoc
> using
> + * @summary Test options patterns for javac,javap and javadoc using
>   * javac as a test launcher. Create a dummy javac and intercept
> options to check
>   * reception of options as passed through the launcher without having
> to launch
>   * javac. Only -J and -cp ./* options should be consumed by the
> launcher.