[ The Java FAQ Daily Tips, weekly publication ]
Foreword: Excuse me for
possible mistakes. English is not native language for me.
In this issue:
Hello dear friends!
If I run my applet with the SUN VM I get exception: "Either "code" or "object"
should be specified, but not both." It does not happen with the Microsoft
found good recommendations on Sun’s website about how to install latest browsers
and avoid possible problems with running applets in different browsers:
is a compatibility issue. To avoid the exception with the Sun VM, do not use an
attribute named object with the PARAM element in an applet.
For Netscape 7,
or Mozilla 1.1 or later, running on Microsoft Windows, the browser will always
use Sun's latest JRE—even if you have deselected the "Netscape 6 or later" or
"Mozilla 1.1 or later" check box in the Browser tab of the Java Plug-in Control
Panel. This is due to the auto-scan features of these browsers. For instance, if
Netscape 7 is installed on a Windows machine that has Sun's 1.4.2 JRE installed
as the latest version and you deselect "Netscape 6 or later" in the Control
Panel, Netscape 7 will still run Sun's 1.4.2 JRE (Java Plug-in).
Using Java Plug-in 1.4.2 in conjunction
with Netscape TM 6.x browsers can cause erratic behavior, including closure of
This problem is due to a bug in the browser, and you can avoid this problem by
using Netscape 7.0 browsers.
The Netscape 7 installer provides three
choices for installation: Recommended, Full, and Custom. The Java Plug-in may
not work properly in Recommended or Full installations of Netscape 7 browsers.
Such Netscape 7 browsers may close when attempting to launch an applet. To avoid
this problem, install Netscape 7 using the Custom option, and choose not to
install the Quality Feedback Agent.
When installing Java Plug-in, it is
necessary to shut down and then restart your web browser. On Microsoft Windows
platforms, Netscape 7 has a Quick Launch feature that keeps it running in the
background so that it can be launched with minimal start-up time from a Quick
Launch icon in the system tray. To completely shut down Netscape 7, you must
exit Netscape 7 from its Quick Launch icon in the system tray. "
This tip is based on:
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
what, it won't even cost you
anything! Subscribe today - you won't be
Question: Why wait(), sleep(), notify(), notifyAll()
must be inside a synchronized block, otherwise it throws
java.lang.IllegalMonitorStateException: current thread not owner.
Answer: Wait/notify unlocks the monitor and it is not
synchronized another thread can try to access it and start a race
to know: In releases prior to 1.4.2, it was possible to create an
invalid URL instance such as the following: new URL ("http://www.foo.com:-1/index.html").
Specifying a port number of
-1 is not valid. However, in previous releases the -1 was stripped off when
sending such URLS with HTTP commands. In 1.4.2, the -1 is left in the URL and
this may cause problems for some HTTP servers or proxies.
Applications should not
create URL instances with a -1 port number. Assuming the -1 refers to the
default port in this example, the correct way to create this URL is new URL
("http://www.foo.com/index.html"). This note only applies to the single argument
FREE Your PC
From Corrupt Files Now!
Have the peace of mind knowing your computer is
error-free, 24 hours a day! Safe. Simple. Secure. Silent.
automated, and easy-to-use PC health check tool is guaranteed
instantly expose harmful files lurking on your computer.
Get your FREE
PC Health Check today at:
Latest posts on our
|Getting Java to work in OS 9 - is this
My site is not up yet but there
is another that uses a similar code:
www.angelofjoy.com if you
want to view it.
I know that OS X is fully Java compatible, and that if
it is not there are downloads available, but is this the case for OS 9?
I'm making a 2d game with
Java2D. But i'm only getting 14 frames per second, how can I speed up
|Policy File Troubles
I have an unsigned Applet which
I need to grant permissions to in the policy file. The permissions I grant work
fine, until I change the codebase. If i have it set to <all> then the
applet runs perfectly, If I have it set to "file:/C:/ILO/*" Then it errors with
a access denied (java.net.SocketPermission.... Error.
all of the .class
files are located in the C:ILO folder, any ideas on why the codebase path
wouldn't work. I really dont want to give all applets the same permissions as
this one, as it also reads and writes files.
any ideas would be
I' ve noticed that when
i search for a file in JFileChooser i can see views like My Computer, My Network
Places etc and select them.
I have my own file browser, but i can't take
these views. I know that the problem is FileSystemView or WindowsFileSystemView
but -till now- i didn't find any way to use these classes.
Does anybody has
|Java noob question
I have an html page....that is
heres the HTML:
|help with JPanels
i have a JPanel with a picture
in the middle and two JButtons at the bottom. One JButton changes the background
color and the other one draws a circle around it. I have made two classes
extending JPanel, one adds an image and listens for color change button. the
other class draws the shape but the problem is that both the image and the shape
have to be in the center of the frame. When i try to add shape panel to frame it
overwrites the image panel. how can i show the image panel and shape panel at
the same time and in the middle.
comments? | | Java Newsletters | Score: 0