Sun.awt.X11.XToolkit processException
In my application, I'm embedding a Java AWT Frame into a Qt widget and for that I'm using "sun.awt.X11.XEmbeddedFrame.java" class.
I pass the "Window Id" of the QWidget to XEmbeddedFrame which then displays itself into the QWidget.
The embedding works fine, i.e., the Java frame gets displayed into the QWidget but when I try to close the QWidget (by clicking on the 'x' button on the QWidget window), I get the following exception:
sun.awt.X11.XToolkit processException
WARNING: Exception on Toolkit thread
sun.awt.X11.XException: Cannot write XdndProxy property
at sun.awt.X11.XDnDDropTargetProtocol.registerEmbedderDropSite(Unknown Source)
at sun.awt.X11.XDropTargetRegistry.updateEmbedderDropSite(Unknown Source)
at sun.awt.X11.XDropTargetEventProcessor.doProcessEvent(Unknown Source)
at sun.awt.X11.XDropTargetEventProcessor.processEvent(Unknown Source)
at sun.awt.X11.XToolkit.run(Unknown Source)
at sun.awt.X11.XToolkit.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Any ideas on what might be causing this exception and how to handle it?
Do I need to write my own error handler? But XToolkit.XErrorHandler interface is not public. Is there any other way?
Thanks!
Well The issue was somewhere else due to it reading too much of data. It ran but my program is very slow (approx 2-3 hrs).
I am worried about the speed...
is it because of the large amount of data.. 23,355,459 records..?? or there could be some issue in programming probably memory leak etc..??
-> reads db
-> for each record set
-> perform different operation/ writes to file
Similar Messages
-
Could not initialize class sun.awt.X11.XToolkit
hi all
String fileName = "c:/test/one.jpg";
Image imgg = Toolkit.getDefaultToolkit().getImage(fileName);
ImageIcon img = new ImageIcon(imgg);
imgDim = ""+img.getIconHeight();
when i run this code in linux machine am getting the error Could not initialize class sun.awt.X11.XToolkit....but its runnig on windows machine.. is there anything wrong wiht my code........pl help me any1 out of dishere http://rapid-i.com/rapidforum/index.php?topic=366.0
they talk about adding to the JVM options a "-Djava.awt.headless=true" -
Strange references from "sun.awt.X11.InputMethod"
We profiled our software and found obscure references for panels that have been closed, but can not be garbaged collected because there is a reference from "sun.awt.X11.InputMethod".
It seems that it has something to do with the clipboard / Klipper of Linux, as the reference is sometimes solved when marking and copying text. Anyone had this error too and is this a bug in Java, or how can we fix that issue? We have very huge panels and are getting memory problems if they are not deleted correctly or too late. Has anyone more infos of the cause and what can be done?
Please help.Similar problem I solved with update driver printer.
Bya -
Sun.awt.* package
hello
i have a problem in finding sun.awt.* package on the net if anybody has it can you please send it to me . and also with instructions like how to set the class path and is it needed put the package in jdk or its ok to put it out side jsdk. please send me asap.
as iam developing my own filechooser class thats why i need this package to compile my class.
thank you
regardshello nobody there to help me with my problem.
actually i have overrided the class Jfilechooser using only basic packages with importing sun.awt.shell.* package but iam facing this errors can you please help me out of this problem.
FileChooser.java:4: package sun.awt.shell does not exist
import sun.awt.shell.*;
^
FileChooser.java:162: cannot resolve symbol
symbol : class ShellFolder
location: class FileChooser
ShellFolder getShellFolder(File f) {
^
FileChooser.java:88: cannot resolve symbol
symbol : class ShellFolder
location: class FileChooser
if (!(f instanceof ShellFolder)) {
^
FileChooser.java:93: cannot resolve symbol
symbol : variable ShellFolder
location: class FileChooser
f = ShellFolder.getShellFolder(f);
^
FileChooser.java:130: cannot resolve symbol
symbol : class ShellFolder
location: class FileChooser
if (f instanceof ShellFolder) {
^
FileChooser.java:131: cannot resolve symbol
symbol : class ShellFolder
location: class FileChooser
return ((ShellFolder)f).isFileSystem();
^
FileChooser.java:140: cannot resolve symbol
symbol : class ShellFolder
location: class FileChooser
ShellFolder sf = getShellFolder(dir);
^
FileChooser.java:163: cannot resolve symbol
symbol : class ShellFolder
location: class FileChooser
if (!(f instanceof ShellFolder)
^
FileChooser.java:170: cannot resolve symbol
symbol : variable ShellFolder
location: class FileChooser
return ShellFolder.getShellFolder(f);
^
FileChooser.java:221: cannot resolve symbol
symbol : variable ShellFolder
location: class FileChooser
return ShellFolder.isFileSystemRoot(dir);
^
FileChooser.java:226: cannot resolve symbol
symbol : variable ShellFolder
location: class FileChooser
File f = (File)ShellFolder.get("fileChooserDefaultFolder");
thanks in advance
regards -
Hi all!
This problem is in relation to a very complex bean for data visualization which is jarred and bridged as an activex control.
I am able to create the activex control and embed it in a vb form. But when I try to run the application in vb I get the following message and the application does not start.
java.io.NotSerializableException: sun.awt.image.BufferedImageGraphics2D The bean has not used the class mentioned above anywhere. It uses the
Image
class though. I have used other beans, which use the same drawing techniques as the bean in question, as activex controls, with no errors.
What could be the problem?
tia
Shailesh
PS: the actual error dump is 1 page long I can send it by email on request.Hello,
Have you implemented the Serializable Interface? I usually receive that error when I forgot to implement that interface. It is mandatory for a JavaBean to implement this interface.
As an example:
import java.io.Serializable;
public class SimpleBean implements Serializable
I hope it helps.
Antonio Castro -
AccessClassInPackage.sun.awt.geom
My class imports sun.awt.geom.Crossings in order to implement a similar-to-java.awt.Polygon intersects method, upon float values. This takes place in an applet. The all known error message appears in the java console:
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.awt.geom)
I should actually sign my applet just to import that package!? (lets say the policy file is not an option in my case)
Why is that package different in such a way, than other packages? Is it not located together with all the other classes that compose the jre? (Also, is it documented somewhere?) May it be that the jre of the client that runs the applet would not necessarily provide this package or is it a standard in the J2SE jre?
When an applet imports java.awt.Polygon (wihch imports sun.awt.geom.Crossings) no AccessControlException in thrown. I wonder.
Thanks.
mplexus2all the sun.* packages are offlimits to Applets since they contain code that could comprimise the system, and they do not contain any security checks. There may be an exception in one of the sun's get audio file.
-
I have to import sun.awt.motif.* but i don't know where to find it. Can you tell me the name of the .jar file i have to download? i have j2re1.4.0_02 installed.
You will have better luck if you post to a Mozilla forum/newsgroup. You may have downloaded the wrong package or the code for Webclient is not compatible with JDK 1.4. Either way, the sun.* packages are not something you can just downlaod and add it in your classpath
-
Sun.awt.image.ToolkitImage
Hi
I'm integrating with a 3rd party package which delivers various images.
These come in different objects, mostly BASE64DecoderStream and BufferedImage. But, GIF files are delivered as a ToolkitImage object.
For the BufferedImage I do something like
ByteArrayOutputStream stream = new ByteArrayOutputStream();
ImageIO.write(image, "JPG", stream);and puts it in DB. I just can't figure out a way to do the same for ToolkitImage.
My questions are:
1. Is there a way to convert/cast the ToolkitImage so i can format/encode it and put it in DB, similar to the example above?
2. Where is the API documentation for the internal classes in package "sun.awt.image"?
Hope you experts can help me out here :)> Didn't know it could be casted to an Image.
Do you know of any documentation on sun.awt.image in general?
Why Developers Should Not Write Programs That Call 'sun' Packages
The classes that Sun includes with the Java 2 SDK, Standard Edition, fall into package groups java.*, javax.*, org.* and sun.*. All but the sun.* packages are a standard part of the Java platform and will be supported into the future. In general, packages such as sun.*, that are outside of the Java platform, can be different across OS platforms (Solaris, Windows, Linux, Macintosh, etc.) and can change at any time without notice with SDK versions (1.2, 1.2.1, 1.2.3, etc). Programs that contain direct calls to the sun.* packages are not 100% Pure Java. In other words:
The java.*, javax.* and org.* packages documented in the Java 2 Platform Standard Edition API Specification make up the official, supported, public interface.
If a Java program directly calls only API in these packages, it will operate on all Java-compatible platforms, regardless of the underlying OS platform.
The sun.* packages are not part of the supported, public interface.
A Java program that directly calls into sun.* packages is not guaranteed to work on all Java-compatible platforms. In fact, such a program is not guaranteed to work even in future versions on the same platform.
For these reasons, there is no documentation available for the sun.* classes. Platform-independence is one of the great advantages of developing in the Java programming language. Furthermore, Sun and our licensees of Java technology are committed to maintaining backward compatibility of the APIs for future versions of the Java platform. (Except for code that relies on serious bugs that we later fix.) This means that once your program is written, the class files will work in future releases.
Each company that implements the Java platform will do so in their own private way. The classes in sun.* are present in the SDK to support the Sun implementation of the Java platform: the sun.* classes are what make the Java platform classes work "under the covers" for the Sun Java 2 SDK. These classes will not in general be present on another vendor's Java platform. If your Java program asks for a class "sun.package.Foo" by name, it may fail with ClassNotFoundError, and you will have lost a major advantage of developing in Java.
Technically, nothing prevents your program from calling into sun.* by name. From one release to another, these classes may be removed, or they may be moved from one package to another, and it's fairly likely that their interface (method names and signatures) will change. (From the Sun point of view, since we are committed to maintaining the Java platform, we need to be able to change sun.* to refine and enhance the platform.) In this case, even if you are willing to run only on the Sun implementation, you run the risk of a new version of the implementation breaking your program.
In general, writing java programs that rely on sun.* is risky: they are not portable, and are not supported.
~ -
HELP: where is "com.sun.awt.svg"?
Hi,
there is sample code "HelloSVGWorld.java" for SVG generator at
http://wwws.sun.com/software/xml/developers/svg/java2d-api/
can anyone kindly tell me where the package com.sun.awt.svg is. Many thanks.I did download batik but there are about 20 jar files and anyone knows if "com.sun.awt.svg" is contained in one of these jar files. Thanks a lot.
-
Hi all,
From where I can find the package com.sun.awt
I've search the web but unable to find a location to download it. Anyone of you have a link to download it.
Thanks.Don�t know if it help, but I found that 'org.apache.batik.svggen.SVGGraphics2D' substitutes 'com.sun.awt.svg.*'
Also I found some info about com.sun.awt in here:
http://java.sun.com/products/personaljava/spec-1-1/pJavaSpec.html -
Hello,everybody!
I want to know Where I can get package com.sun.awt.svg.* ??Requirements
JDK 1.3 Software -
To use the Graphics2D SVG Generator, you need to have installed the Java 2 Software Developer's Kit (SDK). You can obtain the Java 2 SDK from the Sun Java 2 web site (http://java.sun.com/j2se/).
The Graphics2D SVG Generator software was tested with version 1.3, so you should use the same version or a newer one.
DOM Implementation -
A DOM level 1 implementation is needed to use the Graphics2D SVG Generator. You can obtain a Java language DOM implementation from the following:
Apache Xerces (http://xml.apache.org/xerces-j/index.html)
Sun Microsystem's Project X
(http://developer.java.sun.com/developer/products/xml)
You also need to put the corresponding jar files in the classpath. The following table shows commands for doing this.
Operating System DOM Implementation Command
Windows 98 Xerces set classpath=%classpath%;
xercesinstalldir\xerces.jar
Windows 98 Project X set classpath=%classpath%;
projectxinstalldir\xml.jar
UNIX Xerces setenv CLASSPATH ${CLASSPATH}:
xercesInstallDir/xerces.jar
UNIX Project X setenv CLASSPATH ${CLASSPATH}:
projectxinstalldir/xml.jar
SVG Viewer
To view the generated SVG files, you need to have an SVG viewer. You can find a list of available SVG viewers at the W3C SVG web site (http://www.w3.org/Graphics/SVG/SVG-Implementations).
top of the page
Installing the Graphics2D SVG Generator Software
IMPORTANT:
Before installing the software, make sure you agree to the license terms.
To install the software, perform the following steps:
Step 1: Uncompress the distribution file in the desired installation directory. Use these commands (from the command line):
> cd installDir
> jar xf j2d2svg.zip
The j2d2svg.jar file expands into a directory (j2d2svg) that contains the following:
README.html (this file) -- Provides important information about installing and using the Graphics2D SVG Generator.
svggraphic_license.html -- License agreement.
svggen.jar -- A jar (java archive) file that contains the SVGGraphics2D classes.
glf.jar -- A jar file that contains the Graphic Layers Framework classes.
svggenDoc.jar -- A jar file that contains the software's API documentation in HTML.
HelloSVG.java -- Example file.
HelloManipulatedSVG.java -- Example file.
Step 2: Add svggen.jar to the classpath.
On Windows, use this command:
- set classpath=%classpath%;<j2d2svginstalldir>\svggen.jar
On UNIX, use this command:
- setenv CLASSPATH=${CLASSPATH}:j2d2svginstalldir/svggen.jar
To use the Graphic Layer Framework conversion utility (i.e., to use the com.sun.awt.svg.util.GlfSVGPrettyPrint), you will also need to add the glf.jar file to your classpath. However, this is not required to run the examples. -
Where can i find package com.sun.awt.svg.*??
where can i find package com.sun.awt.svg.*??
urgent!!! please help me!
thanks in advance!!!Perhaps you might find some useful information here;-
http://forum.java.sun.com/thread.jsp?forum=54&thread=427144&tstart=15&trange=15
(pillock) -
Where I can get package com.sun.awt.svg.*
Hi:
Anyone know Where I can get package com.sun.awt.svg.* ??
My Email is :[email protected]
thank you !I do not know,
but if you need to deal with SVG take a look at Batik at xml.apache.org,
http://xml.apache.org/batik/index.html -
JFrame Transperency com.sun.awt package
Hi,
In my application i am having the requirement of tranperent window. I searched lot in google and i find transperent JFrame is possible. For making the JFrame transperent the **com.sun.awt** package is needed.
But this package is unavailable in JDK1.6. I am also using JDK 1.6 version.
If anyone knows the JDK containning this package. Please let me know that link(JDK containing com.sun.awt package).Don�t know if it help, but I found that 'org.apache.batik.svggen.SVGGraphics2D' substitutes 'com.sun.awt.svg.*'
Also I found some info about com.sun.awt in here:
http://java.sun.com/products/personaljava/spec-1-1/pJavaSpec.html -
Where is sun.awt.image.Image in Java5?
Hello,
I'm trying to compile a package using Java 5, which was before compiled with 1.4. I geth the error "sun.awt.image.Image cannot be resolved or is not a valid superclass".
I found that class in 1.4.2, but not in 1.5. Is there an substitution for that?
Regards,
KaiLook in:
java.awt.Image and java.awt.image for your needs and remember the sun.* packages are not guarenteed to be supported or be the same from version to version.
Maybe you are looking for
-
I have set up iCloud on my iMac and on my iPhone 4s. I can send an email from my iPhone to see on my iMac but not the other way around. If I am to recieve an email from a friend I want it to appear on my iPhone, and all my mac devices, thats the whol
-
while creating free apple id, I used my a email ID, after confirmation from my email account then, the mesage say that, i can use this apple ID to download.. when i use to download in itune store it asking to review as I am first time using this ID??
-
How can I find out on the command line, when the last time machine backu succeeded?
For verification of ~60 MacBooks, I'd like to write a script that posts status of the last backup via mail or HTTP call to our central server. How can I lookup this information?
-
PDF does not convert correctly to Word
When I convert a PDF file to Word (either doc or 97-2003), I have to make major changes to the font, formatting, etc. I may as well have retyped the actual document. Am I doing something wrong? Program was too expensive to have to tweak it!
-
Material staging for process order
Dear All, Can we use material staging for process orders. If possible pls brief the procedure. Subbu.