You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
I just installed atom and ide-java on linux mint. No matter what I set the java home to for IDE-java I get a IDE-Java could not lanuch your java runtime. No java runtime found at:... error.
I've tried several things restarted, set the environment variable for JAVA_HOME (/usr/lib/jvm/java-11-openjdk-amd64), re-installed ide-java. java and javac work fine from the command line and atom just does not seem to be able to see it. The only thing in the console window is:
Uncaught (in promise) undefined ... server-manager.js line 5 over and over.
In your ide java configuration, remove the bin folder directory...
It should now look like something like this
C:\Program Filess\Java\jdk-11.0.8
Good luck...
Hi,
I've found that the error comes from the code of the module.
Even if the JAVA_HOME, JDK_HOME are set correctly in environment variable or settings in atom. Ex: C:\path\to\openjdk\jdk-17.0.4.101-hotspot\
The module will throw an error if the command java -showversion cannot be parsed correctly
Ide-java access the java path with the follow code:
When Java path is set correctly following one of the 3 ways (in settings, or in environment variables of OS)
The module check for the version of java using a regex pattern for finding the version of Java.
The problem is that with the OpenJDK version 17.0.4.1, the regex will return null.
"openjdk version \"17.0.4.1\" 2022-08-12 OpenJDK Runtime Environment Temurin-17.0.4.1+1 (build 17.0.4.1+1) OpenJDK 64-Bit Server VM Temurin-17.0.4.1+1 (build 17.0.4.1+1, mixed mode, sharing)"
The code below returns null.
'openjdk version "17.0.4.1" 2022-08-12 OpenJDK Runtime Environment Temurin-17.0.4.1+1 (build 17.0.4.1+1) OpenJDK 64-Bit Server VM Temurin-17.0.4.1+1 (build 17.0.4.1+1, mixed mode, sharing)'.match(/version"(\d+(.\d+)?)(.\d+)?(_\d+)?(?:-\w+)?"/)
The solution would be to adapt the regex pattern for all possible output version. The second sub-group starting from the last of the regex pattern (_\d+)? in my case is the one causing the error.
If the arrow base was intented, may be a solution like ((_\d+)?|(.\d+)?) would solve the problem. Or simply changing the arrow base to a dot, if the arrow base was unintended.
Activity
marcelovue commentedon Jan 19, 2019
I know its a little old, but I was having a similar issue, try to setup the
binfolder of thisJAVA_HOMEinside yourPATHvariable. https://stackoverflow.com/questions/19013725/linux-mint-adding-environment-variables-permanentlywendymungovan commentedon Jan 22, 2019
Thanks - I'm still having the problem so I will take any help i can get. :)
$ more .pam_environment
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/bin/
PATH DEFAULT=${PATH}:${JAVA_HOME}
and then restarted atom. I'm still having the same problem (i tried with and with out the bin folder specified).
I thought it might be a permissions problem but everyone has access to java and javac (same permissions not shown). Does atom run a nobody?
$ ls -la /usr/lib/jvm/java-11-openjdk-amd64/bin/java
-rwxr-xr-x 1 root root 10344 Nov 13 07:53 /usr/lib/jvm/java-11-openjdk-amd64/bin/java
marcelovue commentedon Jan 22, 2019
JAVA_HOME variable is not supposed to have the
/bindirectory, I'm not sure about how u set ur system up, but I think it could be like so:At least it is what we do in windows.
wendymungovan commentedon Feb 26, 2019
That still does not do it.
LJacobsonMT commentedon Feb 19, 2020
I have the same issue using it on Fedora r31 Didn't found a solution yet.
PVoola commentedon Jun 26, 2020
I've been facing the same issue on mac os - though the java path is set correctly, I still get "Error: Could not find or load main class'".
Appreciate if anyone can help me
xenonwellz commentedon Oct 12, 2020
In your ide java configuration, remove the bin folder directory...
It should now look like something like this
C:\Program Filess\Java\jdk-11.0.8
Good luck...
iracanyes commentedon Oct 7, 2022
Hi,
I've found that the error comes from the code of the module.
Even if the JAVA_HOME, JDK_HOME are set correctly in environment variable or settings in atom.
Ex: C:\path\to\openjdk\jdk-17.0.4.101-hotspot\The module will throw an error if the command
java -showversioncannot be parsed correctlyIde-java access the java path with the follow code:
When Java path is set correctly following one of the 3 ways (in settings, or in environment variables of OS)
The module check for the version of
javausing a regex pattern for finding the version of Java.The problem is that with the OpenJDK version 17.0.4.1, the regex will return null.
The code below returns null.
The solution would be to adapt the regex pattern for all possible output version. The second sub-group starting from the last of the regex pattern
(_\d+)?in my case is the one causing the error.If the arrow base was intented, may be a solution like
((_\d+)?|(.\d+)?)would solve the problem. Or simply changing the arrow base to a dot, if the arrow base was unintended.