File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes building applet for intranet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "building applet for intranet" Watch "building applet for intranet" New topic

building applet for intranet

john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
Im sorry I know I will be asking a lot of stupid questions but please take the time to help me. Im building an applet for the intranet. I have read all the postings for the past year; somethings are somewhat clear ,but others are not. Like many my applet is running fine in appletviewer but its a different story when I try to test it in IE. Im getting securityExceptions which I dont understand why, im running the applet from my C drive its not attached to the server yet. (Yeah I KNOW STUPID QUESTION). Should this (ie running the applet from C drive still be throwing exceptions) and second major question since I want to set this up for the intranet how can I bypass all the security walls in other words does the applet need to be signed and how about the policy file.
Gregory Banks

Joined: Aug 23, 2001
Posts: 5
If you are using swing you may need the HTML converter or the latest java plug-in. I was constantly getting a method verification error in netscape and and applet not initialized in IE because it could not find some method for JTextField. I converted the HTML and it ran fine.
Greg Banks
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17421

We all have to start somewhere!
On an Intranet you can make certain assumptions (if not outright DEMANDS!) on the user configuration that you can't on the Internet. I prefer not to, because it's good practice, and often in-house things turn out to be good to provide to a more general audience later.
One thing that causes many people grief here is the situation where they code up a solution and debug it in their IDE and/or the AppletViewer, but then they embed it in a web page and it doesn't work. You can sign the applet and fight the firewalls, or you can grit your teeth and do it the Sun (3-tier) way. Sometimes you NEED to be able to write to local files, which is why applets can be signed. The reason things like that require special authorizations is because there are jerks out there who would find it "funny" to create a web site that filled up your hard drive behind your back or even tampered with OS-critical files.
I'll repeat a good quote I ran across a while back - it may save you some wasted effort:
"Because the default behavior for Java applets and applications
running in restricted environments is no access to system resources, all access to system resources such as file systems, networking facilities, screens, keyboards, disk drives, and printers is not allowed unless specifically granted. The restricted environments also prevent communications between Java programs."

An IDE is no substitute for an Intelligent Developer.
Sue Fish

Joined: Aug 29, 2001
Posts: 7
I just found this website, so I haven't been lurking very long - forgive me for barging in!
Anyway, I have written a Java Swing applet for our intranet, using JDK 1.2.2. It runs in Netscape and IE, on Suns, PCs and SGIs. Yes, you have to sign your applet in order to access any local files (we transfer files back & forth, client/server) Since I am using the plugin I've used Sun's jarsigner tool and downloaded the .keystore & .java_policy files to each clients .netscape dir & home.
Each platform has it's own set of quirks but it can be done!
If you are able to run Swing without the plugin - please let me know how! Then you should sign your jar file using Netscapes signtool.
Oh yeah, I am using a self-signed certificate (I created it)stored in my .keystore file. Rumor has it those will not be accepted in future releases???
Good Luck,
I agree. Here's the link:
subject: building applet for intranet
jQuery in Action, 3rd edition