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

export java, jmap, keytool ... in in bin #83

Open
ZeeD opened this issue Nov 26, 2024 · 0 comments
Open

export java, jmap, keytool ... in in bin #83

ZeeD opened this issue Nov 26, 2024 · 0 comments

Comments

@ZeeD
Copy link

ZeeD commented Nov 26, 2024

currently if you install jdk4py you will have a copy of the jdk in ${VENV}/lib/python3.12/site-packages/jdk4py/java-runtime
the java runtime offers some command line tool, in .../java-runtime/bin, such as java, keytool, etc.
At the moment I see:

$ ls .venv/lib/python3.12/site-packages/jdk4py/java-runtime/bin/ -1
java
jcmd
jfr
jinfo
jmap
jps
jrunscript
jstack
jstat
jwebserver
keytool
rmiregistry
$ 

I think it would be useful to package some alias to these binaries as executable scripts.
As described on https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#creating-executable-scripts it would be possible to add a section like

[project.scripts]
spam-cli = "spam:main_cli"

to provide these scripts in the .venv/bin folder, once the package is installed

my understanding is that you cannot directly link an executable, but it would not be too difficult to write a python module that exposes a java, jcmd, ... functions that wraps the required commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant