[CLOSED] Using java applets with ext.net

  1. #1

    [CLOSED] Using java applets with ext.net

    Hi
    Ok, here's another basic question. I have a view like this:
    
    @{
        ViewBag.Title = "TestApplet";
    }
    
    <h2>TestApplet</h2>
    <object type="application/x-java-applet" width="100" height="100">
        <param name="code" value="test.Main.class" />
    </object>
    When I open this view I get class not found exception. I have put Main.class file in subfolder test of view's folder (actually it can be anywhere, I tried a lots of locations but without success).
    Last edited by Daniil; Mar 12, 2015 at 2:58 PM. Reason: [CLOSED]
  2. #2
    Unfortunately this is not enough information for us to test the problem.
    Geoffrey McGill
    Founder
  3. #3
    If you need a code of the applet, here it is:
    package test;
    
    import java.applet.*;
    import java.awt.*;
    
    
    public class Main extends Applet {
    	public void paint(Graphics g){
    	      g.drawString("Hello from Java Applet.",40,20);
    	}
    }
    Code for controller is trivial as well:
    public ActionResult TestApplet()
            {
                return View();
            }
    Please tell me if there's something that I can provide more
  4. #4
    Hi @ingbabic,

    Please clarify do you mean that the same code is working without Ext.NET and it stops working after attaching Ext.NET to the project?
  5. #5
    Well it didn't worked with just normal ASP.NET MVC application, so actually it doesn't have anything to do with Ext.NET.

    It might be due to MVC routing, because normally you would want to put applet class in same folder where html page, consisting applet, is residing. If you do it in ASP.NET Webforms application it works that way.

    However I came to this workaround. If you pack your class in jar file and provide a path of the jar in archive parameter it works. So for future reference for those who would want to do the same thing, this would be correct code:
    
    @{
        ViewBag.Title = "TestApplet";
    }
    
    <h2>TestApplet</h2>
    <object type="application/x-java-applet" width="500" height="100">
        <param name="code" value="test.Main.class" />
        <param name="archive" value="/Applets/TestApplet.jar" />
    </object>
    In this example jar file should be copied in the folder Applets in the root of the project. Thanks.

Similar Threads

  1. Debuging Java script
    By ingbabic in forum 2.x Help
    Replies: 7
    Last Post: Jan 27, 2015, 7:04 PM
  2. [CLOSED] Unable to get the panels in Ext Net 3.0 DLL in Java Script
    By mohan.bizbites in forum 3.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 25, 2014, 2:37 PM
  3. [CLOSED] set value of CheckColumn in java script
    By elke.schreiber in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 03, 2014, 9:31 AM
  4. [CLOSED] java script error
    By elke.schreiber in forum 2.x Legacy Premium Help
    Replies: 11
    Last Post: May 13, 2013, 2:19 PM
  5. [CLOSED] [Bug 2.1] Javascript Exception with SelectBox when typing
    By michaeld in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 25, 2013, 6:06 AM

Tags for this Thread

Posting Permissions