Platform : Solaris7 / sol 8 / Win NT
Browser NS 4.75 / IE 5.0
Steps to Reproduce
On a solaris machine , Install the J2SE for merlin build 32 from :
/net/sqesvr/deployment3/merlin/beta/solaris.b32
On a Win NT machine , Install the J2SE for merlin build 32 from :
/net/sqesvr/deployment3/merlin/beta/win32.b32
Go to the below link for demos outside the Sun firewall
http://java.sun.com/products/plugin/1.3/demos/applets.html
Look for JFC Applets -> Java 2D
Results :
It throws the following exceptions on Solaris / Win NT when loaded
----------------------------------------------------
java.lang.SecurityException: Unable to create temporary file
at java.io.File.checkAndCreate(File.java:1149)
at java.io.File.createTempFile(File.java:1240)
at java.awt.Font.createFont(Font.java:413)
JAR cache enabled.
java.net.SocketException: socket closed: Bad file number
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:86)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:223)
After the demos get loaded on Sol/WinNT go to the tab FONTS it throws follwing exceptions
-----------------------------------------------------------------------------
Exception occurred during event dispatching:
java.lang.NoClassDefFoundError
at java.awt.font.LineBreakMeasurer.<init>(LineBreakMeasurer.java:291)
at java.awt.font.LineBreakMeasurer.<init>(LineBreakMeasurer.java:259)
at demos.Fonts.AttributedStr.render(AttributedStr.java:136)
at Surface.paint(Surface.java:307)
ingrid.yao@Eng 2000-11-01
Same problem reported by a Merlin CAP member:
J2SE Version (please include all output from java -version flag):
java version "1.4.0beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0beta-b38)
Java HotSpot(TM) Client VM (build B38, mixed mode)
Does this problem occur on J2SE 1.3? Yes / No (pick one)
No
Operating System Configuration Information (be specific):
Microsoft Windows 2000 Service Pack 1 (Japanese)
Hardware Configuration Information (be specific):
FMV-6600TX4e (FUJITSU)
CPU: Intel Pentium III (600E)
Memory: 320MB
Bug Description:
When an Applet loads an image (gif/jpg) from the server, an
Exception is thrown. It seems that it depends on the size of the
image. If the image is small it doesn't occur. If the image is
larger (10KB or more) it does occur.
The exception is either SocketException or IOException.
Steps to Reproduce (be specific):
1. Edit the image file name of attached program (Test.java) and
compile it.
2. Put the class file, html file and the image file on the web
server.
3. Run the appletviewer with the appropriate URL and click the
button on the applet.
You'll find one of the following messages.
java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:86)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:225)
at java.io.BufferedInputStream.read(BufferedInputStream.java:280)
at java.io.FilterInputStream.read(FilterInputStream.java:114)
at java.io.PushbackInputStream.read(PushbackInputStream.java:164)
at sun.net.www.MeteredStream.read(MeteredStream.java:68)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
at java.io.BufferedInputStream.read(BufferedInputStream.java:204)
at sun.awt.image.GifImageDecoder.produceImage(GifImageDecoder.java:139)
at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.ava:260)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:217)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:185)
========
Test program:
-------------- Test.java --------------
import java.applet.*;
import java.awt.event.*;
import java.awt.*;
import java.net.*;
public class Test extends Applet implements ActionListener {
private Button button = new Button("Button");
public void init() {
add(button);
button.addActionListener(this);
}
public void actionPerformed(ActionEvent ev) {
MediaTracker tracker = new MediaTracker(this);
Image image = null;
try {
URL url = getClass().getResource("meet_72.jpg"); // Change this file name
image = getToolkit().getImage(url);
} catch(Exception ex) {
System.out.println("1");
ex.printStackTrace();
}
tracker.addImage(image, 0);
try {
tracker.waitForID(0);
} catch(InterruptedException e) {
System.out.println("2");
e.printStackTrace();
}
}
}
-------------- Test.html --------------
<HTML>
<HEAD>
<TITLE> Test </TITLE>
</HEAD>
<BODY>
<APPLET NAME="Test" CODE="Test.class" CODEBASE="." WIDTH=100 HEIGHT=100>
</APPLET>
</BODY>
</HTML>