Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve JDK tools #211

Open
sormuras opened this issue Mar 19, 2021 · 5 comments
Open

Improve JDK tools #211

sormuras opened this issue Mar 19, 2021 · 5 comments
Labels
3rd-party: jdk An issue (potentially) tracked via JBS

Comments

@sormuras
Copy link
Owner

sormuras commented Mar 19, 2021

  • java -jar MJAR "module-style" using s/t like java --module-path MJAR --module- NAME
  • javac --module "up-to-date check for deleted" classes
  • jdeps -Werror --module-path --check MODULE
  • jar --check --file "sanity, .class versions"
  • jar --reproducible https://vishia.org
  • jarsigner sign and validate via https://sigstore.dev
@sormuras sormuras added the 3rd-party: jdk An issue (potentially) tracked via JBS label Mar 19, 2021
@sormuras
Copy link
Owner Author

jar --validate --file ... is included in Java 17 via openjdk/jdk#3971

The validation could/should be extended with:

@sormuras
Copy link
Owner Author

Make all tools support -version and --version and unify output to either include tool's name or not.

    ToolFinder.ofSystem().findAll().stream()
        .sorted(Comparator.comparing(ToolProvider::name))
        .forEach(tool -> bach.run(tool, tool.name().equals("javap") ? "-version" : "--version"));

yields

             jar --version
jar 17
           javac --version
javac 17
         javadoc --version
javadoc 17
           javap -version
17
           jdeps --version
17
           jlink --version
17
            jmod --version
17
        jpackage --version
17

@sormuras
Copy link
Owner Author

Let jar --create path/to/file.jar create missing parent directories, here for example: path/to.

@sormuras
Copy link
Owner Author

sormuras commented Aug 14, 2021

[email protected] jar:file:///.../[email protected]!/module-info.class
exports simple
requires java.base mandated
contains simple.internal
main-class simple.Main
  • java --module-path . --describe-module simple
[email protected] file:///.../[email protected]
exports simple
requires java.base mandated
contains simple.internal

The main-class line is missing when using the Java launcher.

@sormuras
Copy link
Owner Author

sormuras commented Sep 9, 2021

Why don't some tools implement ToolProvider, for example: jfr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd-party: jdk An issue (potentially) tracked via JBS
Projects
None yet
Development

No branches or pull requests

1 participant