Unable to load the J# Browser Control

I've created an html page with ONLY the following code....

<OBJECT
WIDTH="1024"
HEIGHT="768"
CLASSID="clsid:a399591c-0fd0-41f8-9d25-bd76f632415f"
VJSCODEBASE="myfile.dll#_0"
ID="Object1" >
</OBJECT>

where the dll file is named "myfile.dll" and the first class file is _0.jsl

and each time I load the file into internet explorer the statusbar shows:

"Unable to load the J# Browser Control in file file:///C:/temp/projects/myfile/myfile/bin/debug/myfile.dll"



Answer this question

Unable to load the J# Browser Control

  • Chetan Singh

    OK can you post your code that you referred to

    I guess the gray rectangle placeholder for a broken applet looks just like the gray rectangle you get when a working applet doesn't draw anything. :-)

    -slj-


  • subrama6

    Can you at least get a no-op applet to run That is, one that doesn't even override Applet.init but at least appears as a gray rectangle in the web page.

    If not, then something is seriously broken! Post the applet code here.

    Or assuming a no-op applet works, and if your IDE isn't able to debug applets in the browser (as you said in the other thread) then you can still use good old System.out.println (etc.) to help debug as you add logic to your applet. To view the output, start iexplore.exe from a command line and redirect its output to a file.

    -slj-


  • KesPeti

    the applet does load and I do get the grey box.

    I purchased Visual Studio 2005 so that I could debug the applet with the standard debug tools which come with Visual Studio 2005 (as you cannot debug iexplore.exe with Visual Studio Express). When I begin the debug the application builds with no errors and then iexplore with the web page starts. There is NO output to the debug window and as soon as the grey box appears the status bar of iexplore gives the error message as stated above.... "Unable to load the J# Browser control in file.............."

    I can (as stated before) create a 2 line class file, include the browser control as a "reference" in the solution explorer, create the appropriate webpage and debug the file and get the exact same results. I've reinstalled the browser control 3 times to see if maybe I installed it incorrectly somehow... is there a way to test this is there a webpage that anyone knows of where J# browser controls are loaded with the applet so that I can test if it is my setup

    Thanks again for your reply.

    -john


  • Output the XSLCompiledTransform.

    Hi,

    You need to specify the JBC class name along with the dll name. For example...

    "myfile.dll#Class1"

    It should work then.

    Thanks.



  • Lightning Lord

    Bingo... the <object> tag needs to specify the full name of your class, which is myapplet._0.

    -slj-


  • npham

    Can't anyone help with this
  • Paul B

    Did you try it The vjscodebase attribute must specify both the dll file name and the fully qualified class name, which includes the package name. Like this:

    VJSCODEBASE="myapplet.dll#myapplet._0"

    The MSDN examples don't illustrate this clearly, but the fully qualified class name is what's required, as in most Java tools and utilities. The name of your dll and the name of your package happen to be the same but are unrelated in this case.

    -slj-


  • Junkie List

    VJSCODEBASE="myfile.dll#_0" is the JBC class name and dll file. myfile.dll is the file name _0.jsl is the class name.


  • ConradsW

    no no, I'm certain that its myapplet.dll#_0 which is what I have (read above post from Jaiprakash)
  • da_cobra

    Contents of test.html:

    <OBJECT
    WIDTH="1024"
    HEIGHT="768"
    CLASSID="clsid:a399591c-0fd0-41f8-9d25-bd76f632415f"
    VJSCODEBASE="myapplet.dll#_0"
    ID="Object1" >
    </OBJECT>

    Contents of _0.jsl

    package myapplet;
    import java.applet.*;
    import java.awt.*;


    public class _0 extends Applet
    {
    public void init()
    {
    setBackground(Color.red);
    }
    }

    vjsjbc has been added as a reference to the project (so the java file has more than two lines, but you get the picture)


  • Bob McD

    Well I'll be

    Thanks Scott, I guess I was confused because the examples are so confusing it should actually say something like "myfile.dll#packagename.classfile"

    Mark this one SOLVED.


  • Unable to load the J# Browser Control