=== [ The
Java FAQ Daily Tips, weekly publication ]
===
| Issue
No: 154
20 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:
Hello dear friends!
Question:
What is the difference between applets loaded over the net and applets loaded
via the file system?
Answer:
There are two different ways that applets are loaded by a Java system. The way
an applet enters the system affects what it is allowed to do.
If an applet is loaded over the net, then
it is loaded by the applet class loader, and is subject to the restrictions
enforced by the applet security manager.
If an applet resides on the client's local
disk, and in a directory that is on the client's CLASSPATH, then it is loaded by
the file system loader. The most important differences are
- applets loaded via the file system are
allowed to read and write files
- applets loaded via the file system are
allowed to load libraries on the client
- applets loaded via the file system are
allowed to exec processes
- applets loaded via the file system are
allowed to exit the virtual machine
- applets loaded via the file system are not
passed through the byte code verifier
- Java-enabled browsers use the applet class
loader to load applets specified with file: URLs. So, the restrictions and
protections that accrue from the class loader and its associated security
manager are now in effect for applets loaded via file: URLs.
This means that if you specify the URL like
so:
Location: file:/home/me/public_html/something.html and
the file something.html contains an applet, the browser loads it using its
applet class loader.
- From Java Applet Security FAQ
Question:
How do I encode a binary file before sending it and how do I decode it when I
receive it?
Answer:
You don't need to. JavaMail will automatically determine an appropriate encoding
to use for your message parts before sending the message, and will automatically
decode message parts when reading them. The getInputStream method will return
the decoded data.
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 ... Hi!
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: http://javafaq.nu/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: http://www.javafaq.nu/plm2html/my_subscription.shtml
If you have troubles please contact us: subscription@javafaq.nu
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 http://javafaq.nu/other/linktous.shtml
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.
16 comments | | Java Newsletters | Score: 0
|