What I learned from doing Java work with Visual Studio Code

For the time being, I was able to work for a whole day without waking up Eclipse, so I made a note. It ’s super comfortable!

Constitution

After that, I only put in the system to play with the appearance (icons, etc.). Fortunately, I'm using Git at the site right now, but I'm doing this on the command line with SourceTree anyway, so I decided to leave it alone.

Fira Code is used for the font (this is also introduced on a trial basis). There is another introductory article, so please refer to that. https://qiita.com/shuntksh/items/1995e87fe5c1ac88296f (Thank you very much! It's easy to read and progresses ...)

After all there are some troubles

Suddenly, ** VS Code is not Java Native **. After all, there are some problems. ...... No, it was really a little, and it was something that could be managed properly.

Unable to resolve UT libraries!

Maven is used in the workplace. Would you like to switch to Gradle or something? I think, but the ones that are used are unavoidable. It seems that maven is still considered standard in VSCode, and the Java Extension Pack also includes the maven support plugin, Maven for Java. You can hit mvn package from the context, or display Effective POM. But for some reason, all the code for UT was dead. It's a compilation error without exception. He said, "I can't solve that! What's that!"

I'm not sure why, but it didn't seem to read the library with test scope. I had no choice but to remove the ** test scope and solve it **. Well, if you can't read it with compile scope, you can't really do anything about it.

In addition, I tried to reproduce it in another maven project and raise the issue, but ... I couldn't reproduce it at all. I'm sure the project structure was bad.

UT does not run!

The Java Extension Pack includes Java Test Runner. As the name suggests, it runs UT, which is convenient. But for some reason, this guy doesn't run in many ways. For some reason, all of them become "Skipped" without permission.

This is rather serious, and the trouble is that it runs or does not run. For the time being, all I knew was that ** the Japanese name method seems to die with a high probability **. Well no.

But it can be used enough

Although it has the above-mentioned trivial problems (is it a little troublesome?), It actually feels like ** can be used as a main IDE at this point. After all, it's a lot better than Eclipse, where it's a little problematic ** it's shit heavy and it's dropped many times a day, and the environment is broken and it doesn't even start at worst **. (However, honestly, there are problems with the method in the field, how to handle it myself, the specifications of the development machine and the plug-in side, so I think that it is a little different if only Eclipse is really bad ~ ~ But Mr. Xu ~ ~)

One thing to keep in mind is that ** VSCode is a very powerful editor, not a full-featured IDE from the beginning **. For example, one memory consumption is definitely much less than Eclipse, but the Java processes running at the same time bring a tremendous amount of memory (although I think it's less than Eclipse). ** It should be remembered that the editor has only a lot of "development features" and is stable and lightweight because it is not packed with anything **.

…… The reason for saying this is that ** Eclipse is easier to initialize by all means **. If that's the case, you don't have to install the JDK or do anything in detail, and it's the area where the pre-configured binaries are distributed. VS Code isn't.

** If you think "if you're having a hard time getting along, it's okay for a bit", VS Code will definitely help **. If not, we're probably happier with each other using Eclipse.

by the way

This article intentionally ignores the existence of a very powerful IDE per ~~ (aside from NetBeans) ~~ IntelliJ. Why you ask? ** Because it costs money! ** **

…… Half-joking aside, if you can use an IDE like IntelliJ, honestly that's fine. However, although I have only touched it a little, it is quite heavy. That's right because it's powerful and stable. However, aside from the software fee, it would be a problem if specs were required as a single dispatch group. Even if you can use your favorite machine with 32GB RAM at home, you have to use an i3 + 8GB machine at work (honestly, I never thought that I would suffer from such a shortage of RAM until a few years ago. ……).

Best of all, IntelliJ has a slightly unique shortcut and I'm not used to it. VSCode's "very MS product" shortcuts are kind of familiar and easy to do as a Windows person. ** I think it's very powerful in the sense that it's a cheap machine, compatible with widely used ones, stable, and easy to enter **, so I'd like to continue using it for a while to find a good configuration.

Recommended Posts

What I learned from doing Java work with Visual Studio Code
What I learned with Java Gold
What I learned with Java Silver
What I learned from Java monetary calculation
Java in Visual Studio Code
Build Java program development environment with Visual Studio Code
Build WebAPP development environment with Java + Spring with Visual Studio Code
Use PlantUML with Visual Studio Code
Code Java from Emacs with Eclim
Work with Google Sheets from Java
[Note] What I learned in half a year from inexperienced (Java) (1)
[Note] What I learned in half a year from inexperienced (Java) (3)
[Mac] Install Java in Visual Studio Code
Execute Java code from cpp with cocos2dx
A record of setting up a Java development environment with Visual Studio Code
Try remote debugging of Java with Remote Containers in Visual Studio Code Insiders
What i learned
Experience .NET 5 with Docker and Visual Studio Code
Add --enable-preview option in Java in Visual Studio Code
What I learned in Java (Part 2) What are variables?
[Mac] Install Java in Visual Studio Code (VS Code)
What I learned ② ~ Mock ~
What I learned ① ~ DJUnit ~
What I learned in Java (Part 3) Instruction execution statement
I tried calling Java / Objective-C native code from Flutter
What I learned when building a server in Java
parquet-tools gives java.lang.ExceptionInInitializerError, so I made it work with java8
What I researched about Java 8
What I researched about Java 6
What I researched about Java 9
What I researched about Java 7
What I learned about Kotlin
What I researched about Java 5
[Words spelled to me when I was in the first grade ⑦] What I want you to include at least with the Visual Studio Code extension
How to use PlantUML with Visual Studio Code (created on October 30, 2020)
What I have learned in Java (Part 1) Java development flow and overview
What I often do when I have trouble naming with Java (etc.)
What I thought about when I started migrating from Java to Kotlin
What I don't like when using interface of a function with default arguments in Kotlin from Java
Java lambda expressions learned with Comparator
I tried to interact with Java
I tried UDP communication with Java
Java build with mac vs code
What is thread safe (with Java)
Reintroducing Java 8 available from Android Studio 2.4
What I researched about Java learning
Sample code using Minio from Java
Spring5 MVC Web application development with Visual Studio Code Spring Security usage 1/3 [Preparation]
Spring5 MVC Web App Development with Visual Studio Code Hello World Creation
Spring Boot2 Web application development with Visual Studio Code SQL Server connection
Spring5 MVC web application development with Visual Studio Code SQL Server connection
[Rails] What I learned from a little stumbling block when using ancestry
[Visual Studio Code] I get a syntax error when debugging when using rbenv
Spring Boot2 Web application development with Visual Studio Code Hello World creation
Spring5 MVC Web application development with Visual Studio Code Maven template creation
Generate source code from JAR file with JD-GUI of Java Decompiler project