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

doesn't work on macOS #32

Closed
bsideup opened this issue Sep 22, 2016 · 6 comments
Closed

doesn't work on macOS #32

bsideup opened this issue Sep 22, 2016 · 6 comments

Comments

@bsideup
Copy link

bsideup commented Sep 22, 2016

Java 8 is installed, but can't be recognized. Links to RedHat's OpenJDK, but it has no macOS version as well.

@ianrobrien
Copy link

@bsideup is your JAVA_HOME environment variable set and pointing to the 1.8 JDK (top level directory)? That's the issue I ran into.

@bsideup
Copy link
Author

bsideup commented Sep 22, 2016

@ianrobrien yeah, I think that's the reason. IMO JAVA_HOME should be mentioned next to "download OpenJDK" with something like "and make sure your JAVA_HOME is set"

@tills13
Copy link

tills13 commented Sep 22, 2016

^ I agree. Especially considering you don't actually need OpenJDK. The error message is kind of pointing fingers when it really doesn't need to be.

@fbricon fbricon added the bug label Sep 22, 2016
@fbricon
Copy link
Collaborator

fbricon commented Sep 22, 2016

OpenJDK is one possible implementation for the JDK. Runs fine on Oracle.

The d/l link should definitely not point to the OpenJDK d/l page, when running on MacOS (as long as OpenJDK binaries for Mac are unavailable at least). Probably default to the Oracle one in that case.

@jglete
Copy link

jglete commented Sep 22, 2016

I have put a ~/.bashrc with this:

export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
export PATH=$JAVA_HOME/bin:$PATH

For this test:

. ~/.bashrc
open -a "Visual Studio Code"

This way I'm sure this time the JAVA_HOME variable is set.

Now I create a new file, change the language to java an then pops this stacktrace:

[Error] 22-sep-2016 23:17:02 Exception on incoming message dispatcher
null argument:
org.eclipse.core.runtime.AssertionFailedException: null argument:
    at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
    at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
    at org.eclipse.core.runtime.Path.initialize(Path.java:641)
    at org.eclipse.core.runtime.Path.<init>(Path.java:238)
    at org.eclipse.core.runtime.Path.<init>(Path.java:186)
    at org.eclipse.core.runtime.Path.fromOSString(Path.java:92)
    at org.jboss.tools.vscode.java.handlers.AbstractRequestHandler.resolveCompilationUnit(AbstractRequestHandler.java:33)
    at org.jboss.tools.vscode.java.handlers.DocumentLifeCycleHandler.handleOpen(DocumentLifeCycleHandler.java:127)
    at org.jboss.tools.vscode.java.handlers.DocumentLifeCycleHandler.access$1(DocumentLifeCycleHandler.java:126)
    at org.jboss.tools.vscode.java.handlers.DocumentLifeCycleHandler$OpenHandler$1.run(DocumentLifeCycleHandler.java:75)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2262)
    at org.jboss.tools.vscode.java.handlers.DocumentLifeCycleHandler$OpenHandler.handle(DocumentLifeCycleHandler.java:72)
    at org.jboss.tools.vscode.java.handlers.DocumentLifeCycleHandler$OpenHandler.handle(DocumentLifeCycleHandler.java:1)
    at org.jboss.tools.langs.base.LSPServer.dispatchNotification(LSPServer.java:222)
    at org.jboss.tools.langs.base.LSPServer.messageReceived(LSPServer.java:156)
    at org.jboss.tools.langs.transport.AbstractConnection$DispatcherThread.run(AbstractConnection.java:32)

[Error] 22-sep-2016 23:17:02 Exception on incoming message dispatcher
null argument:
org.eclipse.core.runtime.AssertionFailedException: null argument:
    at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
    at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
    at org.eclipse.core.runtime.Path.initialize(Path.java:641)
    at org.eclipse.core.runtime.Path.<init>(Path.java:238)
    at org.eclipse.core.runtime.Path.<init>(Path.java:186)
    at org.eclipse.core.runtime.Path.fromOSString(Path.java:92)
    at org.jboss.tools.vscode.java.handlers.AbstractRequestHandler.resolveCompilationUnit(AbstractRequestHandler.java:33)
    at org.jboss.tools.vscode.java.handlers.DocumentLifeCycleHandler.handleChanged(DocumentLifeCycleHandler.java:155)
    at org.jboss.tools.vscode.java.handlers.DocumentLifeCycleHandler.access$2(DocumentLifeCycleHandler.java:154)
    at org.jboss.tools.vscode.java.handlers.DocumentLifeCycleHandler$ChangeHandler$1.run(DocumentLifeCycleHandler.java:98)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2262)
    at org.jboss.tools.vscode.java.handlers.DocumentLifeCycleHandler$ChangeHandler.handle(DocumentLifeCycleHandler.java:95)
    at org.jboss.tools.vscode.java.handlers.DocumentLifeCycleHandler$ChangeHandler.handle(DocumentLifeCycleHandler.java:1)
    at org.jboss.tools.langs.base.LSPServer.dispatchNotification(LSPServer.java:222)
    at org.jboss.tools.langs.base.LSPServer.messageReceived(LSPServer.java:156)
    at org.jboss.tools.langs.transport.AbstractConnection$DispatcherThread.run(AbstractConnection.java:32)

[Error] 22-sep-2016 23:17:02 Exception on incoming message dispatcher
null argument:
org.eclipse.core.runtime.AssertionFailedException: null argument:
    at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
    at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
    at org.eclipse.core.runtime.Path.initialize(Path.java:641)
    at org.eclipse.core.runtime.Path.<init>(Path.java:238)
    at org.eclipse.core.runtime.Path.<init>(Path.java:186)
    at org.eclipse.core.runtime.Path.fromOSString(Path.java:92)
    at org.jboss.tools.vscode.java.handlers.AbstractRequestHandler.resolveCompilationUnit(AbstractRequestHandler.java:33)
    at org.jboss.tools.vscode.java.handlers.DocumentLifeCycleHandler.handleChanged(DocumentLifeCycleHandler.java:155)
    at org.jboss.tools.vscode.java.handlers.DocumentLifeCycleHandler.access$2(DocumentLifeCycleHandler.java:154)
    at org.jboss.tools.vscode.java.handlers.DocumentLifeCycleHandler$ChangeHandler$1.run(DocumentLifeCycleHandler.java:98)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2262)
    at org.jboss.tools.vscode.java.handlers.DocumentLifeCycleHandler$ChangeHandler.handle(DocumentLifeCycleHandler.java:95)
    at org.jboss.tools.vscode.java.handlers.DocumentLifeCycleHandler$ChangeHandler.handle(DocumentLifeCycleHandler.java:1)
    at org.jboss.tools.langs.base.LSPServer.dispatchNotification(LSPServer.java:222)
    at org.jboss.tools.langs.base.LSPServer.messageReceived(LSPServer.java:156)
    at org.jboss.tools.langs.transport.AbstractConnection$DispatcherThread.run(AbstractConnection.java:32)


@fbricon
Copy link
Collaborator

fbricon commented Sep 23, 2016

@jglete that's a separate issue, see #38. Currently the Java Language Server only supports opening existing Maven-based projects and to a lesser degree, simple Eclipse projects with the Java nature.

As for the original problem, I consider it fixed along #37. The error message is now a bit more explicit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants