-3

I am using Goland IDE to build microservice in Go. If I have to write tests in Java, can Goland IDE support that. I don't see the support for Java in Goland. But wanted to check with folks who are experienced in Goland.

2
  • 4
    Goland is a Go IDE and there is no reason to expect it to support Java since the languages are completely unrelated. Use a Java IDE to write Java code.
    – Peter
    Dec 10, 2020 at 7:02
  • You also won't be able to reference any Java code from your Go code or vice-versa, so the value of actually creating a Java class to test Go code is likely zero.
    – Adrian
    Dec 10, 2020 at 14:21

1 Answer 1

4

To create a Java file in GoLand, you need to invoke File | New | File and enter the whole name with an extension, e.g., MyFactoryBean.java. But keep in mind that GoLand doesn't offer Java support, so you won't get syntax highlighting, code completion, and so on. IntelliJ IDEA Ultimate, on the contrary, supports both Java and Go at the same time, so you might want to use it to work with both languages simultaneously.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.