-
Notifications
You must be signed in to change notification settings - Fork 60
Uncaught TypeError: Cannot read property '0' of null #30
Comments
What version of the Java runtime do you have installed and is it on your path? Both answers can be had by typing |
Same issue. Included my version of Java in case it helps.
Atom: 1.21.0-beta1 x64 Stack TraceUncaught TypeError: Cannot read property '0' of null
Commands
Non-Core Packages
Java version:
|
I've pushed a 0.6.3 update that tries to grab the version output in multiple ways. Let me know if you still get the error or not after updating. |
Still fails. I think the problem is with the regex on line 90:
problem is, in openjdk, the string I get back is: |
Ah, OpenJDK. Have only tried it with the official Sun one. Will get another update out in a few minutes. |
When I changed it to this, it fixed the issue for me: |
0.6.4 published with a similar fix. |
Fixed for me, thx! |
Same error showing again now the message is C:\Users\user.atom\packages\ide-java\lib\main.js:91 |
@coderbond007 can you type the following on your command line and report the results;
|
I have Java version 9 (Windows 10). Build (9 + 181) |
Can you post the exact results? That error is specifically in the area where we try to parse the result string to ensure it is 1.8 or later. |
C:\Users\user.atom\packages\ide-java\lib\main.js:91
I pasted your command on Windows Command Prompt. Exact Results are
|
Hmm, looks like Java version 9 has a totally different version string :( Will get an update out for this soon. |
@damieng Do you mind if I take a crack at this? |
I actually have it ready to go as I wanted to also today up the messaging
…On Thu, Sep 28, 2017, 11:05 AM Joshua ***@***.***> wrote:
@damieng <https://github.com/damieng> Do you mind if I take a crack at
this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#30 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAHQp9PnNtF50jX__zCyQfVcZbn_nATgks5sm9_ugaJpZM4Pj95J>
.
|
(and add unit tests to start covering the combinations of output messages) |
Got the same issue. I suspect Atom picked up the default JDK 9 install to launch jdt.ls. When JDK 9 is used, the server should be launched with extra args, see https://github.com/redhat-developer/vscode-java/blob/40b6f2136f97e4879c615900241db7a8c3b0e087/src/javaServerStarter.ts#L50-L56 |
#35 fixes the null ref when given Java 9. We'll need to add those args as well it seems before putting out Java 9 support. |
[Enter steps to reproduce:]
Atom: 1.21.0-beta1 x64
Electron: 1.6.9
OS: Microsoft Windows 10 Home Single Language
Thrown From: ide-java package 0.6.2
Stack Trace
Uncaught TypeError: Cannot read property '0' of null
Commands
Non-Core Packages
The text was updated successfully, but these errors were encountered: