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

'java' is not recognized as an internal or external command, #75

Closed
GaryXiongxiong opened this issue Jul 11, 2020 · 2 comments
Closed
Assignees
Labels
1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-confirmed Issue status: Confirmed, reproducible bug in LTeX 3-fixed Issue resolution: Issue has been fixed on the develop branch
Milestone

Comments

@GaryXiongxiong
Copy link

Hi,
I am trying to install this extension. But it doesn't work.

I tried to use my own JDK path or the path of JDK downloaded automatically, it always says that 'java' is not recognized as an internal or external command.

I also tried to run ltex-ls in command line, and it works.

❯ .\ltex-ls.bat --version
{
  "ltex-ls": "6.0.1",
  "java": "11.0.7"
}

I am wondering why it could not recognize 'java' during its execution.

Thanks a lot

2020-07-11T12:57:41.163Z Info: Testing ltex-ls...
2020-07-11T12:57:41.163Z Info:   Command: "c:\\Users\\Yixio\\.vscode\\extensions\\valentjn.vscode-ltex-6.0.1\\lib\\ltex-ls-6.0.1\\bin\\ltex-ls.bat"
2020-07-11T12:57:41.163Z Info:   Arguments: ["--version"]
2020-07-11T12:57:41.163Z Info:   env['JAVA_HOME']: "c:\\Users\\Yixio\\.vscode\\extensions\\valentjn.vscode-ltex-6.0.1\\lib\\jdk-11.0.7+10-jre"
2020-07-11T12:57:41.163Z Info:   env['JAVA_OPTS']: "-Xms64m -Xmx512m"
2020-07-11T12:57:41.199Z Info: Test failed.
2020-07-11T12:57:41.199Z Info: Exit code of ltex-ls: 9009
2020-07-11T12:57:41.199Z Info: stdout of ltex-ls:
2020-07-11T12:57:41.199Z Info: 
2020-07-11T12:57:41.199Z Info: stderr of ltex-ls:
2020-07-11T12:57:41.199Z Info: 'java' is not recognized as an internal or external command,
2020-07-11T12:57:41.199Z Info: operable program or batch file.
2020-07-11T12:57:41.199Z Info: 
2020-07-11T12:57:41.200Z Error: The download/extraction/run of Java failed!
2020-07-11T12:57:41.200Z Error: Error details:
2020-07-11T12:57:41.200Z Error: Error: Could not run ltex-ls.
2020-07-11T12:57:41.200Z Error: 	at w.<anonymous> (c:\Users\Yixio\.vscode\extensions\valentjn.vscode-ltex-6.0.1\dist\extension.js:1:290092)
2020-07-11T12:57:41.200Z Error: 	at Generator.next (<anonymous>)
2020-07-11T12:57:41.200Z Error: 	at o (c:\Users\Yixio\.vscode\extensions\valentjn.vscode-ltex-6.0.1\dist\extension.js:1:281234)
@valentjn valentjn reopened this Jul 11, 2020
@valentjn valentjn added 1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-confirmed Issue status: Confirmed, reproducible bug in LTeX and removed 1-question labels Jul 11, 2020
@valentjn valentjn self-assigned this Jul 11, 2020
@valentjn valentjn added this to the 6.0.3 milestone Jul 11, 2020
@valentjn
Copy link
Owner

This is a regression from 6.0.0: With the migration from Gradle to Maven, LTEX LS migrated the startup scripts from being generated by the Application Gradle plugin to the AppAssembler Maven plugin. The latter doesn't take JAVA_HOME into account under Windows, unlike under Unix-like OSs, where it does.

@valentjn valentjn added the 3-fixed Issue resolution: Issue has been fixed on the develop branch label Jul 11, 2020
@valentjn
Copy link
Owner

Fix released in 6.0.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-confirmed Issue status: Confirmed, reproducible bug in LTeX 3-fixed Issue resolution: Issue has been fixed on the develop branch
Projects
None yet
Development

No branches or pull requests

2 participants