Documentation of sun.awt.shell-classes?

Hi,
I am searching for the api of any sun.-classes.
Where i can find this?
regards
Olek

But it is not bad for the user to understand the art
of working of the classes when part of this is not
documented?It is bad. Knowing what every little tidbit does is a breach in encapsulation, makes you possibly rely on implementation instead of interfaces/contracts, and even (although on a different level) Fred Brooks himself realized later that "all information to everybody" doesn't work or is even helpful.
In other words: using a black-box approach is delegation, "knowing what everything does" is micromanagement.

Similar Messages

  • Sun.awt.shell.ShellFolder

    who can tell me how to get the source code for sun.awt.shell.ShellFolder?? Thanks a lot !!!

    walker8 wrote:
    BigDaddyLoveHandles wrote:
    The only one I use with any regularity is "unchecked", which comes in handy when you are bridging pre- Java 5 uses of collections to code that uses generics.:) one of these days when i grow up >>>>>
    kind regards
    Walker8Do you mean that you haven't used generics? The new stuff in Java 5 rocks. Generics + enhanced for loop + unboxing:
    void before(Collection col) {
        for(Iterator i = col.iterator(); i.hasNext(); ) {
            Integer element = (Integer) i.next();
            int x = element.intValue();
    void after(Collection<Integer> col) {
        for(int x : col) {
    }

  • 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
    regards

    hello 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

  • 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.
    ~

  • 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 dis

    here http://rapid-i.com/rapidforum/index.php?topic=366.0
    they talk about adding to the JVM options a "-Djava.awt.headless=true"

  • Sun.awt.SunTooljit documentation

    I'm working to modify a program that uses sun.awt.SunToolkit package . This one is implemented in the release 1.3.0 of the JDK for Windows and it is no more supported by Sun. Now I need his documentation to know how to use it, because I cannot entirely rewrite it...
    Someone could help me?

    I think your best bet may be to RTFS.
    You can get the source to the JDK from the community download area, and read the Java and the C sources yourself to figure out what they do..

  • 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.
    mplexus2

    all 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.

  • URGENT!!!! help me!Where I can get package com.sun.awt.svg.*

    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.

  • 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

  • Java.io.NotSerializableException: sun.awt.image.BufferedImageGraphics2D

    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

  • 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,
    Kai

    Look 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.

  • Question : Save AWT Image Class to File..

    I Have a Question.. @.@a
    I'm doing AWT transform now..
    Well...
    I have a problem..
    I want to save AWT Image class to file..
    But.. I don't now that..
    Input Image Class same below..
    Image imageContent = (Image)attachment.getContent();
    How does it save imageContent Image class to file..?

    I had the same problem... convert it to a BufferedImage (http://forum.java.sun.com/thread.jspa?threadID=665744&tstart=15), then use javax.imageio.ImageIO.write to save it to a file.

  • Where to download  "sun.awt.image.codec.JPEGImageDecoderImpl"/Windows

    Hello,
    I bought some Java API. These API uses com/sun/image/codec/jpeg/JPEGCodec.
    I found these clases in src.zip in java install directory.
    Then, this code has a source line
    "import sun.awt.image.codec.JPEGImageDecoderImpl;"
    Where can I find/downlad this class?
    (I work on Windows platform)

    This class is in rt.jar package
    which is in ur jre directory/lib
    Hope u got it!!
    Pradhip

  • Com.sun.awt.AWTUtilities run in ubuntu

    com.sun.awt.AWTUtilities.setWindowOpaque();
    when i want to run the above script in ubuntu, it raise exception:
    Exception in thread "main" java.lang.IllegalArgumentException: The window must use a translucency-compatible graphics configuration
    at com.sun.awt.AWTUtilities.setWindowOpaque(AWTUtilities.java:371)
    at runtext.<init>(runtext.java:40)
    at runtext.main(runtext.java:67)
    i use Ubuntu8.04 and GNOME2.22.2
    how can i fix this problem?

    You know that saying about "when to break the rules ...", don't you? I mean, come on, this class is advertised in a public tech tip article from a SUN employee. Normally, you do not advertise stuff you don't want people to use.

  • Sun.awt libraries require AllPermission permission

    Hi, i have read about java securitymanager and i know it evaluates all context classes everytime it needs to verify a permission. Im developing a swing application and working with the policy i found that a lof ot sun.awt classes require AllPermission permission, so the question is ... what is the best way to afford this problem, if i add Allpermission permission to my policy its the same to execute without a SecurityManager. I was thinking in a custom security manager but im not sure if its the best option. Here i add my overriden checkPermission method
    public void checkPermission(Permission perm) {
    Class[] contextClasses;
    if(perm instanceof AllPermission){
    contextClass=getClassContext();
    for(Class aClass: contextClasses) {
    if(aClass.getName().startsWith("sun.awt")){
    return;
    }else{
    if(!"completeNameCustomSecurityManager".equals(aClass.getName)) {
    super.checkPermission(perm);
    I know using Class's getName() method is not secure, but whats your opinion ???

    a lof ot sun.awt classes require AllPermission permissionOn the contrary. Various things require various specific permissions. You can use -Djava.security.debug=access,failure to tell you exactly what permissions are required.

Maybe you are looking for