Can I User IO in Applet?

Hi Everybody,
I am new to applet.
Can I user IO or Socket in Applet?
Thanks in Advance

You could not access any of client resources from applet, unless your applet is "SIGNED"
to sign applet you can refere to java tutorial page:
http://java.sun.com/docs/books/tutorial/deployment/jar/signindex.html
Thanks
Ahmad Elsafty

Similar Messages

  • Why can't I make the applet work?

    I have developed an applet to capture the video stream from a Logitech (usb) camera and display it in the applet. This is a clone of another program that captures a network camera video stream and does the same thing.
    I am using JBuilder 2005 and when I run the applet in the JBuilder applet viewer, it works fine, but not when I attempt to run it in the browser.
    In the network camera application, I was able to overcome this by signing the jar file and it would run in the browser.
    In the Logitech application signing the jar file does not work. I get the mesage that asks me if I want to accept the certificate, but it still does not initialize the camera.
    Since I can use it in the Applet Viewer, I have to assume that all the connections are set up OK.
    But the application fails when trying to get the capture device in:
    di = CaptureDeviceManager.getDevice(str2);
    I put the startup code in a thread and perform several iterations with a slight delay, suspecting that there may be a timing issue, but that was not the problem.
    This code also works in a stand-alone application version.
    The only thing I can think of is that there is some other connection or security issue that I am not addressing.
    Since signing the jar file works with network video streams, I have to think that there is something different between USB and network video streams, but I have no clue as to what it might be.
    Anyone have any suggestions?

    from the JMF readme file
    Security Note
    During the installation, you will be asked two security related questions:
    * Permit recording from an applet
    If you agree to this, JMF will allow applets to capture audio and video from the local capture devices. It is possible for a malicious hidden applet on a web page to quietly record sounds or video from your system and transmit the data back to a system on the internet. This is usually a risk only if you visit unfamiliar web sites.
    You can disable or enable this feature by running the JMFRegistry application (or choose Preferences from the JMStudio File menu), modify the setting in the User Settings tab and commit the changes.
    * Permit writing local files from an applet
    This is a greater security risk since a malicious applet can overwrite files on your hard disk without your knowledge. Enable this feature only if you need it for a specific application and are sure that you will not visit any possibly malicious web sites.
    You can disable or enable this feature by running the JMFRegistry application (or choose Preferences from the JMStudio File menu), modify the setting in the User Settings tab and commit the changes.

  • Can I Use Jce in applet

    Hi all,
    Thanks for everybody first if you look at my question and try to help me to find out the problem.
    I need to write a applet which can let people to use
    the jce's des function to encipher the user's password and
    id from the homepage.
    I write a applet already. It work fine as a application.
    But it doesn't work when I run it as a applet. Does the problem come from the security problem because I need
    to Load a sun_jce provider in a clien machine ?
    Can I use JCE in applet ?
    If it is ok to use jce in developing applet do I need to sign the applet before run it in web and which file I need to sign.
    Btw, I use the archive tag in html file to make user get the whole jce jar file. does it Ok.
    Followin is my source code
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import java.security.*;
    import sun.misc.*;
    import java.applet.*;
    import java.awt.*;
    public class DesApplet extends Applet{
         public static void main(String[] arg) throws Exception{
              DesApplet des = new DesApplet();
              des.CallDes();
         public void init(){
              CallDes();
         public void paint(Graphics g){
         public CallDes(){
              Cipher desCipher;
              int i;                              
              try{
                   Security.addProvider(new com.sun.crypto.provider.SunJCE());
                   KeyGenerator keygen = KeyGenerator.getInstance("DES");
                   SecretKey desKey = new SecretKeySpec("11111111".getBytes(),"DES");
                   System.out.println("Hello");
                   desCipher = Cipher.getInstance("DES/ECB/NoPadding");
                   desCipher.init(Cipher.ENCRYPT_MODE,desKey);
                   byte[] cleartext = "00000000".getBytes();
                   String value = convert_int_to_hex(cleartext,8);
                   System.out.println("cleartext is:"+value);
                   byte[] ciphertext = desCipher.doFinal(cleartext);
                   value = convert_int_to_hex(ciphertext,8);
                   System.out.println("ciphertext is:"+value);
                   desCipher.init(Cipher.DECRYPT_MODE,desKey);
                   byte[] cleartext1 = desCipher.doFinal(ciphertext);;
                   value = convert_int_to_hex(cleartext1,8);
                   System.out.println("cleartext1 is:"+value);
              }catch(Exception e){System.err.println(e);}
         public String convert_int_to_hex(byte[] value, int len) {
         int i;
         int j;
         byte tmp;
         byte[] temp = new byte[len*2];
         char[] chars = new char[len*2];
         String result = new String();
         for (i=0; i<len; i++)
         if (value[i] < 0)
         temp[i*2] = (byte)((value[i] & 0xF0) >>> 4);
         temp[i*2+1] = (byte)(value[i] & 0x0F);
         else
         temp[i*2] = (byte)(value[i] / 16);
         temp[i*2+1] = (byte)(value[i] % 16);
         for (i=0; i<len*2; i++)
         if (temp[i] > 9)
         chars[i] = (char)(temp[i] - 10 + 65);
         else
         chars[i] = (char)(temp[i] + 48);
         result = result.concat(result.valueOf(chars));
         return result;

    I have a server and a client.
    Server has jdk1.4. client is an applet. I need to encrypt the username and password that are sent from client to the server.
    I am able to encrypt and decrypt using JCE's DES on server side, since jdk1.4 has JCE provider installed by default. Since the applet may be running on any browser which may not have JCE supported. Is it possible for me to send the JCE jar file along with the applet and somehow enable the client applet to encrypt the user name and password and send to server.
    Thanks a lot,
    Gagan.

  • I have itunes on a mac with 2 users but the library only shows on the main user how can both users have the same library?

    i have itunes on a mac with 2 users but the library only shows on the main user how can both users have the same library?

    Hi,
    Have a Look at these Links on Home Sharing:
    http://support.apple.com/kb/HT4620
    http://support.apple.com/kb/HT3819
    Could be what you need...
    Cheers,

  • A function can not be used in Applet.what's wrong?

    Here is a function.
    private String LoadFile() {
    String input;
    String output="sssssdsdsddf";
    try{
    FileReader f=new FileReader("shu.txt");
    BufferedReader in = new BufferedReader(f);
    while ((input = in.readLine())!= null){output=output+input;}
    in.close();
    }catch(IOException e) {
    System.err.println("Exception caught: " + e.getMessage());
    return output;
    It can be used in Java Application,and work well.but can not be used in Applet,it does not work.what's wrong?

    http://www.javaworld.com/javaworld/jw-12-2000/jw-1215-security.html#sidebar1

  • A function can not be used in Applet.what' wrong?

    Here is a function.
              private String LoadFile() {
    String input;
              String output="sssssdsdsddf";
              try{
              FileReader f=new FileReader("shu.txt");
    BufferedReader in = new BufferedReader(f);
    while ((input = in.readLine())!= null){output=output+input;}
              in.close();
              }catch(IOException e) {   
                   System.err.println("Exception caught: " + e.getMessage());
    return output;
    It can be used in Java Application,and work well.but can not be used in Applet,it does not work.what's wrong?

    Don't you think it would be a bit of a security risk if any applet you downloaded from the web (unknowingly) could read/write to your file system....
    Applets have strict security applied to them, and file i/o is one of the restrictions. There are ways around it, but for the moment I'd suggest you build a bridge and get over it.
    Cheers,
    Radish21

  • In R12, can payroll user enter expense report for employees via web-based?

    Hi,
    In R12, can payroll user enter expense report for employees via web-based screen? Previously in 11i, it can be done via the Expense Report forms.
    Appreciate advise on this.
    Thanks in advance.
    Regards,
    Shiau Chin

    Hi Anne,
    Please see page 42 of the [url http://download.oracle.com/docs/cd/B34956_01/current/acrobat/120oieig.pdf]iExpenses Implementation and Admin Guide for R12 . If you are unable to enter the ID as per the guide, I would suggest raising an Service Request with Oracle Support.
    Cheers, Pete

  • Can two users work on different files of the same project?

    Sorry if this has been asked already...but can two users work
    on different files of the same project? How would that work? Would
    it work something like this?
    1. From RoboHelp 7, user A checks out the entire project.
    2. User A checks in the files they are not working with.
    3. User B checks out the project but can only 'edit' the
    files that have been checked in by user A.
    Is this how the source control works?

    That's the basic idea. User A doesn't actually have to check
    out the whole project, though. RSC will selectively check out only
    the files that are actually getting changed. Both writers will have
    a complete copy of the project on their local machines, but the
    files are read-only until they are literally checked out, which is
    on an as-needed basis unless the writer explicitly checks them out.
    G

  • Can two users on the same Mac sync contacts by using the same Apple ID in the iCloud settings?

    Can two users on the same Mac sync contacts by using the same Apple ID in the iCloud settings?

    Hi Barney,
    That's exactly what I want. I have a personal user and a business user on my MacBook Pro. I want both users to have the same contacts so if I add a contact while I'm logged into my personal user, it will show up when I'm logged into my business user. I want both contacts books to be exactly the same; like you said. So, I used my business user AppleID when I enabled iCloud for my personal user and I enabled iCloud for my business user with that Apple ID as well. For my personal user, I selected Contacts and Calendars to sync with iCloud. For my business user, I selected everything to sync with iCloud. The problem is... it didn't change anything. I restarted my computer to see if that would do anything but nothing happened. I'm not super savvy with Apple products, so maybe I'm completely confused.
    Hi Xeni,
    Thank you for your response, as well.
    KEW

  • I have set up different use accounts on my I mac how can other users share the music stored in my I tunes

    I have set up different user accounts on my I mac how can other users share the music stored in my I tunes

    iTunes: How to share music between different accounts on a single computer

  • Can two users access the same bootcamp (win os) instance?

    We are two users who are using our imac and we both have own user names in mac os. I created a bootcamp partition with windows xp on it. Can both users access the same partition and create their own user spaces within xp?
    Will that work also if we use Parallel or virtual box? (access the same user data as in boot camp?)
    I would like to have the option for each user to access their windows data either through bootcamp or through the virtual tool.
    Message was edited by: gss2
    Message was edited by: gss2

    gss2 wrote:
    What do you mean Virtual box it will not run on its own partition? I have a virtual box running on my desktop and it runs just fine ...own partition?? I don't understand.
    Running on its own partition means that the installed OS has its own formatted portion (partition) of the hard drive. A virtual machine does not have its own partition. It creates a virtual partition (a file on the computer) that simulates a file system (partition). So Virtual Box, or any other virtualization software, does not run Windows, or any other OS in its own partition.

  • How can 2 user edit 1 word document at the same time

    hi,
    in office 2013 professional plus, can 2 user edit 1 word document at the same time?

    Hi,
    As far as I know, multiple users can not edit Word file in the same time directly. Could you give me your demand?
    Please check the two follows workarounds if they are helpful:
    http://blogs.msdn.com/b/johnmullinax/archive/2010/04/19/co-authoring-how-two-people-can-edit-one-word-2010-doc-at-the-same-time.aspx?Redirected=true
    http://www.ehow.com/how_7229904_allow-word-document-same-time.html
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Regards,
    George Zhao
    TechNet Community Support
    Hi
    thank you; its worked.
    I'm so excited about this; thank you again.

  • How can two users work on iMovie?  My husband is working on a memorial video for a family member who passed, I plan to edit but he had to take his computer to work.  I have the iMovie project on a zip drive.  How do I get it to open in my imovie?

    How can two users work on iMovie?  My husband is working on a memorial video for a family member who passed, I plan to edit but he had to take his computer to work.  I have the iMovie project on a zip drive.  How do I get it to open in my imovie? 

    You will need an external drive that is formatted as MAC OS EXTENDED (journaled).
    Move the Project, Events, and any photos and music to the external drive by following the instructions in this post.
    https://discussions.apple.com/docs/DOC-4141
    Be sure to use CONSOLIDATE MEDIA to get the photos and music. Then plug this drive into your computer and you will be able to edit.

  • If I install the Mail server on a Mac Mini as a server, can my users utilize Outlook as their mail client and how will it be different for them?

    If I install the Mail server on a Mac Mini as a server, can my users utilize Outlook as their mail client and how will it be different for them?

    Your users can utilize Outlook no matter where your email is hosted at.
    how will it be different for them
    different from what?

  • In an iPhone 3GS (or 4G), can a user configure the WiFi power-save to extend battery life?

    In an iPhone 3GS (or 4G when I upgrade), can a user configure the WiFi power-save operation to extend the battery life?  For example:  Can a user turn on/off WiFi power-save operation?  Can a user specify WiFi sleep duration?  Thanks in advance for any helpful advice.

    Yikes!   Thanks, Templeton.  Do WiFi app programmers have control over power-save settings?  For example, can a first VoIP app be more energy-efficient than a second VoIP app?

Maybe you are looking for

  • Strange problem with cropping a PDF

    Hello, I am having an issue with cropping PDFs. I have tried various versions of Acrobat as well as an application called Nitro PDF Professional. Here is the situation. I can crop the PDF without any problem but the file size remains just about the s

  • HT204350 blank screen on MacBook Pro after transferring data from iMac

    I have transferred the data from my home iMac to my MacBook Pro. Once completed, my MacBook screen has appeared blank. Even when I have turned it on and off the same result happens.

  • Best HD Cam

    Hello. I am currently using a Canon GL1 to film events. I am looking to upgrade to an HD video cam. Can anyone offer any guidance on a reasonably priced, professional quality HD cam that is compatible with Mac?

  • Macbook pro shuts down on stuartup

    I have an older (2008) Macbook Pro, apart from being slow to respond these days it otherwise works fine until yesterday.  When ON button pushed it immediately shuts down.  There is a half-second cd-drive sound like normal startup sequence but then a

  • What to do with extra itunes folder after transfer

    I just tranferred my itunes library from my old pc to my new mac using my ipod as a hard drive. I followed the directions apple gives on it's website (http://docs.info.apple.com/article.html?artnum=300173). I already had a bit of music on my new comp