I have VS Code set up with the Java Extension Pack. In the JAVA PROJECTS section of the sidebar I can see the files in my project as well as the referenced .jar files. The last time I used VS Code for Java development (some months ago), I could browse the source code of the referenced libraries, but now nothing
Tag: visual-studio-code
org.json cannot be resolved to a module?
I’m learning Java. To read JSON in my application, I downloaded this JSON library; which is an automatic module. I included that library in my module descriptor like: My settings.json in vscode: How do I include the jar file in my module and import it into my Java file? Screenshot: Answer TL;DR — As this unresolved ‘Cannot be resolved’ errors
Invalid runtime for JavaSE-11: The path points to a missing or inaccessible folder
My VSCode is no longer recognizing the paths of the java runtime. I was using them normally and now it doesn’t work on the same projects anymore. Here are the error messages and my settings. The paths to the runtimes are correct. Environment: Operating System: Linux Mint 20 Cinnamon JDK version: Openjdk version “11.0.8” 2020-07-14 Visual Studio Code version: v1.49.2
How to use global arguments for Java in vscode?
I am trying to setup my JavaFX enviroment so I referenced the corresponding Jars. In order to run the code I need to use some VM Arguments (“vmArgs”: ” –module-path /Users/adrif/Downloads/javafx-sdk-14.0.2.1/lib –add-modules javafx.controls,javafx.fxml”) in the launch.json. I am working in a multi-project folder so every time a make a new one I have to go to the launch.json and add
Visual Studio Code Java Project export location
I’m using Visual Studio Code with the Java Extension Pack for a java application. As you can see in the image above, the downwards facing arrow button exports my project to a Jar, which is saved to the project folder. Is there an option anywhere I can set the export location, or post-build events where I can copy the jar
Does VSCode have an option to “Create tests” for a java class?
In IntelliJ IDEA Ultimate, I have the ability to “Create tests” for a Java class. Does VS Code have anything similar? Any extension or in-built functionality. If not, what would be the steps I should follow to create such an option for my use? Answer It seems not. I have tried ‘Junit Testfile Generator’ extension, but it’s rough.
How do you load a Sound object in tinySound in visual studio code?
Here is the example provided by the library tinySound : https://github.com/finnkuusisto/TinySound/blob/master/example/TinySoundExample.java I read the example and wrote the basic piece of code to test …
String[] no longer working in visual code studio
I updated Visual Studio Code, created a new file and messed around with Java and something broke. Can someone please help me out? import java.util.*; public class test { public static void main(…
Setting GCP environment variable in Spring boot with vs code
I’m trying to set up GOOGLE_APPLICATION_CREDENTIALS but keep getting this error java.io.IOException: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credential I have defined in my application properties: Added the dependency in the pom file: Tried to do
Java Dependency Viewer not appearing in the Explorer Window of Visual Studio Code. Any command to force toggle the view?
I have the Java Dependency Viewer extension configured in my Visual Studio Code and it used to work perfectly fine. But off late, whenever I open up VSCode and try to work on a Spring/ Maven Project, the Java dependency viewer fails to automatically load up on the explorer window (Waited for half an hour at times). I have all