开发者

Eclipse & Pivot: Launching as an applet

I'm developing an application in Java using Pivot for the GUI elements, in the Eclipse开发者_如何学JAVA IDE.

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.

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.


The Run Configurations in Eclipse support launching a Java Applet.

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.

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

[Edit in response to comment] Open the Run Configurations Window and add a new "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):

<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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜