Help deploying an applet

I have an applet which uses 2 archives: applet.jar and swing.jar
I need to test this applet with our web application, because it needs to communicate with other servlets in order to get data. The problem is, the browser keeps my applet in a sandbox so I get security exceptions left and right.
I then tried to use jarsigner to get the applet self-signed (not by verisign or anythign like that). I signed both the applet.jar and swing.jar successfully, and tried to run it again, but same security exceptions.
Do I need to alter my <APPLET> tag when using signed jars? Maybe need to add those namespace and useslibrary paramters? If so, what would the namespace be? (I ran jarsigner with no options, so everythign is default)

some more info..
the browser I'm using is Internet Explorer, so all the security exceptions are from the local com.ms package. I tried running my applet in Netscape, but the page would fail to load completely (the whole browser froze).
Inside my applet, I make the following call:
if (Class.forName("com.ms.security.PolicyEngine") != null) {
   PolicyEngine.assertPermission(PermissionID.SYSTEM);
   System.out.println("Permissions obtained");
}and this call is successful as I check the Java Console and see my "permissions obtained" printed out.
yet still while running the applet I get a security exception while trying to access the System clipboard, and somethign about Illegal Thread Group- this one gets thrown very often and dosen't seem to be from any calls I specifically make- it looks like it comes from somethign Swing is doing in the background.
please help!

Similar Messages

  • How deploy javafx Applet in Tomcat

    Hi all!
    Please help me. How i can deploy JavaFX Applet in Tomcat

    Are you using Netbeans or SDK?

  • Deploying an Applet

    hey there,
    if created a applet with which you can send SQL statements to a Oracle Database and then see the results in a nice swing table (JTable). If Only used the connection manager to acces the database. In the JDeveloper environment this works very nice.
    My problem starts when I want to deploy the Applet somewhere else. The error i'm getting in my iExplorer statusbar (after using the deployment wizard) is:
    load: package1.MainApplet cant be instantiated.
    if got some experience with java and using jars and stuff. I'm pretty sure it's not that (I've tried basicly everything I could think of.
    Is it possible that this error occurs because I'm not running it from the database computer. I thought that it just wouldn't be able to log on to the database. (the logon secuence starts after clicking a button so I expect it would be able to start)
    please let me know what you think even if you think it's of no help, dialog often helps you know
    thanks
    Erik
    [email protected]

    Hi,
    It looks like you are not using BC4J in your applet. There are some bugs there for the 3.1.1 release, but not the ones you are getting.
    The most important thing for deployment of an applet is:
    1. Deploy EVERYTHING that your applet needs to the server. This includes the applet classes themselves, as well as dependency libraries such as the classes12.zip file for the connection, rt.zip, etc. Best thing to do here is to select your project in the Navigator, and choose Properties ... from the right-mouse menu. Now click the Libraries tab. Here you will see a list of libraries. All of the jar/zip files that make up these libraries need to be deployed with your applet to the webserver.
    2. If you have deployed all of your dependency libraries to the webserver, you will need to make sure that the HTML file that contains the applet tag correctly lists all of the jars/zips in the ARCHIVE tag. Note that if you are using the JDK 1.2 plugin (you should), then the ARCHIVE tag appears MORE THAN ONCE in your HTML file. Open that file in a text editor and make sure the ARCHIVE list is correct for ALL instances of the tag.
    Here are some good generic applet references to check:
    Borland JBuilder doc: http://www.borland.com/techpubs/jbuilder/jbuilder3-s/pg/applets.html
    JavaSoft Plugin Download: http://java.sun.com/products/plugin/
    JavaSoft Applets Resources Page: http://www.javasoft.com/applets/index.html
    null

  • Deploying my applet

    hello everyone.
    I have spent the morning reading up on how to deploy my applet but i am just getting frustrated. I had no success trying to create the jar file for my applet. All i kept getting was 'bad command of filename' in the command line. But i don't need a .jar to put my applet in a html page right? All i need is the .class file and the one image I am using?
    I put the 'Applet1.class', the picture, and the html page in the same directory but i was hoping if someone could explain why i am not viewing it. here's what i have in the applet tag:
    <applet
    code = "Applet1.class"
    width = "400"
    height = "300"
    hspace = "0"
    vspace = "0"
    align = "top"
    >
    </applet>
    I just don't understand how to deploy my applet. I am using JBuilder 5 Personal and in it's tutorial it says that the "JDK must be on your path" but i don't know how to do this in the command line! I never learned DOS so my knowledge of it is merely navigational and Borland's site is just horrible for finding answers. (at least for newbies)
    Please help me.
    I have three files: the .class, .gif, and the .html in the same directory. How do i put them together?
    getting sad,
    -cloudtwist-

    1. check your classpath to see whether it is correct for both your java commands as well as your working directory
    2. make sure that your .html is pointing to the correct directory in which your .class file resides.
    3. it could also be that you might not have the proper java plug-in in your browser window. You can atleast momentarily avoid this problem by implementing the applet below which you can view in an appletviewer.
    you can try this very simple applet to check how an applet works. Note that in this I have put the html code along as a comment and it should be run with the command "appletviewer basicapplet.java" after compilation. You don't need a .html file for this.
    If you are getting
    import java.awt.*;
    import java.applet.Applet;
    /*<applet code=basicapplet.class
    width=300
    height=300>
    </applet>*/
    public class basicapplet extends Applet{
    public void paint(Graphics g){
    g.drawString("Hello from Java", 80, 120);

  • How to Deploy an Applet successfully?

    I tried the tutorial in the JDeveloper 2.0 Beta. Everything
    worked fine. I could run the applet within the JDeveloper. I
    completed the section on deploying the applet. When I started
    running the applet using IE, I got the following message "load:
    tutorial.EmpApplet can't be instantiated" and the program
    stopped. What could be the problem? How do I deploy my applet?
    null

    when deploying application i am getting
    java.lang.ClassFormatError.borland/jdbc/dataset/Dataset
    (local variable name has bad constant pool index)
    can ya please reply soon;
    JDeveloper Team (guest) wrote:
    : Bernard,
    : By 'Js2', I assume you mean JDeveloper 2.0 Beta? If that is
    the
    : case, then the deployment wizard can be found as follows:
    : Select New from the File menu to display the New Gallery.
    : Click on the Deployment tab (may have to click on right arrow
    : (->) to view all the tabs in the New Gallery.
    : I think the one you want for applets is the Simple Archive.
    : Double-click on the type of deployment you want to start the
    : deployment wizard.
    : Note: This will be changing slightly in 2.0 production.
    : Deployment will be available from the Project menu instead of
    the
    : new Gallery, and all deployment wizards will be incorporated
    into
    : one, where you choose the deployment type on the first page of
    : the wizard.
    : -L
    : Bernard Polarski (guest) wrote:
    : : I could manage to run in netscape an applet that connect to
    my
    : : 7.3.4 DB, but I used Kawa on the JDK 1.1.7b of Sun. For
    jsuite,
    : : the problem is that borland & Oracle redefine many java
    classes
    : : of Sun and you must bring these new classes with you in a
    Zip
    : or
    : : Jar file. The problem in Js2, is that I did not found a
    : : deployment wizard to help create a zip file containing all
    the
    : : predefined classes. This wizard exists in Jbuilder2 but I
    could
    : : not manage to find it in JS2. Suppose it come in next
    version.
    : : B. Polarski
    : : JDev team (guest) wrote:
    : : : Looks like the appletviewer does not have access to the
    : : : borland.jbcl.* classes. Did you choose to check the
    borland.*
    : : : classes for dependencies before generating the archive?
    : : : Also check the .html page to see if the <archive> tag is
    : : there.
    : : : Hope this helps.
    : : : Regards
    : : : JDev Team
    : : : Worm (guest) wrote:
    : : : : TK Cheng (guest) wrote:
    : : : : : I tried the tutorial in the JDeveloper 2.0 Beta.
    : : Everything
    : : : : : worked fine. I could run the applet within the
    : : JDeveloper.
    : : : I
    : : : : : completed the section on deploying the applet. When I
    : : : started
    : : : : : running the applet using IE, I got the following
    message
    : : : : "load:
    : : : : : tutorial.EmpApplet can't be instantiated" and the
    program
    : : : : : stopped. What could be the problem? How do I deploy
    my
    : : : : applet?
    : : : : I got the same message in IE 5.0, "Failed to load" in
    : : Netscape
    : : : : 4.5, and finally tried HotJava 1.1.5 and got:
    : : : : "File not found when looking for:
    : : : : borland.jbcl.dataset.StorageDataSet
    : : : : null:
    : : : : java.lang.NoClassDefFoundError".
    : : : : If anyone knows how to fix this PLEASE let me know.
    : : Worm
    null

  • How to 'deploy' an Applet when class files are on client machine?

    Hi all,
    I've searched through these forums and I can't find where my specific question has been asked before, so please accept my apologies for any duplication.
    I am trying to develop an applet for use on an intranet. (The specific requirement is that the applet must operate a scanner, and upload the scanned images to the database - we want it to be an applet so that it seamlessly integrates with the rest of the web application from the user's POV).
    Therefore the applet needs to run outside of the sandbox, but I don't want to go to all the hassle of getting a certificate from Verisign and signing the applet - that doesn't seem like it should be necessary, since there is no problem getting access to the client PC to install the class files by hand!
    I have read on this tutorial page that applets "that are loaded from the local file system (from a directory in the user's CLASSPATH) have none of the restrictions that applets loaded over the network do," so I don't think I am barking up the wrong tree:
    http://java.sun.com/docs/books/tutorial/deployment/applet/security.html
    That is exactly what I want to do! But whenever I try to run the applet, I get a no class definition found exception. However, if I run the applet as a standalone application (using its static main method) then the JRE has no trouble locating the class file - so I know that my CLASSPATH environment variable is set ok.
    Therefore I think the problem must be in my JNLP file. This is what mine looks like at present:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://localhost:8080/JGNS008" href="http://localhost:8080/JGNS008/scanner-applet.jnlp">
        <information>
            <title>Scanner Applet Prototype</title>
            <vendor>Fooware</vendor>
        </information>
        <resources>
            <!-- Application Resources -->
            <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" />
            <jar href="ScannerApplet.jar" main="false" />
        </resources>
        <applet-desc
             name="Scanner Applet Prototype"
             main-class="uk.co.fooware.ScannerApplet"
             width="72"
             height="20">
         </applet-desc>
         <update check="background"/>
    </jnlp>How do I rewrite this so that it doesn't try to download the class files from the network?
    Many thanks,
    Richard.

    richardwild wrote:
    ..I am trying to develop an applet for use on an intranet. (The specific requirement is that the applet must operate a scanner, and upload the scanned images to the database - we want it to be an applet so that it seamlessly integrates with the rest of the web application from the user's POV).
    Therefore the applet needs to run outside of the sandbox, but I don't want to go to all the hassle of getting a certificate from Verisign and signing the applet - that doesn't seem like it should be necessary,.. Code can be digitally signed without a 'verified' certificate from Versign.
    ..since there is no problem getting access to the client PC to install the class files by hand!
    I have read on this tutorial page that applets "that are loaded from the local file system (from a directory in the user's CLASSPATH) have none of the restrictions that applets loaded over the network do," so I don't think I am barking up the wrong tree:
    http://java.sun.com/docs/books/tutorial/deployment/applet/security.html
    Huh. I had never heard of that, but since I do not have access to my end user's classpath it is not that important to me.
    BTW - I am guessing they mean the path indicated by [http://pscode.org/prop/all.html?prop=java.class.path].
    And putting classes into JRE folders seems very hackish to me.
    That is exactly what I want to do! But whenever I try to run the applet, I get a no class definition found exception. However, if I run the applet as a standalone application (using its static main method) then the JRE has no trouble locating the class file - so I know that my CLASSPATH environment variable is set ok.Huh?
    Therefore I think the problem must be in my JNLP file. Huh?!? Why not deploy the applet using a standard applet element? The only way to configure an applet using a JNLP is ..
    a) If the applet is intended to be free floating.
    b) If the applet is intended to be embedded in a plug-in2 architecture JRE. Why impose that restriction, when it seems unnecessary and unproductive?
    Note that the second option is very new, and I would not expect all the things mentioned in the document you linked, to apply equally to JNLP embedded applets. If you want this applet embedded, I suggest you drop the entire JNLP approach and use a standard applet element.

  • Deploy infobus applet--"Invalidating certificate principals"

    Hi, lots of questions about deploying infobus applet had been
    posted previously, but none of them is my case.
    After finishing generating "package1.jar", I copy every *.jar,
    *.zip file into my deploy directory "c:\temp" as well as the
    package1.applet1.html. But while I open this html file in
    Netscape 4.7, no applet appear. In the java console, the
    following error message appear..
    Invalidating certificate principals in [file:/C|/temp/try/,]
    Can the applet be invoked without webserver?
    I had tried to transfer the whole directory to the website(sun
    webserver), the same error message appear( only change is the
    path now is [155.69.60.117:88])
    Can anyone tell me why?
    thx
    null

    This is hardly an Advanced Language Topic, nor is it Java-related. And who uses Netscape? I'm just playing with you. No but seriously, nobody is gonna answer that here. This is a JAVA forum.

  • How to deploy database Applets

    I use JDeveloper to build applets. What is the best way to
    deploy database applets to the 9iAS Portal?
    marcel

    My application is targeted toward home users with an Internet connection but minimal computer knowledge. It is not clear to me how I could install and configure a database server using WebStart, and doing it manually would hopelessly overwhelm my target audience. So I opted for a simple embedded PureJava database which stores information in ASCII files.
    I have several such files containing product data catalogs which I need to transfer using WebStart and write to a standard, platform-independent directory (i.e. no C:\ or such) which my JDBC URL can then access. I can pack my data files into a JAR and programmatically extract them on the client side. However, the problem is finding out what the application's client-side default path is in order to save my files to a standard location. It appears that the default path is the Windows Desktop the first time the app is started, but changes to the application's home directory (C:\Program Files\Java Web Start\.javaws\cache\...\myApp) thereafter.
    Any hints or suggestions?

  • Deploying Signed Applet to my users

    Hello,
    I have a signed applet from Thawte and it runs good on my machine, but I have the prblem of trying to deploy the applet to other users on other machines. What is the steps needed so that I don't have to change the java.policy file on their computers. This applet will run on a server that the group has access to.

    Develop a HTML or JSp to point to download the Applet Class and ask the Users to access the Html Page... now the Applet would have downloaded to the User Machines and it will do the job u wanted to do...

  • Help with java applets

    Ok i know i haven't read the applet tutorial or had much experience with applets but just hear me out and see if you can help me.
    BACKGROUND
    Ok...so i have previously viewed an applet on windows viewing an html file on my computer. I am trying to view just the most simple applet (helloworld) on linux. I'm using Ubuntu linux, the latest version as of February 23, 2006.I created an applet file and an html file in the same directory with the html file having an <applet> tag in it linking to the HelloWorldApp. I have tried viewing the html file and the java applet won't load. Everything other than the applet worked and I'm just stuck.
    So my plea is would somebody please just paste the bare minimum html file and applet file that you can see an applet with? I want to learn about applets and will do the tutorial but I would really like to just see one.
    Please help,
    A frustrated applet noob
    p.s.
    According to java.com I have installed JRE 5.0 and i have compiled a java application so I'm pretty sure I have successfully installed JDK 5.0.

    Bob, what web browser are you using?
    Make sure that the browser supports Java applets.
    If you want just to debug your applet try appletviewer utility
    from JDK first.

  • How to deploy an applet textbased?

    Hello Evrybody,
    I want to deploy an applet but I have 2 problems.
    * It has to be textbased, no gui.
    * It is after a authentication page.
    Is there a browser (or other way) of deploying such a applet?
    With kind regards
    Arnoud

    Cindy C. knew this one:
    (pg 197 in the j2ee tutorial.pdf)
    You can also create application-specific subdirectories (that is, package directo-ries) in either the document root or the WEB�INF/ lasses directory
    Note: When you add classes and archives to a WAR, deploytool automatically packages them in the WEB1/2INF subdirectory. This is correct for Web components and server-side utility classes, but incorrect for client-side classes such as applets and any archives accessed by applets. To put client-side classes and archives in the cor-rect location, you must drag them to the document root after you have added them to the archive.

  • Run and Deploy JavaFX applets on Linux Fedora

    Hi all,
    This is a step by step, how to run and deploy JavaFX applets on Linux/Fedora
    http://java-javafx-iipt.blogspot.com/2009/04/run-and-deploy-javafx-applets-on-linux.html
    Hope you find it useful.
    Kaesar ALNIJRES

    Something like this should workjava -cp /path-to-external-jar:SMSClient.jar TheMainClassWhen you use the -jar option, the -cp option is ignored. If you want to use -jar, you can add a Class-Path entry into theSMSClient jar's manifest with the relative path to the external jar.

  • Mass deployment of applet (jar)

    In order to deploy an applet en-mass when using the Microsoft JVM for IE I run the command below in a login script. How would I do the same when using the SUN JVM - note that SUN JVM uses .jars instead of .cabs.
    Thanks
    rundll32 c:\winnt\system32\msjava.dll,JavaPkgMgr_Install c:\temp\jvue.cab,0,0,0,0,0,0

    For example : If a company of 400,000 people wish to
    use an online software application which uses 3
    applets why burn your bandwidth downloading the same
    applets 400,000 times.. Hence the mass deploy
    solution.Downloading it via a login script already 'burns' bandwidth.
    And if it is set up correctly the applet is only downloaded once, the first time it is used. And after that it is downloaded only when it changes.

  • Help with Deploy javaFx applet to the web, please

    I am new to JavaFx. I have a difficult time to deploy it to the web as an applet. Java console indicates that my jnlp file is not available. Here is what I have done:
    1. In the javaFx project (netbeans project), I put together a small application following the tutorial (app). Run as standard desktop app, it works fine. Run as applet, everything is ok except no images.
    2. In another web project (also netbeans project), I add the javaFx project generated app.jar to the web-inf/lib folder, modify the index.jsp to include a javaFx project generated app.html file and put it at the root of the web application. I also put the favaFx project generated app_browser.jnlp file in the same folder as index.jsp and app.html. Later on also in the web-inf/lib with app.jar. No matter where i put this app.jnlp file, I only see the spinning java logo. Java console states that jnlp is not available.
    this is in my index.jsp: <jsp:include page="app.html" />
    this is in my app.html:
    <h1>app</h1>
    <script src="http://dl.javafx.com/1.2/dtfx.js"></script>
    <script>
    javafx(
    archive: "app.jar",
    code: "com.app.Main",
    name: "app",
    width: 950,
    height: 600
    </script>
    this is in my app.jnlp
    <jnlp spec="1.0+" codebase="http://localhost:8080/app" href="app_browser.jnlp">>
    <information>
    <title>App</title>
    <vendor>Me</vendor>
    <homepage href="http://localhost:8080/app"/>
    <description>My App</description>
    <offline-allowed/>
    <shortcut>
    <desktop/>
    </shortcut>
    </information>
    <resources>
    <j2se version="1.5+"/>
    <extension name="JavaFX Runtime" href="http://dl.javafx.com/1.2/javafx-rt.jnlp"/>
    <jar href="WEB-INF/lib/app.jar" main="true"/>
    <jar href="WEB-INF/lib/commons-lang.jar"/>
    <jar href="WEB-INF/lib/commons-io.jar"/>
    </resources>
    <applet-desc name="app" main-class="com.sun.javafx.runtime.adapter.Applet" width="950" height="600">
    <param name="MainJavaFXScript" value="com.app.Main"/>
    </applet-desc>
    <update check="background">
    </jnlp>
    What did I miss here? Please help so that I can present this app to my boss and we can use javaFx to build our next application. Thank you very much.
    qding

    Welcome to the Sun forums.
    It would be worth checking the deployment launch file (JNLP) using JaNeLA *(<- link).* As the other poster mentioned, the file is invalid (OK - not well-formed, but possibly also invalid after that is fixed). Also, JaNeLA should warn you that the resources in WEB-INF are not accessible.
    Please do not repost(1) questions in future.
    (1) Post a question twice, or more.

  • Re: HELP - ON BROWSER, Applets, JMF & Swings & Plugins  - Applet deployment

    hiiiiii,
    plz send me ur working code of media player in java .i need this for my major project.i m facing problem with media package .
    thnx.

    Oh, I see. IE makes you use the Information Bar:
    IE 6 has an "Informat Bar" that appers at the top of the HTML content.
    When I copy and compile your example in a temporary directory and enter the URL in IE6:
    C:\temp\WelcomeApplet.html
    There is a message:
    TItle: Information Bar
    Did you notice the information Bar?
    The Information Bar alert you when Internet Explorer block a
    pop-up window or file download that might not be safe. If a
    Web page does not display properly, look for the information
    Bar (net the top of your browser)
    [Checkbox] Do not show this message again.
    (link) Learn about the Information Bar
    (button) OK
    I click OK
    and the Information Bar says:
    To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer. Click here for options...
    I click on the Information Bar and a context menu appears:
    Allow Blocked Content...
    What's the Risk?
    Information Bar Help
    I choose Allow Blocked Content...
    Title: Security Warning
    Allow active content such as script and ActiveX controls can be useful,
    but active content might also harm your computer.
    Are you sure you want to let this file run active content?
    Yes/No
    I choose Yes
    It works for me in IE 6

Maybe you are looking for

  • BSODs lock ups and flakey firewire port - help ??

    Okay I'm really getting fustrated over this laptop it's nearly 2 weeks old and I've already had 2 BSODs the odd crash where the mouse moves but nothing else around it works so a forced reboot was needed. Today I had a BSOD all i did was run some unti

  • On iPod Touch, how can I view calendars but not sync them?

    I have thirteen years of calendar events in iCal on my desktop Mac, dating back to year 2000, divided between three calendars. A quite large amount of calendar data, admittedly. I sync to my iPod Touch via iCloud.  Problem is that, if I select "Sync

  • 10.1.1 Didn't save my work despite creating snapshots

    I recently installed Mavericks and FCP 10.1.1 on a fresh drive to test it out on a small work project. Nothing but FCP X 10.1.1 was installed on the drive. It's a Mac Pro 5,1 12 core with 32GB ram. I ran through the Lynda course and went at it. Afrai

  • How to get the current Mailbox size

    Hi, Does anyone know how to get the current size of Mailbox and Archive by using GW api?

  • Can't create an ePrint account

    i can't create an eprint account with my Laserjet Pro 200 m251nw.  When I go to create an account, it showsthat both the email and passworddo not match.  I am operating Windows 7 Home Premium.   I have tried both my personal e-mail and the printer e-