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

[QUESTION] - Does this require Java to be installed on Windows 10? #431

Closed
frankfajardo opened this issue Jul 31, 2021 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@frankfajardo
Copy link

Question

This is really question/clarification. I followed the steps here where it says run npm install @openapitools/openapi-generator-cli, and then you can run openapi-generator-cli.

But when I run openapi-generator-cli version, I get this error:

> openapi-generator-cli version
Download 5.0.1 ...
Downloaded 5.0.1
C:\...\node_modules\@openapitools\openapi-generator-cli\main.js:621
                error ? reject(new Error(stderr)) : resolve(stdout);
                               ^

Error: 'java' is not recognized as an internal or external command,
operable program or batch file.

    at C:\...\node_modules\@openapitools\openapi-generator-cli\main.js:621:32
    at ChildProcess.exithandler (node:child_process:316:5)
    at ChildProcess.emit (node:events:329:20)
    at maybeClose (node:internal/child_process:1055:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:288:5)

Do I need something else? I haven't installed Java on my machine. But the instruction does not say I need it.

Steps to Reproduce

Steps to reproduce the behavior:
On Windows 10 prompt, run:

  1. npm install @openapitools/openapi-generator-cli
  2. openapi-generator-cli version

Then you'd get the error.

Operation System (please complete the following information):

  • OS: Window
  • Version 10
@frankfajardo frankfajardo added the bug Something isn't working label Jul 31, 2021
@wing328
Copy link
Member

wing328 commented Aug 2, 2021

Yes, you will need to install JDK: https://adoptopenjdk.net/

This project is just a CLI wrapper.

If installing JDK is not an option in your use case, you may consider using Docker instead: https://hub.docker.com/r/openapitools/openapi-generator-cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants