How do I turn off the Java Language Server completely? I can't find it anywhere. I just want it off so it does not do this "importing root project configuration project".
You can disable the Language Support for Java(TM) by Red Hat extension in VS Code.
It can either be disabled entirely, or just for your current workspace. If you never want to use it, you can uninstall the extension instead.
There is now a new setting java.autobuild.enabled in RedHat's Java extension (since this PR). It will not stop importing projects, but once the project is imported, it will not automatically rebuild it.
To force manual rebuilding, use the Command Palette and run Java: Force Java Compilation.
Related
I am using VSCode and RedHat Language Support for Java plugins.
I have some self-written java code which I have placed in a standard location (src/main/java) and there are also some java files which were generated for me -- so they reside in src/generated/main/... location.
All of the above compiles/builds and runs when using command line gradle commands.
What doesnt work is the IDe stuff -- it seems that when importing/referencing generated classes in my self-written classes, its all "red" -- "import cannot be resolved". But like I said, its purely an IDE issue -- the code actually build and runs.
Any idea how to make it more IDE friendly?
Screenshots:
I had the same problem once and the solution for me was to clean the project.
If you have plugin version 0.33.0 or higher, open command palette Ctrl + Shift + P, and type java clean. If the problem continues try to restart VS Code.
I have a Maven project with Scala and Java. I generally develop it using Intellij IDEA, however, I sometimes open it in Visual Studio Code.
Whenever I do that, it automatically adds .settings directory, .project file and .classpath file to the root of each module in the project.
This is seemed to occur due to the Language Support for Java by Red hat extension.
I would very much like to avoid this, how would I do that?
The Language Support for Java(TM) by Red Hat (aka vscode-java) extension generate those Eclipse files, because, under the hood, a customized, headless Eclipse process (jdt.ls) is providing all the Java support. You can not remove these files, if you expect proper Java support by this VS Code extension.
So your alternatives are:
add these files to your .gitignore (if you're using git, else, ignore them from whatever SCM you use)
disable or uninstall vscode-java and use a different Java extension in VS Code
In my old Eclipse (version 3.4.2) if I wrote an error in a java fragment inside a .jsp page (example a variable that doesn't exist) I automatically and immediately saw the problem (red line under
the word).
In Eclipse neon I have to manually validate the page (right click, validate) to obtain the same result.
Is it possible to configure the new version with the old feature?
You can try to go to Window > Preferences > Java > Compiler > Errors/Warnings
and set up your things here.
This feature is also included in Eclipse Neon, don't worry ;) but if you really struggle hard, I suggest an uninstall/reinstall
I've recently been trying to setup a little toolchain for something with Eclipse CDT but I'm being driven insane by the default behaviors of Eclipse. It's just so against the grain of other IDEs for C/C++.
Is there anyway to disable the automatic searching of folders in the project directory for the source files? I want to manually add the files for it to compile instead of having to manually exclude all the files I don't want it to compile between multiple configurations.
you can use your own makefile instead on relying on the eclipse auto generated makefile
Since I had problems with compiling JavaFX Code from Eclipse on Mac OSX 10.7 using java development kit 1.7.0_04 i just want to share my intermediate solution with interested people:
Problem:
The jfxrt.jar and other .jar files are not recognized when selecting the new jdk issued by oracle as a new jre/jdk in eclipse.
The jdk is installed within /Library/Java/JavaVirtualMachines/1.7.0.jdk which is recognized as a package.
Adding the path /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/jfxrt.jar later is not possible since the file open dialog of eclipse does not allow to navigate to the inside of the package
Solution:
Create a symbolic link from outside the package to inside the package and follow the link within the file open dialog.
Simply go to a terminal and execute the following:
[0-/Library/Java/JavaVirtualMachines]:sudo ln -s 1.7.0.jdk/Contents/ 1.7.0.jdk_Contents
This creates the symbolic link 1.7.0.jdk_Contents using super user permissions (sudo).
By this compilation and execution of JavaFx code works fine and as expected.
It's not need to do all said before, just use a allmost unknown behaviour of Finder dialogs: Drag & Drop.
You can open a Finder window from console with:
open /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/jre/lib
so yo will see jfxrt.jar and other .jar files. Drag this files to Eclipse's Add external jar dialog window... et voila!
Dependencies satisfaced! No link needed!
The initial JavaFX 2.1 release in jdk1.7.0_u4 was not supported by e(fx)clipse.
This support thread indicates that the maintainer of the plugin is aware of the incompatibility issue is pushing a patch to the plugin repository to fix the issue and in the meantime recommends using a JavaFX 2.2 preview build instead.