I forgot about signing the jar! Completely slipped my mind (a lot of
stuff does that lately ;-)
I know I've got a bunch too much stuff in the applet program. Once I
get it operating correctly, I'm going to go through and straighten it
all out (for instance, I'm not going to print a message every 2 lines in
the initialization code for one). I'm not taking a lot of time to do
things too right for a program I'm using just for a test, but need to
demonstrate things to my boss without having to 'interpret' things for
her. Stack traces she wouldn't understand, but a simple message would
at least distract her.
Maybe I can talk her into more Java training now ;-)
David Dudley
>>> Matej Sekoranja <[email protected]> 5/16/2007 4:35 AM
>>>
Hi, all!
Igor notified me that there is a JCA/CAJ debate going on... :)
Note that applets are run in a "sanbox" and do not have the same
permissions like any ordinary java application, simple reasion: you
do not want an applet to delete your local files.
Calls as IO/file calls are restricted, some system calls call and
also making TCP/UDP connections to the other-than-originating server
(from where applet was loaded) are not allowed, so this will
not work for for JCA (I guess this is the problem here). Still there
is a simple solution. You must sign the JAR file. Signed JARs
(accepted by user) will gain more permissions.
Just a note:
catch(Exception ex)
{
System.err.println("Initialization
failed for " + dpm.dataSource
+":\n" + ex + "\n");
System.exit(1);
}
Exception handling is one of the things that 99% of (java)
programmers do not do right.
Just to be short (not to write the whole essay): if you cannot handle
the exception, stack it (and provide any context information) and
rethrow, or at least (not really nice solution) dump the whole stack
trace (this will show you the source of the problems). Still it is
safer to catch Throwable than Exception.
So add line "ex.printStackTrace()" after println.
Matej
BEGIN:VCARD
VERSION:2.1
X-GWTYPE:USER
FN:David Dudley
TEL;WORK:880-3740
ORG:;MIS
TEL;PREF;FAX:880-3741
EMAIL;WORK;PREF;NGW:[email protected]
N:Dudley;David
END:VCARD
- References:
- RE: CAJ options Matej Sekoranja
- Navigate by Date:
- Prev:
RE: CAJ options Matej Sekoranja
- Next:
Channel Archiver Szalata, Zenon M.
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: CAJ options Matej Sekoranja
- Next:
Channel Archiver Szalata, Zenon M.
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|