简体   繁体   English

使用Java创建Windows Metro风格的应用程序?

[英]Creating Windows Metro style apps with Java?

I know how to create small desktop applications in Java. 我知道如何用Java创建小型桌面应用程序。 I want to know, can I make Windows Metro style apps in Java? 我想知道,我可以用Java制作Windows Metro风格的应用程序吗? Because on the web only C++/C/C#/JavaScript etc. are mentioned. 因为在Web上只提到了C ++ / C / C#/ JavaScript等。 If yes can you please give me some reference for a quick start. 如果是的话,请给我一些快速入门的参考。 If not which one will be easiest language to start? 如果不是哪一个将是最简单的语言开始?

You can only create metro style apps with C#, VB, JavaScript and C++. 您只能使用C#,VB,JavaScript和C ++创建metro风格的应用程序。 There is currently no support for authoring metro style applications with Java. 目前不支持使用Java创作metro风格的应用程序。

You cannot make metro style apps with Java. 你不能用Java制作metro风格的应用程序。

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. 对于你的问题的另一部分,对于入门指南和语言很容易, MSDN具有起动的指导,帮助建立新的Metro风格的应用程序, 这个这个这个应该是有帮助的。

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. 哪种语言最简单,这取决于开发人员,开发.NET或WPF或Windows Forms应用程序的人可能对他熟悉的环境感到更舒服,并且可能更喜欢使用C ++和XAML或VisualBasic进行开发,具体取决于他的用途。使用之前,来自Web开发的人可能更喜欢javascript。

For new developers, i would recommend using C# and XAML, but again it is my choice, and not everyone will agree with it. 对于新开发者,我建议使用C#和XAML,但这又是我的选择,并不是每个人都会同意它。

Here is another link which points to guides at MSDN, and adds some additional detail. 是另一个指向MSDN指南的链接,并添加了一些额外的细节。

WinRT is still based on COM, so you should be able to access it from Java using something like the Java-COM bridge . WinRT仍然基于COM,因此您应该能够使用Java-COM桥接器从Java访问它。 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. 如果您希望从Java中轻松使用WinRT,则需要修改Java运行时以及可能还需要编译器以使其了解WinRT类型。

I believe you will not be able to use Java and WinRT. 我相信你将无法使用Java和WinRT。 The best option for you to try is C#, because this is the language that is closest to java, in my opinion. 您尝试的最佳选择是C#,因为在我看来,这是最接近java的语言。

Actually you can quite easily write a metro style web application by using a CSS library like this one: http://metroui.org.ua/ 实际上你可以通过使用像这样的CSS库轻松编写一个metro风格的Web应用程序: http//metroui.org.ua/

With this CSS, it is possibly to generate plain old HTML with Java on the server side (eg via a servlet) and then reverence the CSS classes. 使用这个CSS,可能在服务器端生成带有Java的普通旧HTML(例如通过servlet),然后尊重CSS类。

I did this by using the org.apache.ecs library (it's very old but it works pretty good). 我通过使用org.apache.ecs库来做到这一点(它很老但是效果很好)。

C# and Java are similar, but with different Frameworks. C#和Java类似,但具有不同的框架。 Look into developing Metro Style apps in C#. 研究用C#开发Metro Style应用程序。 Remember to sign up for a developer's license for Windows Store Apps! 请记得注册Windows Store Apps的开发人员许可证!

You could write your app in Java and cross compile into JavaScript using GWT. 您可以使用Java编写应用程序并使用GWT交叉编译为JavaScript。 We do this successfully with a couple of Windows (Phone and Desktop) apps. 我们使用几个Windows(电话和桌面)应用程序成功完成了这项工作。 Additionally, the code can be shared with your iOS and Android ports. 此外,代码可以与您的iOS和Android端口共享。

here what i found in sourceforge.net 这是我在sourceforge.net找到的
http://sourceforge.net/directory/os:windows/freshness:recently-updated/?q=slibrary this is the most close ui to metro theme i saw. http://sourceforge.net/directory/os:windows/freshness:recently-updated/?q=slibrary这是我所看到的最接近地铁主题的ui。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM