Easy to Learn Java: Programming Articles, Examples and Tips

Start with Java in a few days with Java Lessons or Lectures


Code Examples

Java Tools

More Java Tools!

Java Forum

All Java Tips


Submit News
Search the site here...
Search the JavaFAQ.nu
1000 Java Tips ebook

1000 Java Tips - Click here for the high resolution copy!1000 Java Tips - Click here for the high resolution copy!

Java Screensaver, take it here

Free "1000 Java Tips" eBook is here! It is huge collection of big and small Java programming articles and tips. Please take your copy here.

Take your copy of free "Java Technology Screensaver"!.

Java Newsletters Archive: 153

JavaFAQ Home » Java Newsletters Go to all tips in Java Newsletters

Bookmark and Share

=== [ The Java FAQ Daily Tips, weekly publication ] ===

Issue No: 153 18 March 2003
12053 subscribers

"...if you have no mentors around in the initial stages."
"This book has saved me hours of research...""

Foreword: Excuse me for possible mistakes. English is not native language for me.

In this issue:
  • 1. How do I hide system properties that applets are allowed to read by default?
  • 2. Is text file binary?
  • 3. I want to to have a listener for a String's change event. Is it possible?
  • 4. Latest posts on our message board
  • 5. Link to Java FAQ

  • Hello dear friends!

    Tip 1

    Question: How do I hide system properties that applets are allowed to read by default?

    Answer: There's no way to hide the ten system properties (see below) from applets loaded into a Java-enabled browser. The reason is that the browsers don't consult any external files as part their Java configuration, as a security precaution, including the ~/.hotjava/properties file.

    From the appletviewer, you can prevent applets from finding out anything about your system by redefining the property in your ~/.hotjava/properties file. For example, to hide the name of the operating system that you are using, add this line to your ~/.hotjava/properties file:


    Ten OS propertis that accessible by applet:

    From Java Applet Security FAQ
    Java wimps please close your ears ... For the Java programmer who
    thought he knew everything there was to know about Java, have a
    look at the most advanced Java newsletter archived on the website
    http://www.smotricz.com/kabutz Guess what, it won't even cost you
    anything! Subscribe today - you won't be disappointed.

    Tip 2

    Question: Is text file binary?

    Joke, not answer: Cool
    Yes, ALL FILES are binary, even text files... Because a file is a series of bits...
    And bits are binary...

    Tip 3

    Question: I want to to have a listener for a String's change event. Is it possible?

    Answer: String has no such listener because you can not change a String.
    Strictly saying a String can not be changed. Each time when you change a value of an "old" String Java creates a new String and then refers to "old" one.
    However you can write a wrapper class which has two methods - setString() and getString(). The body of those two methods could have additional code that notifies about String's "change" event. Something like this:

    public void setString (String aString) {
    this.aString = aString;


    The method stringValueChanged() is responsible for notification

    Latest posts on our message board

    how to write into a file?!
    could anyone show me how to write into a file via a socket using client-server program ! ? ? thank you..
    topic here...

    Stop before shutdown
    Hi evebody,
    I need to stop the browser shutoff before close it (like when we close the Operating System and there is a modified document opened).
    Is there something like this?
    topic here

    banking system-please help!
    Hi everyone,
    I've got an assignment to hand in a week time, i was just wondering if anyone is willing to help me out with it.
    the problem iam facing at the moment is to take the input from a text field and insert it into a file.
    the whole program is about a banking system which the user is able to Credit, Debit and check the balance of his or her account. the following is the specification of the program.
    topic here....

    Database connectivity using J2EE Server
    Hello All,
    I'm using J2EE server (v1.3) , While connecting to the Sql Server 2000 / Oracle 8 database I'm getting an RMI Exception.
    If any of you have worked on similar lines.
    one more thing to add , It connects with cloudscape database very well. I know there is some discripnancy in my settings.
    Kindly guide me. Thanks in advance.
    topic here...

    Java File Explorer implementation
    Does anyone know where to get open source for a java implemented file explorer?
    topic here ...

    Capture and Management Key Event ...
    I'm writting a program for edit images. My problem is how to capture key events like 'ctrl+c' o something like this. I use a JFrame where are the menu options a menu bar and in others JWindows I paint and have a Tool window. The JFrame are the 'father' o this JWindows, of course. The problem is that I can't capture the key events anyway.
    I've tried two different ways. First, I thought, of course badly, to use this code in the JFrame:

    topic here...

    regexp problem - smallest possible match on string
    I need some help on simple regular expression.
    Just say I have a string for example:
    String str = "start start start match1 finish finish finish";
    I would like to extract the smallest string that is bounded by "start" and "finish"... ie. in this case I would like to extract the string "match1".
    My first guess was to use:
    pattern = "start (.*?) finish";
    however this matches the
    topic here...

    Please ask your questions and help each other at our Java Forum:

    The Java FAQ Daily Tips is a newsletter that is only sent to those who have specifically subscribed to it (double opt-in).

    To subscribe/unsubscribe to "The Java FAQ Daily Tips" weekly edition newsletter visit our page here:

    If you have troubles please contact us: subscription@javafaq.nu

    Link to Java FAQ

    If you have added a link to http://javafaq.nu on your WEB-site, please let us know and you will get listed on our
    "pages linking to us" pages! If your page is a programming is programming relates you will of course get listed in the WEB-directory as well. Also, if you link to us, you have a chance to be listed in this newsletter as well.

    More information and graphics artworks can be found here


    For information on advertising on the Java FAQ's Daily Tips Newsletter, send an email to: adv@javafaq.nu
    You will get the answer immediately from autoresponder!

    Send your comments, questions, praise and complaints to us: comments@javafaq.nu

    Copyright (c) 2000 - 2003 John Andersson, All rights reserved.

     Printer Friendly Page  Printer Friendly Page
     Send to a Friend  Send to a Friend

    .. Bookmark and Share

    Search here again if you need more info!
    Custom Search

    Home Code Examples Java Forum All Java Tips Books Submit News, Code... Search... Offshore Software Tech Doodling

    RSS feed Java FAQ RSS feed Java FAQ News     

        RSS feed Java Forums RSS feed Java Forums

    All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest 1999-2006 by Java FAQs Daily Tips.

    Interactive software released under GNU GPL, Code Credits, Privacy Policy