使用 Java 创建 Windows Metro 风格的应用程序?
我知道如何用 Java 创建小型桌面应用程序。我想知道,我可以用 Java 制作 Windows Metro 风格的应用程序吗?因为网上只提到C++/C/C#/JavaScript等。如果是的话,请给我一些快速入门的参考。如果不是,哪一种语言最容易上手?
I know how to create small desktop applications in Java. I want to know, can I make Windows Metro style apps in Java? Because on the web only C++/C/C#/JavaScript etc. are mentioned. If yes can you please give me some reference for a quick start. If not which one will be easiest language to start?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
您只能使用 C#、VB、JavaScript 和 C++ 创建 Metro 风格应用程序。目前不支持使用 Java 编写 Metro 风格应用程序。
You can only create metro style apps with C#, VB, JavaScript and C++. There is currently no support for authoring metro style applications with Java.
您无法使用 Java 制作 Metro 风格的应用程序。
对于问题的另一部分,关于入门指南以及哪种语言比较简单,MSDN 有一个入门指南,可以帮助构建新的 Metro 风格应用程序,此,此 和 这应该会有所帮助。
哪种语言最简单,这取决于开发人员,一直在开发 .NET 或 WPF 或 Windows Forms 应用程序的人可能更喜欢他熟悉的环境,并且可能更喜欢使用 C++ 和 XAML 或 VisualBasic 进行开发,具体取决于他所从事的工作以前使用过,而来自 Web 开发的人可能更喜欢 javascript。
对于新开发人员,我建议使用 C# 和 XAML,但这又是我的选择,并不是每个人都会同意。
这里是另一个链接它指向 MSDN 上的指南,并添加了一些额外的细节。
You cannot make metro style apps with Java.
For the other part of your question, regarding starter's guide and which language is easy, MSDN has a starter's guide which helps building new metro style apps, this, this and this should be helpful.
And which language is easiest, well it depends on the developer, someone who has been developing .NET or WPF or Windows Forms applications maybe more comfortable with he familiar environment and may prefer developing using C++ and XAML or VisualBasic, depending on what he has been using before, while someone coming from web development may prefer javascript.
For new developers, i would recommend using C# and XAML, but again it is my choice, and not everyone will agree with it.
Here is another link which points to guides at MSDN, and adds some additional detail.
我相信你不会使用Java和WinRT。您可以尝试的最佳选择是 C#,因为在我看来,这是最接近 java 的语言。
I believe you will not be able to use Java and WinRT. The best option for you to try is C#, because this is the language that is closest to java, in my opinion.
WinRT 仍然基于 COM,因此您应该能够使用 Java-COM 桥。使用它可能会非常困难(您必须使用字符串作为方法名称等)。
如果您想从 Java 轻松使用 WinRT,则需要修改 Java 运行时,还可能需要修改编译器,以使它们了解 WinRT 类型。
WinRT is still based on COM, so you should be able to access it from Java using something like the Java-COM bridge. Using that would probably be quite hard (you'd have to use strings for method names etc.).
If you wanted to use WinRT comfortably from Java, that would require modifying the Java runtime and possibly also the compiler to make them aware of WinRT types.
实际上,您可以使用 CSS 库轻松编写 Metro 风格的 Web 应用程序,如下所示:http://metroui.org。 ua/
使用此 CSS,可以在服务器端使用 Java 生成普通的旧 HTML(例如通过 servlet),然后尊重 CSS 类。
我通过使用 org.apache.ecs 库来做到这一点(它很旧,但效果很好)。
Actually you can quite easily write a metro style web application by using a CSS library like this one: http://metroui.org.ua/
With this CSS, it is possibly to generate plain old HTML with Java on the server side (e.g. via a servlet) and then reverence the CSS classes.
I did this by using the org.apache.ecs library (it's very old but it works pretty good).
C# 和 Java 很相似,但框架不同。研究用 C# 开发 Metro 风格应用程序。请记住注册 Windows 应用商店应用程序的开发人员许可证!
C# and Java are similar, but with different Frameworks. Look into developing Metro Style apps in C#. Remember to sign up for a developer's license for Windows Store Apps!
您可以使用 Java 编写应用程序并使用 GWT 交叉编译为 JavaScript。我们通过几个 Windows(手机和桌面)应用程序成功地做到了这一点。此外,该代码可以与您的 iOS 和 Android 端口共享。
You could write your app in Java and cross compile into JavaScript using GWT. We do this successfully with a couple of Windows (Phone and Desktop) apps. Additionally, the code can be shared with your iOS and Android ports.
这是我在 sourceforge.net 中找到的内容
http://sourceforge.net/directory/os:windows/新鲜度:最近更新/?q=slibrary
这是我见过的最接近地铁主题的用户界面。
here what i found in sourceforge.net
http://sourceforge.net/directory/os:windows/freshness:recently-updated/?q=slibrary
this is the most close ui to metro theme i saw.