|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
IntroductionThis short hands on article will show you how to convert Java Applets written for the Sun JDK 1.1.4 into J# Browser Controls. A J# Browser Control is the equivalent to the Java Applets in the .NET world. Before any clients can view any J# Browser Controls, they must first install these redists in this order:Client computers Developer computers alternative 2
The latest J# Browser Controls version has support for offline viewing, which is nice for debugging on your local computer. This will allow you to view the web pages locally without running them through a web server. The converting steps are done very quickly if the source Java Applet is written in the supported JDK 1.1.4 API. Here are the steps:
CompilingA J# Browser Control consists of a dll library. You can compile the Browser Control from the Java Applet source by doing:C:\...\>vjc.exe /target:library /out:Applet.dll *.java
Hopefully you did not get any errors, only a Applet.dll library file.
Editing the HTML web page fileYou can include a J# Browser Control in nearly any web page by including the following line:<OBJECT CLASSID="clsid:a399591c-0fd0-41f8-9d25-bd76f632415f"
WIDTH=300 HEIGHT=110
ID=SkidPad
VJSCODEBASE = "Applet.dll#skidpad" >
</OBJECT>
The CLASSID tag references the ActiveX control that runs the J# Browser Control. Do not edit this ID. If you edit this ID tag the J# Browser Control will not work. WIDTH and HEIGHT are the size in pixels. VJSCODEBASE references the URL where the Browser Control is located and which class the applet lives in. "Applet.dll#skidpad" tells us the Applet.dll is located in the same directory as the html-file, and the "applet" is located in the skidpad class.
It does not work!Please check the following:
References
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||