When I open a java file, I got the following message: "Couldn't start client language support for Java". "Java 8 is required to run. Please download and install a jdk 8)
I just installed the latest jdk
Have you looked at https://github.com/redhat-developer/vscode-java#setting-the-jdk?
Can you open a terminal and type:
echo $JAVA_HOME
Anyways, setting java.home in VS Code preferences should work
{
"java.home": "/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/"
}
Thanks, this helped!
This happens to me too. I have java.home set to java 8, but I need $JAVA_HOMEset to the java 7 jdk.
{
// ...
"java.home": "/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home",
// ...
}
This is macOS sierra.
โฏ /usr/libexec/java_home -v 1.8
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
โฏ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home
Is there some knwon workaround?
@ferhtgoldaraz what exactly is your issue? The java.home preference takes precedence over the JAVA_HOME environment variable, so you can have one set to 1.8 and the other to 1.7.
You can check which version is actually used to run the Java Language Server by opening the vscode-java logs.
where is the location of settings.json for edit java.home in linux. Please
@manuelsfd see https://code.visualstudio.com/docs/getstarted/settings#_creating-user-and-workspace-settings
thanks for the answer @fbricon, But I still have the issue.
this is my java.home
"java.home": "/usr/lib/jvm/java-8-oracle"
my environment is
JAVA_HOME="/usr/lib/jvm/java-8-oracle"
i use ubuntu 17.04 and this is my issue
[Error - 14:19:55] Starting client failed
13
@manuelsfd can you provide more logs?
@fbricon I'm not sure this is the .log but it was the one I found, thanks for your time, I'm new to the linux world
[!ENTRY org.eclipse.jdt.ls.core 1 0 2017-06-02 14:19:53.670
!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is stopping:
!ENTRY org.eclipse.jdt.ls.core 1 0 2017-06-02 14:19:53.770
!MESSAGE Thread[Framework Event Dispatcher: org.eclipse.osgi.internal.framework.EquinoxEventPublisher@c562f7,5,main]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:336)
Thread[Worker-1,5,main]
at java.lang.Object.wait(Native Method)
at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:188)
at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:220)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:52)
Thread[Worker-JM,5,main]
at java.lang.Object.wait(Native Method)
at org.eclipse.core.internal.jobs.InternalWorker.run(InternalWorker.java:59)
Thread[Start Level: Equinox Container: daf20e1c-4432-4e9d-9656-2785356542d7,5,main]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:336)
Thread[Signal Dispatcher,9,system]
Thread[Framework stop,5,main]
at java.lang.Thread.dumpThreads(Native Method)
at java.lang.Thread.getAllStackTraces(Thread.java:1610)
at org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin.getThreadDump(JavaLanguageServerPlugin.java:235)
at org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin.stop(JavaLanguageServerPlugin.java:226)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314)
at org.eclipse.osgi.container.Module.doStop(Module.java:636)
at org.eclipse.osgi.container.Module.stop(Module.java:498)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147)
at org.eclipse.osgi.container.Module.doStop(Module.java:636)
at org.eclipse.osgi.container.Module.stop(Module.java:498)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165)
at java.lang.Thread.run(Thread.java:748)
Thread[Java indexing,4,main]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:373)
at java.lang.Thread.run(Thread.java:748)
Thread[Refresh Thread: Equinox Container: daf20e1c-4432-4e9d-9656-2785356542d7,5,main]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:336)
Thread[process reaper,10,system]
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362)
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:941)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Thread[Worker-0,5,main]
at java.lang.Object.wait(Native Method)
at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:188)
at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:220)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:52)
Thread[Finalizer,8,system]
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)
Thread[main,5,main]
at java.lang.Object.wait(Native Method)
at org.eclipse.osgi.container.SystemModule.waitForStop(SystemModule.java:168)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.waitForStop(EquinoxBundle.java:250)
at org.eclipse.osgi.launch.Equinox.waitForStop(Equinox.java:181)
at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:444)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:262)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
Thread[Active Thread: Equinox Container: daf20e1c-4432-4e9d-9656-2785356542d7,5,main]
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Thread[Reference Handler,10,system]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)
](url)
This .log found it on this route.
./.config/Code/User/workspaceStorage/b1e96030e2756963de66f71f1c0c2686/redhat.java/jdt_ws/.metadata/.log
Can you try deleting ./.config/Code/User/workspaceStorage/b1e96030e2756963de66f71f1c0c2686 and restart?
this is my new log.
@manuelsfd seems like you've hit #201. Long story short, vscode-java doesn't run on Linux 32b.
jajaja @fbricon ok, thanks for your time.
Today I started getting problems too.
JAVA_HOME is set in my .bashrc file to
"/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home"
As of this afternoon, when I open the java project in VSCode that I've been working on every day, I get: "Couldn't start client Language Support for Java"
Adding this to my user settings or workspace settings and reloading the project doesn't help
"java.home": "/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home",
I am using OSX 10.12.5 and VS Code 1.13.0
My project is this.
It was working this morning. :/
It's probably not related, but VS Code is using the CPU a lot more as of late. It constantly says "Starting Java Language Server" next to a spinning circle of dots in the status bar.
Strange. I just installed a VSCode update. At first Java Language Support worked. Then I closed that project, opened another one, and reopened the first one, and the old problem was back.
Can you please attach your logs? https://github.com/redhat-developer/vscode-java/wiki/Troubleshooting
i have downloaded all the plugins from the marketplace for the java and it shows the language support error in the vs Code when i run the code the tomcat it could not run in the browser .I have set the path of the java the command java -version and javac works in the command and in vs code it show the java path error .The eclipse also wont open in my desktop.
Can you fix the all of the problem?? Help me..
Most helpful comment
Have you looked at https://github.com/redhat-developer/vscode-java#setting-the-jdk?
Can you open a terminal and type:
echo $JAVA_HOMEAnyways, setting
java.homein VS Code preferences should work