-
Notifications
You must be signed in to change notification settings - Fork 422
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
Language Support for Java(TM) by Red Hat - Couldn't start client Language Support for Java #45
Comments
Can you try with java home not containing spaces? |
I tried C:\Progra~1\Java\jdk1.8.0_91 but it still warns The JAVA_HOME environment variable could not be detected, or it doesn't point to a JDK. |
I have set JAVA_HOME C:\Java\jre1.8.0_102 JDK_HOME C:\Java\jdk1.8.0_102 still not working |
JAVA_HOME pointing to a JRE will certainly not work. It has to be a JDK. JDK_HOME is not supported. |
It's OK if I set JAVA_HOME to C:\Java\jdk1.8.0_102, but there is a downside thumbnail. ↙ Like this one. |
I'm no expert nor am I the best when it comes to coding but I believe the downside thumbnail indicates no maven hierarchy. I set my JAVA_HOME to the JDK and all my errors disappeared but now I'm stuck with the downside thumbnail. @linonetwo Other tickets have stressed the extension doesn't support Java files without the hierarchy. If I use Eclipse to initially compile my Java files will that work? @fbricon |
I also have the same problem, after setting the JAVA_HOME I got the thumb down (which implies that some features won't work right?). Do actually need some other sort of file to get it working (like a build.xml or some other IDE-Java file related, think of maven) in the project folder? |
@vabatta you need:
In case it doesn't work, click on the thumb down icon to access some logs |
I have the same. But is it extension can open only maven project? What about just java files? |
@fbricon so we actually should use a maven or eclipse base project to get it working right? |
I know I fixed the case when JAVA_HOME was not resolving paths starting with And yes you currently need a Maven or Eclipse based project for the extension to be able to infer the project classpath. This requirement is stated in the extension description/README. |
@fbricon Thanx, waiting. :) |
@fbricon it's actually an absolute path, just used the |
So there won't be support to just Java files? I was using VS Code instead of a IDE solution due to have just some simple but complete autocomplete and syntax highlighting... I don't want to use a full-super-steroids-crappy-IDE, though it would do all as I don't want actually to install an App just for some easy Java homework 😋 |
@vabatta It only support maven now AFAIK |
@fbricon I think it's fine, though. Since in javascript world, we heavily rely on ESLint , which will only support full working directory opening, and don't work properly when opening single js file. I just want some Gradle support.... Since react-native use Gradle instead of maven... |
@atang0404 Can you check the new 0.0.5 release if you have the same problem? Also please note that we have a new setting java.home to point to a Java SDK without the need for JAVA_HOME environment variable that may be interesting for you. |
I'm with the same problem of @atang0404. But i'm using linux mint. I did set JAVA_HOME both ways, on linux and on vscode, but it doesn't work. |
@atang0404 @fernandocangussu can you try the new 0.0.6 release. I only had a fedora to test but I think your issue may be resolved now. |
Nothing here. I updated vscode and the extension, but the problem continues. |
I'm somewhat new to this and learning. Would anyone be kind enough to briefly explain how I get to the JAVA_HOME part to add my install path of the JDK? I can create a launch.json file but it gives me several choices and I'm not sure which I'm supposed to be choosing. Any help for a beginner would be much appreciated. I am currently a programming student but I've never had to set things up like this before. I have gotten some working like PHP, C#, JavaScript... This ones proving difficult! In the end, I am trying to open a .java file by itself so I know that it shouldn't work, I'm only trying to get up to speed on the JAVA_HOME. Thanks in advance. Oh and I do have eclipse projects that I have made from a Java class so if I could figure out the JAVA_HOME thing, then I should be able to debug those eclipse projects... |
Hi, Still I get the error that java.home is not set right. I have tried: Environment: Mac OS X 10.11.6 | VS Code 1.7.1 | RedHat extension downloaded and applied on Nov 15th. For the solution, I want clear instructions and samples - I find documentation rather hard to follow since there are very few examples on how the changes look in a real system. Thanks for this! I enjoy working with VS Code and so would like to use for Java projects too. Regards, |
@YuvaAthur thumbsdown usually means that your server is working but your project can not be recognized. Are you using a maven based project? The currently released version only supports maven. We are aware that we are thin on documentation at the moment. We have started to write some, it is very early work but may help. |
Quite like VSCode... installed it for my NodeJS projects -- and quite impressed. Works very well including the NodeJS debugging. Thought I'd try it out for Java. It works.. but need to be able to define a build path a la Eclipse etc... We don't use Maven ... Doesn't look like that is supported? So looks like I'm stuck with Eclipse.. not a bad thing.. just prefer the Editor and speed of VSCode. |
@gorkem - Thanks! I created a maven project in Eclipse and used it in VS Code. I got a ThumbsUp! Yay! Now, eclipse has a simple pom.xml and a detailed pom.xml that is generated on the fly. What level of detail does VS Code Java project expect? (BTW, the project is not compiling in eclipse - there are other issues to fix. I am working on it. Once I can get the project to compile, I shall test it in VS Code.) |
@YuvaAthur You do not need to have anything special on pom.xml for this extension. If you have a thumbs up that means the extension is able to recognize your project. |
I was able to get the lib installed from maven repo. ldconfig shows the lib: libjunixsocket-native-2.0.4.so (libc6,x86-64) => /usr/lib/libjunixsocket-native-2.0.4.so But still the same error persists. Any help at this point? |
After digging a bit more, I found that the junix jar files are installed along side the org.eclipse.osgi libs. So, for whatever reason, the 'native-lib-loader' package cannot load the jar file and its embedded libjunixsocket-native-2.0.4.so library. |
@kohlschuetter any ideas? |
I got the "Couldn't start client Language Support for Java" error on my Windows OS. I've followed all the steps in this discussion. In Visual Studio Code In System: I am using Visual Studio Code in Windows 10 partition on my Mac Pro machine. Is there any debug log from this extension to check what the actual problem is? |
In the vs code extension directory "%USERPROFILE%.vscode\extensions" on windows, navigate to the red hat plugin/config_windows/server directory. Within that directory will be any logs associated with starting the plugin. |
I have .vscode\extensions\redhat.java-0.0.10\server\config_win\config.ini only. And, finally, I found the issue. It looks like the extension could not start correctly because of "java.jdt.ls.vmargs". "lombok.jar" is not correct. Now I can start the extension! Thanks!
I just followed https://github.com/redhat-developer/vscode-java/wiki/Lombok-support to add lombok.jar. |
I'm also experiencing the libjunixsocket-native-2.0.4.so issue. I extracted the .so from the jar, checked dependencies: $ ldd libjunixsocket-native-2.0.4.so
linux-vdso.so.1 => (0x00007ffd1b4ce000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fc34d71d000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc34d417000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc34d201000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc34ce39000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc34dc25000) All of those exist on the system. In my case the specific error is a little different:
This is on an older version of ubuntu 14.04 (reasons...). My thought is there there may be reasons that the .so can't be loaded out of /tmp/ due to some mount restrictions on /tmp. I can't exec a shell script in /tmp for example. It's not mounted noexec though: $ mount
...
/tmp on /var/tmp type none (rw,bind) Any thoughts? UPDATE: This did turn out to be a mount issue. I have a |
can't run java!
|
@newxpp can you please enable logging so we can understand why the client fails to start? |
TL;DR — Download the junixsocket-parent-2.0.4 source, then build with maven.I'm running a 32bit Ubuntu 12.04 guest on a VirtualBox VM. JDK 1.8.0_131-b11. After downloading the VS Code version 1.12.0 yesterday, I got that same "Library 'libjunixsocket-native-2.0.4.so' not found!" error others reported. My Ubuntu 12.04 VM is 32bit. The 'libjunixsocket-native-2.0.4.so' library that Microsoft distributes with the 32 bit version of Code 1.12.0, was built for a 64bit machine! What fixed it for me, was this...
Don't forget to include the MANIFEST.MF file. This is what my merged 'junixsocket-native-common-2.0.4.jar' file contains...
Phewwww! What a faff just to install an IDE! That says a lot about Microsoft's commitment to *nix support. Ay? |
Discussion about 32bits junixsocket moved to #201 |
I just installed VSCode v. 1.12.2 and "Language Support for Java(TM) by Red Hat" plugin v. 0.4.0. I have the same error "Couldn't start client Language Support for Java". I set up java.home parameter in VSCode. This does not solve the problem. I set up JAVA_HOME Windows variable to same folder. This does not solve the problem, too. I deleted java.home setting from VSCode. And here's a miracle! Everything worked. So, we have a problem with incorrect work java.home inside plugin. |
@igor-kudryashov can you please enable logging so we can understand what's happening? |
@fbricon I'm sorry, I can not repeat this error. I guess I did something wrong before. |
I eventually got this working in Windows with the following in vscode: "java.home": '"C:\Program Files\Java\jdk1.8.0_131"' NOTES:
HTH |
I recently started having this problem as well on Ubuntu. This is the Java error that I get from the error log:
I double check my jdk installation and that seems to be correct. I've also tried the JAVA_HOME fix, but looking at the above error I think it might be something different. I should also note that I did recently update my jdk to 1.8.0_131, so maybe that might have borked something? |
That kind of NoClassDefFoundError is typical of OSGi bundle failing to load. Possibly, your workspace got borked. I suggest cleaning it up and trying again |
@fbricon That did the trick. Thank you! |
I'm facing the same issue, Starting client failed, and i tried to fix like @simonl65 did, but with no luck on that. Any help here? SO: Windows 10 64bits, |
@feRpump Can you retrieve the server logs? Also can you check your .settings for any java related values? Troubleshooting section on wiki can help you locate the logs. |
@gorkem |
It looks like it does not like the java.home settings |
Well, looks like the error is gone now... I tried this before but with no luck. So, can I compile standalone java files ? Like using javac ? If is, how can I do so? |
The Extension Host logs this for me: [Extension Host] Executing /Library/Java/Home/bin/java -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication -jar /Users/ln/.vscode/extensions/redhat.java-0.8.0/server/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar -configuration /Users/ln/.vscode/extensions/redhat.java-0.8.0/server/config_mac -data /Users/ln/Library/Application Support/Code/User/workspaceStorage/0b093bbdf7d9c58c81e4cc08cf217a58/redhat.java/jdt_ws (One thing that caught my eye is that the If I run that command manually, I get the same exit code I deleted the directory specified as rm -rf '/Users/ln/Library/Application Support/Code/User/workspaceStorage/0b093bbdf7d9c58c81e4cc08cf217a58/redhat.java/jdt_ws'
|
In windows 10,I edit the file setting.json in C:\Users\adminstrator\AppData\Roaming\Code\User,and it did work.The content from |
If you're not getting error code 13-visible in the VS Code Console-your problem is a different one. |
* periodically query usage data * add back license * increase usage data query interval to 60s * query usage data when terminating debug session
I'm closing this since most of the issues seemed resolved, and because since vscode-java 1.2.0, we provide an embedded Java runtime for many popular platforms. |
There are two issues:
|
Hi guys:
I just recently installed the Language Support for Java extension however, I can't seem to get it working. Whenever I open a Java file I get a message stating the it "Couldn't start client Language Support for Java".
I get an error output that reads:
[Error - 11:54:37 PM] Starting client failed
13
I've already checked to see if JAVA_HOME is mapped under Environment Variables and it has. Any help would be appreciated.
Thanks!
Alexander Tang
The text was updated successfully, but these errors were encountered: