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

Commands other than java do not work #26

Closed
h4iku opened this issue Apr 2, 2022 · 3 comments
Closed

Commands other than java do not work #26

h4iku opened this issue Apr 2, 2022 · 3 comments
Labels
FeatureRequest New feature or request

Comments

@h4iku
Copy link
Contributor

h4iku commented Apr 2, 2022

Hi, thanks for the great tool.

I upgraded my installation by pulling from the repository and adding my JDKs back. Now commands like javac or jshell don't work.

❯ java -version
openjdk version "11.0.14.1" 2022-02-08
OpenJDK Runtime Environment Temurin-11.0.14.1+1 (build 11.0.14.1+1)
OpenJDK 64-Bit Server VM Temurin-11.0.14.1+1 (build 11.0.14.1+1, mixed mode)
❯ javac
javac: The term 'javac' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
❯ jshell
jshell: The term 'jshell' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Since the java command is processed through java.bat, I guess every command needs its own bat file now?

@FelixSelter
Copy link
Owner

Yea thats right. It was just a matter of time till someone asks that question. You have to copy java.bat rename it to javac.bat and replace any "java" inside with "javac"

When I fixed your other issue I will create a command to add these batch files automatically

@FelixSelter FelixSelter added the FeatureRequest New feature or request label Apr 2, 2022
FelixSelter added a commit that referenced this issue Apr 7, 2022
@FelixSelter
Copy link
Owner

FelixSelter commented Apr 7, 2022

Hi. I added the "jenv link" command.
Use it like this: "jenv link javac"; "jenv link shell"; "jenv link <executable>"
Can this be closed now?

@h4iku
Copy link
Contributor Author

h4iku commented Apr 7, 2022

Works great.
Thank you.

@h4iku h4iku closed this as completed Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants