Click here to Skip to main content
6,291,522 members and growing! (13,928 online)
Email Password   helpLost your password?
Languages » Other .NET Languages » J# .NET     Intermediate

J# Browser Controls

By Lars-Inge Tønnessen

A short article on how to compile J# Browser Controls
Windows, .NETVS.NET2003, IE 6.0, IE 5.5, Dev
Posted:14 Nov 2004
Views:30,438
Bookmarked:8 times
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
1 vote for this article.
Popularity: 0.00 Rating: 3.00 out of 5

1

2
1 vote, 100.0%
3

4

5

Sample Image - JBrowserExample.jpg

Introduction

This 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 1
Developer computers alternative 2
(Please notice that the Microsoft Visual Studio .NET/2002 IDE does not support J# Browser Controls).

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:

Compiling

A 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 file

You 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:
  • The redists (all three must be installed)
  • The supported API (JDK 1.1.4, please notice this is not 1.4.1)
  • The CLASSID and the VJSCODEBASE tag in the html page file.

References

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Lars-Inge Tønnessen


Member

Occupation: Web Developer
Location: Norway Norway

Other popular Other .NET Languages articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 4 of 4 (Total in Forum: 4) (Refresh)FirstPrevNext
Generalgray box PinmemberAaron Sulwer10:59 29 Sep '05  
GeneralDumb questin Pinmemberdvemil22:50 14 Nov '04  
GeneralRe: Dumb questin PinmemberJudah Himango10:40 22 Nov '04  
GeneralRe: Dumb questin Pinmemberdvemil21:45 22 Nov '04  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 14 Nov 2004
Editor: Nishant Sivakumar
Copyright 2004 by Lars-Inge Tønnessen
Everything else Copyright © CodeProject, 1999-2009
Web09 | Advertise on the Code Project