我正计划从Eclipse切换到Visual Studio.我将如何运行此简单的hello world Java代码. [英] I am planning on switching from Eclipse to Visual Studio. How would I get this simple hello world java code to run.

查看:238
本文介绍了我正计划从Eclipse切换到Visual Studio.我将如何运行此简单的hello world Java代码.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是代码

public class Helloworld {

    public static void main(String[] args) {
        // Prints "Hello, World" to the terminal window.
        System.out.println("Hello,j World");
    }

}

在eclipse上测试代码是否正在运行时,我按"Run"(运行).按钮.

On eclipse to test if the code is running, I press the "Run" button.

我在Visual Studio Code中找到的最接近的是调试按钮,该按钮返回错误.

The closest i have found in Visual studio Code is the debug button which returns the error. Could not find the preLaunchTask 'npm

如果我可以获取有关如何在Visual Studio Community 2017或Code中成功成功运行Java hello world代码的逐步指南,它将有所帮助.

If i could get a step by step guide on how to get started with running a java hello world code successfully in Visual Studio Community 2017 or Code it would help.

推荐答案

Visual Studio不支持Java语言.有C#,它具有类似的语法.

Visual Studio doesn't include support for the Java language. There is C#, which has a similar syntax.

如果您真的想在Visual Studio中使用Java,则需要MarketPlace的一些第三方工具,例如:

If you really want to use Java with Visual Studio, you need some 3rd party tool from the MarketPlace, such as:

https://marketplace.visualstudio.com/items?itemName=SamHarwell.JavaLanguageSupport


这篇关于我正计划从Eclipse切换到Visual Studio.我将如何运行此简单的hello world Java代码.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆