Cant figure out whats wrong with my applet, help pls??

this applet checks a string against one in a database then if passwords match, a new url is opened. the applet loads in webpage with no problems. it just doesnt seem to work. have granted full access to code base in policy file.
heres the code:
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.applet.*;
import java.sql.*;
import java.net.*;
public class LoginApplet extends Applet implements ActionListener
    Panel top;
    Panel bottom;
    TextField nameField;
    TextField passField;
    Label userNameLabel;
    Label passwordLabel;
    Button loginButton;
    public void init()
        setSize(230,200);
        setBackground(Color.white);
        // Create panels, labels, and text fields
        top                = new Panel(new FlowLayout(FlowLayout.LEFT));
        bottom                = new Panel(new FlowLayout(FlowLayout.LEFT));
        nameField           = new TextField(15);
        passField           = new TextField(15);
        userNameLabel      = new Label("User Name:", Label.LEFT);
        passwordLabel      = new Label("Password:   ", Label.LEFT);
        loginButton          = new Button("Login:");
        loginButton.addActionListener(this);
        // Mask the input so that people looking over your shoulder
        // won't be able to see the password
        passField.setEchoChar('*');
        // Add items to their panels
        top.add(userNameLabel);
        top.add(nameField);
        top.add(passwordLabel);
        top.add(passField);
        bottom.add(loginButton);
        // Set the applet layout
        setLayout(new GridLayout(3,3));
        // Add the panels to the applet (skip this
        // part and you won't see the panels on screen)
        add(top);
        add(bottom);
    public void actionPerformed(ActionEvent e)
               String name      = nameField.getText();
               String pass      = passField.getText();
               try
                    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                    // set this to a MS Access DB
                    String filename = "e:/iain/College/Y4/SWP/Program/website/database/loginDetails.mdb";
                    String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
                    database+= filename.trim() + ";DriverID=22;READONLY=true}"; // add on to the end
                    // now we can get the connection from the DriverManager
                    Connection con = DriverManager.getConnection( database ,"","");
                    Statement s = con.createStatement();
                    s.execute(" SELECT [password] FROM logindetails WHERE [username] = '" + name + "' "); // select the data from the table
                    ResultSet rs = s.getResultSet(); // get any ResultSet that came from our query
                    if (rs != null) // if rs == null, then there is no ResultSet to view
                         while ( rs.next() ) // this will step through our data row-by-row
                              String passtmp = "";
                              passtmp = passtmp + rs.getString(1);
                              if(passtmp.equals(pass))
                                   String url = "E:/iain/College/Y4/SWP/Program/website";
                                   Runtime rt = Runtime.getRuntime();
                                   String[] callAndArgs = {"\"C:\\Program Files\\Internet Explorer\\iexplore.exe\"", url };
                                   try
                                        Process child = rt.exec(callAndArgs);
                                        nameField.setText("");
                                        passField.setText("");
                                   catch (Exception eee)
                                        eee.printStackTrace(System.err);
                              else
                                   System.out.println("Invalid Password " +name);
                              s.close(); // close the Statement to let the database know we're done with it
                             con.close(); // close the Connection to let the database know we're done with it
               catch (Exception ee)
                    System.out.println("Error: " + ee);
}

this is the initial error, when applet is run:
java.security.policy: error adding Entry:
java.net.MalformedURLException: unknown
unknown protocol: eI don't know where that's from that code, but e isn't a protocol. If it's a file, you should append "file:///" to the full path.
then when trying to read from db:
Error: java.security.AccessControlException: access
denied (java.lang.RuntimePer
mission accessClassInPackage.sun.jdbc.odbc)
didnt think of running it through applet viewer.
the whole thing will be running on the same server
using IIS over a LANYou don't connect to a local file system thru an applet without a signed applet. Period.

Similar Messages

  • I cant figure out whats wrong with my flash player

    I am trying to watch a tv show on cwtv.com...it is not working. it starts off showing me the logo and the cw song but when it is time for the show to play it will  not play..I have a windows 8
    Verify if Flash Player is installed
    If you see clouds moving in the animation below, congratulations, you have successfully installed Flash Player!
    I can see the clouds moving, so I know it is installed right

    "Green screen"
    99.9% of the time.. corrupted video drivers are the cause.
    Update them from the manufacturer, NOT Windows Update.
    Installed video drivers may not always support the functionality of the latest Flash Player.  If Flash Player does not function correctly, updating the video drivers to the latest available version is one of the first steps to try.  Below are instructions how to update the video drivers on Windows systems.
    identify the manufacturer and type of your video card
    open Device Manager: Start | Run | enter devmgmt.msc
    open the Display Adapters drop-down; this will show you the installed video card:
    identify the device driver version
    right-click on your display adapter entry and select Properties
    click on the Driver tab; this will show you the driver version and date:
    go to the device manufacturer's support site and download the latest driver
    NVIDIA cards: NVIDIA driver download page, or auto-detect
    ATI cards: ATI driver download page, or auto-detect
    Intel cards: Intel driver download page, or auto-detect
    Matrox cards: Matrox driver download page
    VIA cards: VIA Arena driver download page (redirects to 3rd-party download site)
    SiS cards: SiS driver download page, or auto-detect
    S3 cards: S3 driver download page, or auto-detect (option 2 on the download page)
    follow the instructions on the manufacturer's support site
    Note: some of the auto-detect utilities linked above will only run on Internet Explorer.

  • Can't figure out whats wrong with this IF statement

    Hey.
    I must be tired cause I just can't figure out why this IF statement doesn't work. It's probably something silly but please help me get it right. The user is prompted with a form (textfield) and I'm gonna check if its the right password (this is not the reason im doing this but it works good for this example).
    if(displayable == form){
              String correctPassword = "abcd";
              System.out.println("Input: " + textfield.getString());
              System.out.println("Correct: " + correctPassword);
              if(textfield.getString() == correctPassword) {
                   System.out.println("Password is correct");
                   Display.getDisplay(this).setCurrent(mList);
              else {
                   System.out.println("Wrong password");
                   destroyApp(true);
                   notifyDestroyed();
    }Even though i enter the correct password, it still thinks it is incorrect. This is how the WTK compiler outputs the above statement.
    Input: abcd
    Correct: abcd
    Wrong passwordObviously the passwords DO match, so what am I doing wrong?

    The == comparison operator returns true for equal primitives OR for variable references to the same object.
    Classes (usually) override the .equals (Object obj) method inherited from Object to return true when objects of the class are essentially equivalent.
    Run this java code segment and try to understand the output.String aStr = "A string";
    String bStr = aStr;
    if (aStr == bStr) System.out.println ("== true");
    else System.out.println("== false");
    if (aStr.equals (bStr)) System.out.println (".equals true");
    else System.out.println(".equals false");
    System.out.println();
    bStr = new String ("A string");
    if (aStr == bStr) System.out.println ("== true");
    else System.out.println("== false");
    if (aStr.equals (bStr)) System.out.println (".equals true");
    else System.out.println(".equals false");
    System.out.println();
    bStr = new String ("Some String");
    if (aStr == bStr) System.out.println ("== true");
    else System.out.println("== false");
    if (aStr.equals (bStr)) System.out.println (".equals true");
    else System.out.println(".equals false");Ask again if it's not clear enough. But first, read the API for Object.equals (Object obj) to understand the contract of .equals (...)
    db

  • My sound is fine but my mic isnt working. how do i fix or figure out whats wrong with it

    Title says it. I just did a clean wipe on my computer and now my mic isnt working on vent or skype, i dont know what is wrong with it.  When i go to my sound hardware it says my external mic, IDT high def audio codec is enabled..

    Same thing here. Must be update related. Who knows. Tried to go into ventrilo today and nada. Can hear people fine, microphone not picking. In my devices it says my Anvex Virtual Audio is "not available", same with the "IDT High Definition Audio Codec. Now I'm starting to get a little agitated. No diagnostics have come back with a ping on the issue. All settings seem fine. I HAVE AUDIO, as in my speakers are working so **bleep**.
     I'm lost. No clue how to fix it. Guess I'm no longer raiding and that if this isn't working I'm going to go buy a Dell and rage beat this piece of **bleep** in the yard. That's right. I am taking 3 years of continual frustration out with HP errors, Vista complications and overall disatisfaction.
     If you can fix this problem I will offer you pictures of fluffy kittens and circus acrobats/contortionists. Now fix my ventrilo. lol

  • I have a samsung intensity ll.How do i get rid of a small box with AA off of my main screen?Cant figure out what setting it is.

    How do i get rid of a small box with AA in it on my main screen? cant figure out what setting it is on my samsung intensity ll ?

    Good deal      (the AA stands for Auto Answer, by the way; and I like your avatar  )

  • I cant figure out what my user icon is a picture of!!!

    i just reinstalled tiger and i cant figure out what my new icon is a picture of. Any suggestions?
    http://i112.photobucket.com/albums/n183/xxxSinkEmFastxxx/Picture2-3.png

    All user pictures are located in /Library/User Pictures/. Figuring out which is which, is left as an exercise. More than likely, a flower or nature thingy. They'll all open in Preview.

  • HT1414 In updating my iTunes,I got a message "Service Apple Mobile Device failed to start. verify that you have sufficent priviliges to start system services". Cant figure out what to do

    In updating my iTunes,I got a message "Service Apple Mobile Device failed to start. verify that you have sufficent priviliges to start system services". Cant figure out what to do

    So many people are having this problem! Doehunter's instructions here worked for me!  Hope this helps. https://discussions.apple.com/message/23824640#23824640

  • I connected to itunes and it says i have 2.11 GB of space taken up under OTHER , i cant figure out what is taking up so much space can anyone help?

    i connected to itunes and it says i have 2.11 GB of space taken up under OTHER , i cant figure out what is taking up so much space can anyone help?

    I believe the new IOS 8 system takes up 1.3 Gb on it's own.   Then plus anything else you may have loaded.

  • Hi. I cant figure out, what I will get in the creative cloud.

    Hi. I cant figure out, what I will get in the creative cloud. ?? Do I get it all ?? if not wich programs are in it. ? I hope, i can get an answar fast :-)

    Cloud Plans https://creative.adobe.com/plans
    -Special Photography Plan includes Photoshop & Lightroom & Bridge & Mobile Lightroom
    -Special Photography Plan includes 2Gig of Cloud storage (not the 20Gig of the full plan)
    -http://helpx.adobe.com/creative-cloud/faq/mobileapps.html
    -http://helpx.adobe.com/photoshop/kb/differences-photoshop-creative-cloud-photography.html
    -and subscription terms http://www.adobe.com/misc/subscription_terms.html
    -what is in the entire Cloud http://www.adobe.com/creativecloud/catalog/desktop.html
    -http://www.adobe.com/products/catalog/mobile._sl_id-contentfilter_sl_catalog_sl_mobiledevi ces.html

  • HT201304 my i phone says its disabled until i die just jokes but for a long time and i cant figure out what to do its my phone

    my i phone says its disabled until i die just jokes but for a long time and i cant figure out what to do its my phone

    Follow the instructions in this support document for a disabled iPhone. iOS: Forgot passcode or device disabled

  • Once I downloaded the new IOS 5.0 I've lost all of my photos that were stored on my PC, and I no longer have access to them on the IPOD.  Cannot figure out what has happened.  Please help.

    Once I downloaded the new IOS 5.0 I've lost all of my photos that were stored on my PC, and I no longer have access to them on the IPOD.  Cannot figure out what has happened.  Please help.

    Thanks lllaass, but I am not computer literate and do not understand exactly what it is I am supposed to do.  All of my photos were stored on Microsoft Windows Live Photo Gallery.  When I now access the gallery the only thing that is there are the folders with the title of the folders.  The pictures that were in those folders are now gone. I can no longer access them on my IPOD either.  My photo library on my IPOD is now empty. 
    Thanks again for your help.

  • My email keeps signing out whats wrong with my email.

    Whenever i do something my macbook freezes and the wheel of death appears. Whats wrong with my computer.

    Same thing here. Must be update related. Who knows. Tried to go into ventrilo today and nada. Can hear people fine, microphone not picking. In my devices it says my Anvex Virtual Audio is "not available", same with the "IDT High Definition Audio Codec. Now I'm starting to get a little agitated. No diagnostics have come back with a ping on the issue. All settings seem fine. I HAVE AUDIO, as in my speakers are working so **bleep**.
     I'm lost. No clue how to fix it. Guess I'm no longer raiding and that if this isn't working I'm going to go buy a Dell and rage beat this piece of **bleep** in the yard. That's right. I am taking 3 years of continual frustration out with HP errors, Vista complications and overall disatisfaction.
     If you can fix this problem I will offer you pictures of fluffy kittens and circus acrobats/contortionists. Now fix my ventrilo. lol

  • My pages documents on my ipad wont sync to icloud. Some documents have had the upload icon on them for over a month. It was all working fine but now I cant figure out what is going on.

    MY pages documents on my ipad wont sync to icloud. Some of the documents have had the upload icon on them for over a month. It was all working fine a month or so ago but I cant figure out why it wont work now.

    Why start a new and very similar thread to your other one which you have not responded to (have you read the replies?)
    I suggest that no response is made to this duplicate thread. 

  • My ipod touch is disabled, i installed the latest version of itunes, but cant figure out how to restore, can anyone help with this?

    My ipod touch is disabled, i installed the latest version of itunes, but cant figure out how to restore the ipod, can anyone help?

    If you run into the "another installation" message even after the reboot of the PC (which is an excellent idea by HTP ProXy), reregistering your Windows Installer Service is worth a try.
    First, launch a command prompt as an administrator. In your Start search, type cmd then right-click on the cmd that comes up and select "Run as administrator".
    At the command prompt:
    Type %windir%\system32\msiexec.exe /unregister and hit enter.
    Type %windir%\syswow64\msiexec.exe /unregister and hit enter.
    Type %windir%\system32\msiexec.exe /regserver and hit enter.
    Type %windir%\syswow64\msiexec.exe /regserver and hit enter.
    Restart the PC and try another reinstalll.

  • Cant figure out what my keychain password is.

    Hey,
    I didn't set up this computer and I need to figure out what my keychain password is. Every thing finder help tells me to do already requires it.
    Any ideas?
    G5 Dual 1.8   Mac OS X (10.3.9)  

    Hi Justin,
    Changing your keychain password
    You can change the password for your keychain at any time. However, if you want your default keychain to be unlocked automatically when you log in, make sure your keychain password is the same as your Mac OS X login password.
    If your Mac OS X login password is not the same as your default keychain password, you'll be asked for the password whenever an application needs access to your keychain and your keychain is locked.
    Open Keychain Access and select the keychain in the drawer (click Show Keychains if the drawer is closed).
    Choose Edit > "Change Password for Keychain 'login'." (The name of the keychain in the menu matches the name of the selected keychain. If you selected the keychain that unlocks when you log in, the name you see is "login.")
    If the keychain is locked, type the password to unlock it.
    Type the current password for this keychain.
    Type a new password, then type it again to verify.
    Click OK.
    You can use Password Assistant to help you choose a new password. Click the "i" button to see how secure your new password is.
    from keychain access help searched "password for keychain access"
    hope it helps you, Eme

Maybe you are looking for

  • Source tables for forms and tabular forms must have a primary key.

    Why does HTML DB 2.0 return the message "Source tables for forms and tabular forms must have a primary key." when trying to generate a "Report and Form" page based on a view defined like "create view <applicationschema>.a as select * from <sourcesche

  • Golden gate installation

    hi frenz... I'm trying to install golden gate on oracle 11g but when i try to run the script @/oradata/gg/marker_setup.sql it asks for golden gate schema.. after entering schema name the command prompt does'nt show anything plzz tell me wheres the pr

  • No warning before moving the ~/Library folder...

    OSX 10.7.3 on Macbook Air 13.3' i5 1.7Ghz 128GB. Yesterday I was working on a Finder window opened on my ~/Library. As I accidentally dragged the icon displayed in the Title area, the OS lost my user settings... I quickly realized that my action caus

  • Enhance DetailStrategyR3PI on R/3 internetsales

    Hi I wish to pass some custom data  to the standard FM ISA_SHIPTOS_OF_SOLDTO_GET. This is on R/3 ISA , I wish to enhance the class DetailStrategyR3PI where we have the method readShipTosFromR3() fetches the shiptos. I dont see the reference of the cl

  • Unexpected error when I click on Unpropose answer

    Hi, I'm generally write on SQL Server forums. When I try to Unpropose an answer respect to a my thread I receive an unexpected error. Is it possible to solve this issue, please? Thanks