JAI problem.
From: Kocheralkota Harikrishna (kocheralkota.harikrishna_at_alcatel.com)
Date: 09/14/04
- Next message: Paul Lutus: "Re: problem with two JFrame"
- Previous message: Victoria: "How to hide the command prompt?"
- Next in thread: ak: "Re: JAI problem."
- Reply: ak: "Re: JAI problem."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 14 Sep 2004 09:31:04 +0530
Hello,
Following sample code works fine with windows and fails in UNIX.
it gives me the error
WARNING: Could not create system preferences directory. System
preferences are unusable.
Sep 14, 2004 2:41:32 PM java.util.prefs.FileSystemPreferences
checkLockFile0ErrorCode
WARNING: Could not lock System prefs.Unix error code 0.
Sep 14, 2004 2:41:32 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush system prefs:
java.util.prefs.BackingStoreException: Couldn't get file lock.
and the image is not displayed
Your help is appreciated.
Thanks and best regards
hari
*******code starts*******
import java.awt.Frame;
import java.awt.Image;
import java.awt.Toolkit;
import javax.media.jai.JAI;
import javax.media.jai.RenderedOp;
import javax.media.jai.widget.ScrollingImagePanel;
public class AWTImageSample {
public static void main(String args[]) {
if (args.length != 1) {
System.out.println("Usage: java AWTImageSample
jpg/gif_file_name");
System.exit(0);
}
Image awtImage =
Toolkit.getDefaultToolkit().getImage(args[0]);
RenderedOp image = JAI.create("AWTImage", awtImage);
ScrollingImagePanel panel =
new ScrollingImagePanel(image, 300, 200);
Frame window = new Frame("AWTImage Sample");
window.add(panel);
window.pack();
window.show();
}
}
******code ends*******
- Next message: Paul Lutus: "Re: problem with two JFrame"
- Previous message: Victoria: "How to hide the command prompt?"
- Next in thread: ak: "Re: JAI problem."
- Reply: ak: "Re: JAI problem."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|