About applet lock

Hi,
I have written the code for an applet file. I'd like to do something or put a password on the file that the code wouldn't be accessable, I mean that if I send the file to somebody and he wants to see the HTML file, he can't see the codes (confidential) .
Thanks
Mohammadreza

Hi,
I have written the code for an applet file. I'd like
to do something or put a password on the file that
the code wouldn't be accessable, I mean that if I
send the file to somebody and he wants to see the
HTML file, he can't see the codes (confidential) .
Thanks
MohammadrezaYou mean the Applet code? Because forget about hiding the html. The source code for the Applet is only visible if you make it so. The class, however, is downloaded to the users machine and can be deciphered by those who really want to.
Why is this so important to you?
~Bill

Similar Messages

  • About applets and secure connection

    Hello. I've read some threads but I can't understand a thing about applets and SSL.
    I've a signed applet. This applets is embedded with applet tag in a jsp page.
    The applet works as a file uploader.
    With signing, the applet can access to the user file system without problem, open a connection with the server and upload files.
    Now, If I want to use HttpsUrlConnection instead of the standard http connection, what certificate does the applet use for handshake? Does the applet automatically use the same certificate used for signing?
    Thank you

    Hello. I've read some threads but I can't understand a thing about applets and SSL.
    I've a signed applet. This applets is embedded with applet tag in a jsp page.
    The applet works as a file uploader.
    With signing, the applet can access to the user file system without problem, open a connection with the server and upload files.
    Now, If I want to use HttpsUrlConnection instead of the standard http connection, what certificate does the applet use for handshake? Does the applet automatically use the same certificate used for signing?
    Thank you

  • About pessimistick lock in Oracle

    Hello,
    I have some questions about pessimistick lock in Oracle:
    I know if i do a SELECT..FOR UPDATE statement, those records are locked, and just me can opperate on them.. but me - WHO? How i'm identified in Oracle? If i do a SELECT..FOR UPDATE select in an A procedure, then i call the update procedure B, how can i know that both calls belongs to the same user? If someone tries to update the same records, how the server knows if that person is allowed to make those updates or not? because everyone uses the same connection string.. isn't it?
    Probably it works if i make a SELECT..FOR UPDATE and i make the effective update in that procedure, but this means that the Business Logic is in that procedure..
    Please correct me if i'm wrong somewhere and clarify me.
    Thanks!

    By default the other session has to wait (no error message):
    From SQL Reference SELECT section: http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10002.htm#SQLRF01702
    >
    NOWAIT | WAIT
    The NOWAIT and WAIT clauses let you tell the database how to proceed if the SELECT statement attempts to lock a row that is locked by another user.
    Specify NOWAIT to return control to you immediately if a lock exists.
    Specify WAIT to instruct the database to wait integer seconds for the row to become available and then return control to you.
    If you specify neither WAIT nor NOWAIT, then the database waits until the row is available and then returns the results of the SELECT statement.
    >
    Edited by: P. Forstmann on 7 janv. 2010 09:00
    Edited by: P. Forstmann on 7 janv. 2010 09:01

  • Is this producer-consumer scenario safe about dead-lock?

    Hi friends!
    I'm developing an application with a producer-consumer scenario. It produces a dead-lock 10% of times approx I execute it . I think the real reason of the crashing resides on the concurrency, because executing only the following code it gets the "main" waiting blocked during its execution after looping the do{...}while(true) sometimes. I've developed this code:
    public class CubbyHole
        private int nFinishedThreads;
        private int nTotalThreads;
        public CubbyHole(int TotalThreads)
            this.nTotalThreads = nTotalThreads;
            this.nFinishedThreads = 0;
        public synchronized void put()
            this.nFinishedThreads++;
        public synchronized void get()
            while(nFinishedThreads < nTotalThreads)
                try
                    wait();
                catch(InterruptedException ie){}
            notifyAll();
    //import java.util.Random;
    public class Producer implements Runnable
        private CubbyHole container;
        public Producer(CubbyHole container)
            this.container = container;
        public void run()
            System.out.println(Thread.currentThread().getName() + " has begun");
            try{
                Random rand = new Random();
                Thread.sleep(Math.abs(rand.nextInt()*10));
            catch(InterruptedException ie){}
            System.out.println(Thread.currentThread().getName() + " has finished");
            container.put();
    public class Consumer implements Runnable
        private CubbyHole container;
        public Consumer(CubbyHole container)
            this.container = container;      
        public void run()
            System.out.println(Thread.currentThread().getName() + "is waiting for all threads to be finished");
            container.get();
            System.out.println(Thread.currentThread().getName() + "says all threads have finished");
    public class Application
        public static void main(String Args[])
            do{
                int nThreads = 2;
                CubbyHole container = new CubbyHole(nThreads);
                Thread[] ProducersArray = new Thread[nThreads];
                for(int i=0; i<nThreads; i++)
                    ProducersArray=
    new Thread(
    new Producer(container));
    ProducersArray[i].start();
    Thread finalWait = new Thread( new Consumer(container));
    finalWait.start();
    try
    finalWait.join();
    catch(InterruptedException ie){}
    System.out.println("Application has finished correctly");
    while(true);
    Please, execute it and give me your results: is the "main" waiting blocked to you?
    Is this producer-consumer code safe about dead-lock?
    If the answer is no... Why is it waiting blocked?
    Thank you in advance.
    P.D. I'm spanish, so my english is horrible! I'm sorry!

    Thanks ejp:
    Moreover, I suppose nothing happens if I write notifyAll() in both methods, put() and get(). In fact this matters only if the producer overwrites the memory space where data is stored, which is not my case.
    Is this so?

  • Confusion about applet

    sir
    i have confusion about applet that if an applet compile successfully but on running it shows a exception message about "main"that no such method exist.help me out please

    The full text of the error message would make it easier for us to see what is wrong BUT it sounds like you are trying to run the Applet as an applicaiton from the comand line rather than through an HTML tag in an HTML page loaded into your browser!
    Though you can make Applets run as applications it not normal to do so.

  • My ex had set up a dual apple id, which i didn't know about. deleting locked items.

    does this mean that every timed I synced my device he received all my stuff/ photos and things from the last year? I am concerned.
    Also does it mean that he has a copy on his icloud? I had renamed my computer but his id was still there, so when I added mine it looked like
    it had deleted his but somehow it didn't. I only realised when my contacts book on my mac book had his new gf number in it, which couldn't have gotten
    there any other way. Also everytime I went to open address book in user settings it went to his page and at the top it said 'me'. I tried to change all the setting and stuff but figured it was just easier to set up a new user id and delete his, not sure if that was correct. Anyways I have now set up my new user id, made myself the admin and deleted his user id. however, i had moved my files from his to mine via the shared folder and then deleted the shared folder. Now I am wanting to deleted his folder from my trash but it wont. Its saying that there are 83,000 something files and it is taking an eternity, and or just stops.. I tried to delete the locked files other ways but it says i don't have permission. i contacted him and asked that he delete my files if he has them but he has not responded as yet... can someone please help me to understand how this happened or if it even did is there a way that it did? It seems like a huge breach of privacy and I am not happy about it!!!!!
    any help would be really really appreciated.

    Is this your machine or the company's?  Machines that came with Snow Leopard or earlier installed come with system and software install disks that can be used to reisntall the iApps that came with the machine orignally. 
    If this is your machine and it came with Snow Leopard or earlier installed the disk will look slimialr to one of these:
    If it is the company's machine see if they have the disks.
    Do a custom install and then use Software Update to update iPhoto to the highest version that is available.

  • Question about Table Locks

    Hi All,
    Is there any Oracle defined table/place from where we can know the details about Tables that have been locked in the current session?
    Thank you.

    Hi ,
    To know which all objects are locked, you can use the below query :-
    COLUMN owner FORMAT A20
    COLUMN username FORMAT A20
    COLUMN object_owner FORMAT A20
    COLUMN object_name FORMAT A30
    COLUMN locked_mode FORMAT A15
    SELECT b.session_id AS sid,
           NVL(b.oracle_username, '(oracle)') AS username,
           a.owner AS object_owner,
           a.object_name,
           Decode(b.locked_mode, 0, 'None',
                                 1, 'Null (NULL)',
                                 2, 'Row-S (SS)',
                                 3, 'Row-X (SX)',
                                 4, 'Share (S)',
                                 5, 'S/Row-X (SSX)',
                                 6, 'Exclusive (X)',
                                 b.locked_mode) locked_mode,
           b.os_user_name
    FROM   dba_objects a,
           v$locked_object b
    WHERE  a.object_id = b.object_id
    ORDER BY 1, 2, 3, 4;Anand

  • Security permissions question about Applets

    Hello all.
    I'm wanting to make an address book on my server, so I need to have it write to a file. I've read a bunch about it, and still can't figure it out.
    I'm not exactly sure what the java home is supposed to be. I created a java.policy file in /usr/lib/j2sdk1.5-sun (I'm on Linux), but I think it might belong in /usr/lib/j2sdk1.5-sun/jre or /usr/lib/j2sdk1.5-sun/jre/lib/security
    I'm also not exactly what the java.policy file is supposed to contain. Currently, it is:
    grant codeBase "file:/home/scott/public_html/address_book/old/*" {
            permission java.io.FilePermission "/home/scott/public_html/address_book/old/Test.txt", "write";
    };Anyone want to help?
    Scott Howard

    I'm wanting to make an address book on my server, so I need to have it write to a file.Well, applets run on the client - the browser which downloaded the class files - and therefore cannot access files on the server without some type of networking.
    Caveat - the client and server are the same physical machine.
    Solution - have your applet communicate back to the server it originates from. No policy twiddling is needed, as this is an automatic permission.

  • Question about Applet Securities / Permissions

    Hi,
    I'm about to begin work on a program that will utilize GData API to communicate with Google Calendars. I was wondering if this is going to be allowed in an applet, or if I would have to create it as a Java Application.
    I was looking at: http://java.sun.com/docs/books/tutorial/deployment/applet/security.html
    where it says "It cannot make network connections except to the host that it came from."
    I was wondering if that means I wouldn't be able to use to GData API to retrieve/create events in a Google Calendar.
    Thank you,
    Christopher

    Welcome to the Sun forums.
    elwell.christopher wrote:
    I was wondering if that means I wouldn't be able to use to GData API to retrieve/create events in a Google Calendar.Cool. Be sure to report the results of your experiment to test that. I'm sure others will be interested. And of course, feel free to drop back by if you have a question.

  • Doubts about applet triggering

    Hello guys,
    I was wondering, when I have my applet assigned to be triggered by a EVENT_UNFORMATTED_SMS_PP_ENV or even a EVENT_FORMATTED_SMS_PP_ENV, I mean, the applet being triggered by a SMS-PP message, what happens when I send two consecutive messages, i.e., when I send the second message and the applet is still processing the first one, what happens to the second message? is it lost by the ME or it is kept in some sort of buffer and re-sent to the applet when the applet finishes the process?
    As there are no threads on Java Card so both messages can't be processed at the same time...
    Thank you,
    Helri

    This is too broad a question.
    Toad can fire random sql.
    sql*plus can fire random sql.
    Why would Toad be the problem?
    You would need to gather statspack data to demonstrate this.
    Sybrand,
    Agreed on it and its a relevant point.But I guess he is not worried about the db performance.Anyways lets see what OP says.
    Inner join and left join will always use CBO (Cost Based Optimizer) instead of RBO.
    I am not sure that I have read that anywhere. They came into Oracle in 9i where optimizer mode was choose as the default one. Just by the syntax, oracle would push them to use CBO as the default one,I am not sure about this. Even if we are having + symbol and have the stats,Oracle wold go for CBO right?Can you please point me to some where in the docs where it is mentioned that using this keywords,Oracle would use only CBO?
    Aman....

  • Magic Number - Not about applets...

    This is a pretty silly question, but here goes.
    I am using a code checker to verify the style of the code I am writing and I am getting a number of warnings that 'n' is a magic number. I realize why Java uses magic numbers for Applets and such.
    I guess my question has to do with good programming practice. Is my cheker essentially saying that this hard-coded number should be preferrably set-up as a constant number somewhere in my system?
    I'd appreciate your thoughts.

    Yes, I guess so.
    Of course I don't know what code checker you're using, but in general a magic number in this context means that you're using an unexplained number.
    For instance, if you're using a for-loop that loops 20 times, and you're putting '20' in the loop itself (like: for (int j = 0; j < 20; j++) { ... }), it's a magic number. There's is no explanation offered why it's 20, so it's 'magic'.
    A better way to do this would be to define a static final int NUMBER_OF_LOOPS = 20 at some point in your code, preferrably with a short explanation about what it is and why it's 20 (and not 30) and then use that in your code.
    All numbers except 0 and 1 are considered 'magical' when unexplained.

  • Learning about applets

    Some help with the following problem would be most welcome. I would like to put some Duke stars up, but for some reason I do not have any.
    I am following the tutorials in Liang Introduction to Java Programming, Seventh Edition, and have just started on chapter 17, Applets and Multimedia. Although I have copied the first example as given in the book, it does not work. The browser gives me the message "Error. Click for Details." Clicking yields another error message: "The application failed to run. Click 'details' for more information." This time clicking the button, [details], opens a window containing the following:
    Java Plug-in 1.6.0_17
    Using JRE version 1.6.0_17-b04-248-10M3025 Java HotSpot(TM) Client VM
    User home directory = /Users/benjamin
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    l:   dump classloader list
    m:   print memory usage
    o:   trigger logging
    p:   reload proxy configuration
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment properties
    t:   dump thread list
    v:   dump thread stack
    x:   clear classloader cache
    0-5: set trace level to <n>
    ---------------------------------------------------- This is not helpful. I do not know what to do with this.
    The code that does not run is copied from the book (the package name is added by NetBeans), as follows:
    package learningapplets;
    import javax.swing.*;
    public class WelcomeApplet extends JApplet {
        public WelcomeApplet() {
        @Override
        public void init() {
            add(new JLabel("Welcome to Java", JLabel.CENTER));
    }The html page is:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Welcome Java Applet</title>
      </head>
      <body>
          <applet code = "WelcomeApplet.class"
              width = 350
              height = 200 >
          </applet>
      </body>
    </html>I am working on a MacBook Pro Notebook, and using NetBeans IDE, and fetching the html file with Firefox.
    file:///Users/benjamin/NetBeansProjects/LearningApplets/build/classes/learningapplets/WelcomeApplet.html
    The class file is in the same directory.
    I have tried cleaning and recompiling. Java is enabled on this browser. I have tried making xhtml markup, with no change in the outcome. I have tried Safari and Opera with the same results.
    I have tried replacing the <applet> tags with <object> tags, but this is worse; the browsers do not see anything at all.
    Edited by: Equitus on Feb 25, 2010 7:21 PM
    Edited by: Equitus on Feb 25, 2010 7:39 PM

    Equitus wrote:
    ..I had already tried using the valid markup, as follows: I'm glad you know about validation. It is a pity that ..
    ..This did not help, even though it is the markup used by the author from his site:
    http://www.cs.armstrong.edu/liang/intro7e/book/WelcomeApplet.html
    ..this author apparently has no clue. [http://validator.w3.org/check?uri=http%3A%2F%2Fwww.cs.armstrong.edu%2Fliang%2Fintro7e%2Fbook%2FWelcomeApplet.html&charset=(detect+automatically)&doctype=Inline&group=0].
    The author of that mess was apparently using a class that is not in a package. (My UA was able to guess what the author meant, and load that applet despite that rubbish pretending to be HTML).
    Also, adding the package name to the code property did not help.
    code="learningapplets.WelcomeApplet.class"
    I am not just making random guesses when I give you advice on applets. I have considerable experience with developing & deploying applets.
    And removing the .class made the situation worse. The browser did not see anything. There was not even an error message if .class was omitted.Did you try moving the packaged applet class to a subdirectory as I suggested?
    Also, you seemed to make a comment that implied you thought that if "Netbeans did it, then it must be right".
    Give up those fallacies right now.
    Netbeans is a powerful tool, but in the hands of someone that does not understand the underlying principles, it can make life a lot more complicated.

  • Something about applet and database?

    applet cant write and read from outer files.
    but can it read from database?if i don't modify my security policies.

    zhangv,
    We hava a web application with an applet in it that communicates with the server over HTTP. So, you need not worry about security. We use a multi-tiered environment. That is, the middle layer uses an application server (Sybase EAServer) and the backend layer is our database (Sybase ASE 12.5). Our application server fetches the data from the database and streams XML to the applet via a servlet. You can find a wonderful example for how this works in an article on Java world, entitled:
    Title: "A J2EE presentation pattern: Applets with servlets and XML"
    Subtitle: "Enhance your Web interfaces with powerful XML-configured applet components"
    http://www.javaworld.com/javaworld/jw-05-2002/jw-0524-j2ee.html
    Hope this helps
    TJJ

  • Chat Applet locks up when connected to a server

    Hey, I am making a chat applet to reach out to IRC like servers. The problem I'm having is when it connects the program locks up till the server disconnect, then it prints the spool into my JTextArea.
    Now, and more bazaar, is that I cannot find a single instructor on the grounds of my tech school who can help me with networking java when 4 people teach in the damn format. Naturally, I'm very frustrated. Any help would be appreciated.

    The full code is at: [http://pastebin.com/m49fe14be|pastebin.com/m49fe14be]
    Naturally I'll be changing this again at least once when I figure out how to play this out.
    Where I'm having problems is: #
            public void connectOut(){
                    try{
                            connectionAddr = InetAddress.getByName(server);
                            connect = new Socket(server, port);
                            initiateReadWrite();
                            //threadRun();
                            //listener = new Thread();
                            //listener.start();
                            //while(listener.isAlive()){
                            readFromServer();
                            connect.setKeepAlive(true);
                    catch(Exception e){
                            exceptioner(e);
            }Or
            public synchronized void readFromServer(){
                    try{
                            String readin;
                            while((readin = in.readLine()) != null){
                                    scrolledText.append(readin + "\n");
                    catch(Exception e){
                            exceptioner(e);
                    }I'm utterly lost and cannot find anyone to help me at my technical college. Four instructors and not a one understands threading.

  • General question about Applets!

    Hi,
    I have a Win program I need to upgrade as a Web one.
    So, I'm not sure whether I should use an applet whetther do it with JSPs...
    I've used Java applets 4 years ago and I met some printings, (very)long downloading, security, ...problems.
    Obviously, the graphic result would be much better for me with an applet but could you please tell me if Java applets for Java 1.4.1 is more reliable that it used to be. Otherwise, I would finally choose JSP technology :-)
    Thx in advance,
    -G-

    the graphic result will probably not be better with applets at all. They exist to make it far easier to port java programs to the net, but they are pretty horrible to use as a result (as you have experienced). Problem is, users don't care about what makes it tick, they just see them as slow and generally rubbish. I would use JSPs or servlets, which are a far better use of Java's power. However, you will need to do more work. They can both call out to external classes and beans, so you can reuse that way, but obviously you will need to have a think about how to restructure the I/O. You just have to look at skills demands to see whats good and whats not... just about every java job now asks for J2EE (servlet, JSP and other stuff) skills, but when was the last time you saw a job ask for applet skills?!

Maybe you are looking for

  • Relatório Contas a Receber

    Olá, Sou novo no SAP , e estou tentando elaborar um relatório de contas a receber. Mas apareceu um problema que não estou conseguindo resolver, vamos lá. No campo 'Num_Docto', eu preciso que apareça o número da NFe se for uma Nota fiscal e se for um

  • How can i transfer music from my ipod touh to an iphone ipod

    I'm trying to transfer musci from my first generation Ipod wheel to an iphone with a 4.2.1 operating system.  How can I do it...?

  • JTextPane and Horizontal Scrollbars

    Hi there, I had written an app that included an Event Log, and all was good in my world. Then one of the app users commented they would like errors to stand out within the log! I said "No Problem" but it turns out to be a major bloody headache!!!!! I

  • E52 BT caller name order

    I'm having a problem with caller name and phonebook display when using E52 with Audi Bluetooth MMI - the order of first and last name is reversed, so the car display shows LAST, FIRST instead of FIRST LAST. The interesting thing is the good old 6300

  • I not login my web site in firefox.

    I not login my web site in firefox.why this ? this is my web site http://www.sitessubmitter.com/