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

"Can't find Java!" on openjdk #23

Closed
ly-mg opened this issue May 9, 2019 · 5 comments
Closed

"Can't find Java!" on openjdk #23

ly-mg opened this issue May 9, 2019 · 5 comments

Comments

@ly-mg
Copy link

ly-mg commented May 9, 2019

Environment

  • EmmyLua version: 0.2.5
  • Java version: openjdk version "1.8.0_212-3-redhat"
  • VSCode version: 1.33.1

Error message

Can't find Java! Please install Java 1.8 or above and set JAVA_HOME environment variable.

Related commit

"validate java" commit b7eb826

"src/extension.ts"

async function validateJava() {
...
            let regexp:RegExp = /java version "((\d+)\.(\d+).+?)"/g;
...
}

This regexp will never match version string of openjdk.

  • java -version (RedHat openjdk) outputs:

    openjdk version "1.8.0_212-3-redhat"
    OpenJDK Runtime Environment (build 1.8.0_212-3-redhat-b04)
    OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
    
  • java -version (Oracle Java SE) outputs:

    java version "1.8.0_212"
    Java(TM) SE Runtime Environment (build 1.8.0_212-b10)
    Java HotSpot(TM) 64-Bit Server VM (build 25.212-b10, mixed mode)
    

about Java version information

How to find the JVM version from a program?

@ly-mg
Copy link
Author

ly-mg commented May 9, 2019

EmmyLua version 0.2.3 works correctly.

@tangzx tangzx closed this as completed in d4478ca May 9, 2019
@tangzx
Copy link
Member

tangzx commented May 9, 2019

Thanks for reporting. v0.2.6 released on marketplace.

@ly-mg
Copy link
Author

ly-mg commented May 10, 2019

v0.2.6 still says "Can't find Java!".

Version string of openjdk begins "openjdk version". (NOT "java version")

@Targanon
Copy link

getting Can't find Java! please install java or above and set JAVA_HOME environment variable.

I have check the version JAVA 'jre1.8.0_271' is installed.
but I"m not sure what I need to do to fix this.. I'm only new to VS code and Emmylua.. please help sort this so I can start learning lua..

@ChaosRifle
Copy link

getting this on vs code installation v0.5.14

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

4 participants