简体   繁体   English

Eclipse&Pivot:作为小程序启动

[英]Eclipse & Pivot: Launching as an applet

I'm developing an application in Java using Pivot for the GUI elements, in the Eclipse IDE. 我正在Eclipse IDE中使用Java数据透视表的GUI元素开发Java应用程序。

Since the end product is supposed to be an applet, I am wondering, if there is a way to launch the application in a browser through Eclipse during the development phase. 由于最终产品应该是applet,所以我想知道在开发阶段是否有办法通过Eclipse在浏览器中启动应用程序。

I don't want instructions on how to write an html page that loads the libraries and jnlp or something like that, I'm only asking if there is a way to automatically do all that in one-click-mode through Eclipse. 我不想要有关如何编写一个加载库和jnlp或类似内容的html页面的说明,我只是问是否有一种方法可以通过Eclipse以一键式方式自动完成所有这些操作。

The Run Configurations in Eclipse support launching a Java Applet. Eclipse中的“运行配置”支持启动Java Applet。

http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-launching_java_applet.htm http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-launching_java_applet.htm

The Hello World tutorial page on Apache's website gives you the information needed to configure the applet. Apache网站上的Hello World教程页面为您提供了配置applet所需的信息。

http://pivot.apache.org/tutorials/hello-world.html http://pivot.apache.org/tutorials/hello-world.html

[Edit in response to comment] Open the Run Configurations Window and add a new "Java Applet". [根据评论进行编辑]打开“运行配置”窗口,然后添加一个新的“ Java Applet”。 That's what the first link was meant to indicate you are able to do. 这就是第一个链接旨在表明您能够执行的操作。

The second link provides a snippet of how you're supposed to run applets using the BrowserApplicationContext, and it's quite specific in the values you provide (and map one for one to the Eclipse launcher values): 第二个链接提供了如何使用BrowserApplicationContext运行小应用程序的代码段,并且在您提供的值中非常具体(并一对一地映射到Eclipse启动器值):

<applet code="org.apache.pivot.wtk.BrowserApplicationContext$HostApplet" archive="lib/pivot-core-[version].jar,lib/pivot-wtk-[version].jar,lib/pivot-wtk-terra-[version].jar,lib/pivot-tutorials-[version].jar" width="160" height="80" > <param name="application_class_name" value="org.apache.pivot.tutorials.HelloJava"> </applet>

The Main and Parameters tabs should be the only one you're looking at. “主要”和“参数”选项卡应该是您正在查看的唯一选项卡。

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

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