Visual Studio 2010 中的 Java?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3183226/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Java in Visual Studio 2010?
提问by Shimmy Weitzhandler
Is there any way to manage/debug/compile Java projects in Visual Studio 2010?
有没有办法在Visual Studio 2010 中管理/调试/编译 Java 项目?
Before you answer, please read this topic.
在回答之前,请阅读本主题。
采纳答案by Chris Ostler
I'm a little late to the party, but it looks like someone has started adding support. From the description, right now it only does syntax highlighting and basic navigation within a single file. However, in the Q&A section the author mentions plans to add compilation and debugging support later in the year.
我参加聚会有点晚了,但看起来有人已经开始增加支持了。从描述来看,现在它只在单个文件中进行语法突出显示和基本导航。然而,在问答部分,作者提到计划在今年晚些时候添加编译和调试支持。
回答by Vineet Reynolds
The short answer - No.
简短的回答 - 不。
The long answer - No, because the supposed intellisense support for Java that the blog entry referred to, in the question, relies on J# support. I believe it has been quite sometime since Microsoft has discontinued J# - VS2008 does not have it.
长答案 - 不,因为博客条目在问题中提到的对 Java 的假设智能感知支持依赖于 J# 支持。我相信自从微软停止使用 J# 已经有一段时间了——VS2008 没有它。
In the long run, you're better off learning how to use Eclipse/Netbeans/IntelliJ IDEA or any other IDE for the purpose of managing Java projects.
从长远来看,您最好学习如何使用 Eclipse/Netbeans/IntelliJ IDEA 或任何其他 IDE 来管理 Java 项目。
回答by Jonathan Allen
Sure. Visual Studio works with any language so long as someone takes the time to write the plug-ins for it. Heck, Mainsoft has already added JVM debugging support to Visual Studio. They just don't support the language.
当然。Visual Studio 适用于任何语言,只要有人花时间为其编写插件即可。哎呀,Mainsoft 已经为 Visual Studio 添加了 JVM 调试支持。他们只是不支持该语言。
The only problem is YOU are going to have to be the one who writes it.
唯一的问题是您必须是编写它的人。
I won't lie to you. It won't be easy and fan-boys on both sides will hate you for it. But if you pull it off I can at least offer you some money to write about how you did it.
我不会骗你的。这并不容易,双方的粉丝都会因此讨厌你。但是,如果你成功了,我至少可以给你一些钱来写你是如何做到的。
回答by Dan H
Cyberduckis written in Java and developed in Visual Studio 2010, though it requires IKVM, an implementation of Java for Mono and the Microsoft .NET Framework. Here are the build instructions.
Cyberduck是用 Java 编写的,并在 Visual Studio 2010 中开发,不过它需要IKVM,它是 Mono 和 Microsoft .NET Framework 的 Java 实现。这是构建说明。
回答by jdannemann
No, although, I long for the day when VS might possibly support building Java applications. I don't think I have yet found an IDE as fully featured. Personally, if VS supported Java development, then I would trash my installation of Eclipse and Netbeans. ... so tired of wonky Java IDEs....
不,虽然,我渴望 VS 可能支持构建 Java 应用程序的那一天。我认为我还没有找到功能齐全的 IDE。就个人而言,如果 VS 支持 Java 开发,那么我会丢弃 Eclipse 和 Netbeans 的安装。... 厌倦了古怪的 Java IDE....
回答by Pervez Alam
I will advise to go for Eclipse, if you have to do at least 25% Java coding. Otherwise VS is good as well. But I like Eclipse for C++ as well as Java.
如果您必须至少进行 25% 的 Java 编码,我会建议您使用 Eclipse。否则VS也不错。但我喜欢 Eclipse for C++ 以及 Java。
回答by Raven
C++ syntax highlighting looks pretty good for Java. Turn this on in Options->Text Editor->File Extension.
C++ 语法高亮对于 Java 来说看起来很不错。在选项->文本编辑器->文件扩展名中打开它。
- Extension: java
- Editor: Microsoft Visual C++
- 扩展名:java
- 编辑:Microsoft Visual C++
Now reopen a .java file and see pretty colors.
现在重新打开一个 .java 文件并看到漂亮的颜色。
回答by Dominic.wig
A new plugin is currently being developed named IntegraStudio, aiming at full Java development under VS. It currently supports:
目前正在开发一个名为 IntegraStudio 的新插件,旨在在 VS 下进行完整的 Java 开发。目前支持:
- IntelliSense for Java (comparable to standard C++ IntelliSense in VS)
- build with Ant or Maven
- direct Ant / Maven project view in Solution Explorer
- Java debugger with container visualization
- support for VS browsing features (Class View, Code definition, etc.)
- Class View works also for classes in JARs (including standard library)
- browsing Maven repositories
- JDK: 1.6 - 1.8
- IntelliSense for Java(与 VS 中的标准 C++ IntelliSense 相当)
- 使用 Ant 或 Maven 构建
- 在解决方案资源管理器中直接查看 Ant/Maven 项目
- 具有容器可视化功能的 Java 调试器
- 支持VS浏览功能(类视图、代码定义等)
- 类视图也适用于 JAR 中的类(包括标准库)
- 浏览 Maven 存储库
- JDK:1.6 - 1.8
It uses standard JDK tools and targets the real Java platform (it is not a .NET platform solution, as VJ# was).
它使用标准的 JDK 工具并针对真正的 Java 平台(它不是 .NET 平台解决方案,就像 VJ# 那样)。
At the moment of writing this, the IntegraStudio plugin is beta.
在撰写本文时,IntegraStudio 插件是测试版。
It does not yet contain advanced Eclipse features, however many of them are in current roadmap (e.g. code refactorings and quick fixes).
它尚不包含高级 Eclipse 特性,但其中许多特性都在当前的路线图中(例如代码重构和快速修复)。
You can find it on Visual Studio gallery:
您可以在 Visual Studio 库中找到它:
http://visualstudiogallery.msdn.microsoft.com/588fb167-d18c-4e61-8aeb-30baeddb00da
http://visualstudiogallery.msdn.microsoft.com/588fb167-d18c-4e61-8aeb-30baeddb00da
The product official website is:
产品官网是:
http://www.softerg.com/integra
http://www.softerg.com/integra
Current docs (with large number of screenshots):
当前文档(带有大量屏幕截图):