简体   繁体   中英

Eclipse & Pivot: Launching as an applet

I'm developing an application in Java using Pivot for the GUI elements, in the Eclipse 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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