Ignoring Sun proprietary API warning in JDK 1.6.0_13.

We are upgrading our application from JDK 1.5.0_17 to JDK 1.6.0_13 and we get so many warnings regarding Sun proprietary API.
Can someone help me in telling when this API's will be removed from Sun API and is there any problem in using this API's as long as we use JDK 1.6.0_13.
At the same time can u suggest the alternate API's which can be used in place of this.
Warinings :
[javac] D:\eRAM3500_07_04\server\src\globalaccess\SSLTunnelSocketFactory.java:9:
warning: sun.net.www.protocol.http.HttpURLConnection is Sun proprietary API and may be removed in a future release
[javac] import sun.net.www.protocol.http.HttpURLConnection;
[javac] ^
[javac] D:\eRAM3500_07_04\server\src\globalaccess\SSLTunnelSocketFactory.java:111:
warning: sun.net.www.protocol.http.HttpURLConnection is Sun proprietary API and may be removed in a future release
[javac] String s1 = "CONNECT " + s + ":" + i + " HTTP/1.0\n" + "User-Agent: " + HttpURLConnection.userAgent;
[javac] ^
[javac] D:\eRAM3500_07_04\server\src\globalaccess\RedirectGSGRequestThread.java:160:
warning: sun.misc.BASE64Encoder is Sun proprietary API and may be removed in a future release
[javac]      s2 = "Basic " + (new BASE64Encoder()).encode(s2.getBytes());
[javac]      ^
Any help appreciated.

Can someone help me in telling from which release this Sun API's will be removed. I answered that. No. Nobody can help you. What Sun say here is '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.' There's no statement there that they will be removed, and certainly no implication that there is a single release in which they will all be removed at the same time.
So as of now we can migrate to JDK 1.6.0_13 ignoring warnings msgs. Will there be any problem in still using the same api's?I answered that too.
Does this API's work in JDK 1.7 and from where can I download JDK 1.7?You will have to test it yourself. Google will find it for you.
Is there any alternate API to get the user agent string of sun.net.www.protocol.http.HttpURLConnection.userAgentI answered that. You don't need it in a CONNECT command.

Similar Messages

  • Req Help for  "warning: sun.misc.SignalHandler is Sun proprietary API "

    Hi All,
    I am getting the below exception when i am building the class. Please guide me and please provide any alternate solution for this.
    [javac] main\SignalHandler.java:35: warning: sun.misc.SignalHandler is Sun proprietary API and may be removed in a future release
    [javac] implements sun.misc.SignalHandler
    [javac] ^
    [javac] main\SignalHandler.java:69: warning: sun.misc.Signal is Sun proprietary API and may be removed in a future release
    [javac] public void handle( final sun.misc.Signal signal )
    [javac] ^
    [javac] auditlog\core\AuditLogFileWriter.java:26: warning: com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable is Sun proprietary API and may be removed in a future release
    [javac] public static Hashtable writingStatus=new Hashtable();
    [javac] ^
    [javac] ftpcommon\ftp\PasswordEnDecrypt.java:156: warning: sun.misc.BASE64Encoder is Sun proprietary API and may be removed in a future release
    [javac] return new sun.misc.BASE64Encoder().encode(enc);
    [javac] ^
    [javac] ftpcommon\ftp\PasswordEnDecrypt.java:182: warning: sun.misc.BASE64Decoder is Sun proprietary API and may be removed in a future release
    [javac] byte[] dec = new sun.misc.BASE64Decoder().decodeBuffer(str);
    [javac] ^
    [javac] ftpcommon\main\SignalHandler.java:57: warning: sun.misc.Signal is Sun proprietary API and may be removed in a future release
    [javac] sun.misc.Signal.handle( new sun.misc.Signal(signalName), this );
    [javac] ^
    [javac] main\SignalHandler.java:57: warning: sun.misc.Signal is Sun proprietary API and may be removed in a future release
    [javac] sun.misc.Signal.handle( new sun.misc.Signal(signalName), this );
    Thanks & Regards,
    Rajeshwar
    Edited by: Rajeshwar_Java on Apr 27, 2009 5:31 AM
    Edited by: Rajeshwar_Java on Apr 27, 2009 5:32 AM

    as corlettk already told you: avoid those API whenever possible.
    Regarding your cases:
    * SignalHandler: proprietary API, there's not alternative. Use it if you must. Fail gracefully if it isn't there
    * Hashtable: seems like you simply picked the wrong one. Use the one in java.util
    * Base64 stuff: Plenty of free (BSD licensed) implementations out there, I'm sure there's one in commons-codec as well. Use those instead.

  • Com.sun.corba.se.impl.orb.ORBImpl is Sun proprietary API and may be removed

    hi again,
    i have a question
    what this means?
    com.sun.corba.se.impl.orb.ORBImpl is Sun proprietary API and may be removed in a future release

    The message means that you are using stuff that you shouldn't be using. Sun may remove that stuff from future versions of Java which will break your code/application/library.

  • Deprecated and internal proprietary API in Java

    Hi, all
    I'm facing a problem right now that our product is near to the ending of the life cycle and won't t have big release from 2013. Hence we are thinking that the JRE/JDK in the product should be stable enough and will not have significant change in the future. After a checking of the latest load build of the product with JDK1.7.0_09, we found that we did have many warnings regarding to the Deprecated API and internal proprietary API like ORB, ORBSocketFactory, IIOPProfileTemplate etc.
    So, I'm doubting...should I find the way to replace those Deprecated and internal proprietary APIs? Is it really necessary? Where can I find APIs to replace them? Any documents?
    I have been frustrated with the doubt for long time, hopefully anyone can help me.
    Thanks in advanced.

    anyone can shed me the lights?

  • Exploratory Programming of the Sun IDM API

    Exploratory Programming of the Sun IDM API using Rhino
    Sun IDM comes with a JavaScript interpreter (Rhino) that can be invoked from the command-line. This gives developers an easy way to explore the large number of classes that comprised the product.
    Let's say for example that you need the approvers of a role object in order to display them on a form. (The role view provides this information, but let's ignore this for the purpose of this example.) The role javadoc mentions two methods to get the approvers, getApproverRefs() and getApprovers(). Unfortunately they are not described clearly, and the difference between the two is not clear either.
    In order to understand what these methods do and what they return, you can use the interpreter to invoke each one directly.
    First start the interpreter with the 'lh.bat js' command:
    lh.bat jsYou will be greeted with the javascript prompt "js>"
    Then the first thing to do is to login to the application server. Copy-paste the following code into the shell interpreter.
    // Java packages are prepended with the word 'Packages'
    // and are imported using the 'importPackage' function
    importPackage(Packages.com.waveset.util);
    importPackage(Packages.com.waveset.object);
    importPackage(Packages.com.waveset.security.authn);
    importPackage(Packages.com.waveset.session);
    importPackage(Packages.com.waveset.ui);
    importPackage(Packages.java.util);
    // Use arguments[0] and arguments[1] if you want to pass credentials from the command line
    // Here we just use the built-in account "configurator"
    var epass = new EncryptedData("configurator");
    var session = SessionFactory.getSession("configurator", epass);
    print("Waveset session established");Alternatively save the above code to a text file called "idm-init.js" and load the file from the interpreter.
    js> load("idm-init.js")
    Waveset session establishedOnce a session has been established, objects can be loaded from the repository. Enter this line at the prompt to get the role object named "testrole3"
    js> var roleObject = session.getObject("Role", "testrole3");Enter the variable name at the prompt to cause the interpreter to invoke the object's 'toString' method.
    js> roleObject
    Role:testrole3Use a 'for' loop to print out all of the object's method and fields.
    js> for (i in roleObject) { print(i) }Enter a method's name to invoke it. Let's call getApproverRefs().
    js> var approvers1 = roleObject.getApproverRefs();
    js> approvers1
    [User:role1approver(id=#ID#1CC1759638D9AF96:182C132:10F3E8040B5:-7FBE), User:role2approver(id=#ID#1CC1759638D9AF96:182C132:10F3E8040B5:-7FB8)]
    js> approvers1.get(0).getClass();
    class com.waveset.object.ObjectRefNow let's check out getApprovers().
    js> var approvers2 = roleObject.getApprovers();
    js> approvers2
    [Lcom.waveset.object.WSUser;@d3c69c
    js> approvers2[0].getClass()
    class com.waveset.object.WSUserSo getApproverRefs() returns a list of ObjectRef objects, while getApprover() returns an array of WSUser objects.
    In summary the Sun IDM JavaScript interpreter can be used to explore the product's vast API. This article used the role class and its getApprovers() and getApproverRefs() methods as an example for exploratory programming. Other applications include automated testing and administrative scripts.
    [email protected]

    Yes you can customise IDM it is all available in courses and the manuals also provide some info.
    As long as you can write the code you need in java or javascript you can call it from IDM: that could be an interface to you naming app.
    Otherwise use the SPML interface if you want to use something else then the GUI. This is also described in the manuals.
    WilfredS

  • Where can I get a java API specification for jdk 6 update 7?

    Where can I get a java API specification for jdk 6 update 7?
    About jdk-6u7-windows-i586-p.exe

    Flying_eagle wrote:
    I don't know what is it called. I think maybe it's a specification about api that lists java api and explains how to use them.
    Such as a html file just like a dictionary.Well, the API documentation I posted a link of in reply #1 is not an explanation of how to use the Java classes. It is more a reference. When you need a thorough explanation, I recommend doing some tutorials, or buying a book.

  • Com.sun.messaging API reference

    Does somebody has a link to online com.sun.messaging API reference?

    Once you downloaded the product, you have the javadoc in there. You can also have a version of the complete source from here:
    https://mq.dev.java.net/
    As OpenMQ...
    HTH
    TE

  • Java Card / SIM Card proprietary APIs

    Hello all,
    I am finishing my graduation on Informatics Engineering and my final thesis is about Smart Cards.
    In the thesis I have to present all the development solutions available to create Smart Cards and SIM Cards applications
    This way, i not only have to talk about Java Card API and SIM Toolkit, but also about the UICC and USIM toolkit and about proprietary APIs, like Gemalto, G&D, etc APIs.
    I have searched on the web about proprietary APIs, or special events/features to each types of cards but I couldn't get any documentation on this. Of course if they are proprietary I am not expecting to get the implementation or the code of it, but I just need any documentation about these APIs, or any description about the methods or events on them.
    So, did any of you guys already used any proprietary APIs? or have any information about any proprietary API?
    Thank you very much,
    Helri

    Hi Joseph, thank you for your response, i'll search for .NET cards and for PKCS#15 cards as well.
    That was a great help, thank you

  • No Sun Studio 12 warning message for bitfield sizes?

    Hi,
    Does Sun Studio 12 support GCC bitfield sizes?
    The FAQ for version 11 (http://www.genunix.org/wiki/index.php/Sun_and_GCC_Compiler_Portability) specifially says Sun Studio does not support it. But I do not get any warning message, with any version I have tested (10 & 12). Am I missing some compiler flag or is the C compiler just silently ignoring those?
    Thanks!

    ok I have just found that the -Xc option gives me the following warning:
    warning: nonportable bit-field type
    Does that mean that the compiler is understanding this, but just warning me that this is not portable across different platforms? This would be acceptable in my case...
    Thanks!

  • Sun Studio 11 Warning raised after new compiler upgrade

    Hi All,
    I have an issue regarding the warning raised by new complier upgrade.
    Sun Studio 11 is the product and OS is Solaris 8.The following are the warning messages after successful compilation
    1. Warning: declarator required in declaration
    2. Warning: Last line in file "../inc/bibbnote.h" is not terminated with a newline
    Please advise me on the above issue wheather the above warnings can be ignored.
    Regards
    Vinoth
    Message was edited by:
    vinothsankar

    Those lines are not valid C++, since no typedef name is provided. Sun C++ accepts them as an extension, but issues a warning because the code is not valid.
    Examples:
    typedef int Int;
    Int is declared to be a synonym for int.
    typedef int;
    Invalid: no name is provided as a synonym for int.
    enum Foo { a, b, c};
    Foo is declared to be an enumerated type with enumerators a, b, c.
    Typedef Foo Bar;
    Bar is declared to be a synonym for Foo
    typedef enum { d, e, f } E1;
    E1 is a synonym for the unnamed enumerated type with enumerators d, e, and f. This is a C style declaration, which serves no useful purpose in C++.
    typedef enum E2 { g, h, i } E3;
    E2 is declared to be an enumerated type with enumerators g, h, i, and a synonym E3.
    typedef enum E4 { j, k, l };
    Invalid declaration. No name is provided as a synonym for E4. Remove the "typedef" and you have a valid declaration of E4 as an enumerated t ype.
    References: C++ Standard, sections
    7.1.3 The typedef specifier
    7.2 Enumeration declarations

  • Sun V240 Server Warning Light (Amber)

    Hi.
    I have an amber 'Tools' warning light on a V240 Sun server (Sol 8) with an S1 3x Disk array connected.
    The S1 disk array is fine all disks ok.
    Can anyone tell me how I can check what the amber light means from a command prompt or any other method.
    I am not at the site at present and cannot physically see the server but can remote telnet to the server.
    Thanks
    Darren

    Well, you can look for warning messages in /var/adm/messages.
    Its also worth looking through the output of /usr/platform/`uname -i`/sbin/prtdiag -v

  • Ginga-J Sun specific API's

    Hi All,
    Am not sure if this is the right to place my query about Ginga API . I did not find any specific forum group where I could post this. Hence this is here.
    Am into developing middleware for ginga. Sun has taken up the activity of developing API's for Ginga-J middleware, as there was an issue regarding rights with
    DVB consortium. Has anyone got any idea regarding whether any development is going on from the part of Sun and if so at which level is it now?
    When will Sun publish the API's ?
    Thanks in advance

    Hello.
    We have received the 1st public release of Ginga-J with a small Java DTV implementation.
    Please, read my post:
    [http://translate.google.com/translate?prev=hp&hl=pt-BR&js=n&u=http://b4dtv.blogspot.com/2009/06/fisl-10-agora-com-ginga-j-o-novo-com.html&sl=pt&tl=en&history_state0=]
    Original, in Brazillian Portuguese:
    FISL 10: agora com Ginga-J... o novo, com Java DTV(?)
    [http://b4dtv.blogspot.com/2009/06/fisl-10-agora-com-ginga-j-o-novo-com.html]
    Regards,
    Marcos Henke
    http://b4dtv.blogspot.com
    http://groups.google.com/devdtv

  • Sun Studio 11 "Warning (Anachronism)"

    Hello,
    Compiling a C++ program using Sun Studio 11 compiler on Solaris, I get warnings like this:
    Warning (Anachronism): Using blabla(*)(<params>) to initialize extern "C" blabla(*)(<params>).
    For example, this happens passing a callback of type jvmtiHeapObjectCallback to IterateOverHeap (both defined in Sun's jvmti.h):
    typedef jvmtiIterationControl (JNICALL *jvmtiHeapObjectCallback)
    (jlong class_tag, jlong size, jlong* tag_ptr, void* user_data);
    jvmtiError (JNICALL IterateOverHeap) (jvmtiEnv env,
    jvmtiHeapObjectFilter object_filter,
    jvmtiHeapObjectCallback heap_object_callback,
    const void* user_data);
    What does this warning mean?
    I checked that JNICALL is defined in Solaris jni_md.h as empty string, so it seems strange for me that the compiler wants extern "C" here.
    The same code compiles with no problems on Solaris with gcc, as well as with Visual Studio on Windows and with gcc on Linux and Mac.
    Best regards,
    Anton

    Thank you for your prompt reply.
    In the guide, it is said:
    "The Sun implementation of C and C++ function linkage is binary-compatible. That is not the case with every C++ implementation, although it is reasonably common".
    I believe that for all other platforms that we support - Linux, Mac OS X, Windows - the only difference in C and C++ linkage is C++ name mangling.
    I'm not 100% sure (just curious, do you know any implementations where C and C++ functions are not linkage compatible?), but there never were runtime problems with such C/C++ function mixing in our code.
    Actually, the mixing happens in our code because we declare class with single static function (callback implemetation) right in the function where function requiring callback parameter is used. This is similar to Java anonymous classes, and helps to write simpler code (especially when callback code is short, and there are many different callbacks in different places of the code):
    void qqq() {
    struct Tmp {
    static void myCallback() { ... }
    foo(&Tmp::myCallback);
    So, unfortunately, the offered solutions (wrapping) will not work in our case, unless we simply rewrite our callbacks as regular C functions.
    Is there a compiler option (or a pragma) to suppress this warning?

  • Incorrect warning in JDK 5.0 RC

    I get the following warning
    warning: [unchecked] unchecked assignment to variable _cleanValue of raw type class com.globalrefund.db.psql.PsqlRow.ColumnImpl
    for this statement:
    column._cleanValue = null;
    I think there should never be a warning when I set a reference to null (or do I miss something)

    Alternatively - does it make sense for the compiler to NOT issue the warning for one particular expression that evaluates to the only value that could be determined safe?
    It IS an assignment, and it IS unchecked, even tho', for this 1 particular value of the RHS, it will not cause a problem.
    Even tho' for this particular RHS expression , the compiler could determine that the warning was not necessary, there are many other RHS expressions that evaluate to null where the compiler could not determine that.
    If the language started incorporating special rules for these sorts of corner cases then I suggest the following would result
    * The compiler would get more complex (i.e. more bugs - slower execution)
    * The language spec would get more complex (i.e. more reading and understanding required)
    With regard to the supplied code the actual coding "imperfection" ( I won't call it an error), is not even on this line, and at least the message gives you early warning that something is not 100% right with your code.
    If you later copy and paste that loop and start assigning something else, you will heading into a danger zone.
    You may have spent quite a bit some time determining that that you didn't really need the type argument on the loop variable, and it is a bit frustrating that that effort was wasted - however I would suggest that you embrace this message as a friend rather than as an enemy.

  • SetJPEGEncodeParam method not found in JPEGImageEncoder jdk 1.5 and jdk 1.6

    Hi,
    We are group of students working on college project.
    We want to capture webcam and show stream on screen.
    We are using JMF and class JPEGImageEncoder.
    Here we are getting setJPEGEncodeParam method not found error.
    Please see detail error message and source code attached below.
    Thanks in advance.
    Regards,
    Vinayak & Surendra
    // Error and Warnings
    SwingCapture.java:125: warning: com.sun.image.codec.jpeg.JPEGImageEncoder is Sun proprietary API and may be removed in a future release
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
    ^
    SwingCapture.java:125: warning: com.sun.image.codec.jpeg.JPEGCodec is Sun proprietary API and may be removed in a future release
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
    ^
    SwingCapture.java:126: warning: com.sun.image.codec.jpeg.JPEGEncodeParam is Sun proprietary API and may be removed in a future release
    JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
    ^
    SwingCapture.java:128: cannot find symbol
    symbol : method setJPEGEncodeParam(com.sun.image.codec.jpeg.JPEGEncodeParam)
    location: class com.sun.image.codec.jpeg.JPEGImageEncoder
         encoder.setJPEGEncodeParam(param);
    ^
    1 error
    3 warnings
    // Source code
    import javax.swing.*;
    import javax.swing.event.*;
    import java.io.*;
    import javax.media.*;
    import javax.media.format.*;
    import javax.media.util.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import com.sun.image.codec.jpeg.*;
    public class SwingCapture extends Panel implements ActionListener
    public static Player player = null;
    public CaptureDeviceInfo di = null;
    public MediaLocator ml = null;
    public JButton capture = null;
    public Buffer buf = null;
    public Image img = null;
    public VideoFormat vf = null;
    public BufferToImage btoi = null;
    public ImagePanel imgpanel = null;
    public SwingCapture()
    setLayout(new BorderLayout());
    setSize(320,550);
    imgpanel = new ImagePanel();
    capture = new JButton("Capture");
    capture.addActionListener(this);
    String str1 = "vfw:Logitech USB Video Camera:0";
    String str2 = "vfw:Microsoft WDM Image Capture (Win32):0";
    di = CaptureDeviceManager.getDevice(str2);
    ml = di.getLocator();
    try
    player = Manager.createRealizedPlayer(ml);
    player.start();
    Component comp;
    if ((comp = player.getVisualComponent()) != null)
    add(comp,BorderLayout.NORTH);
    add(capture,BorderLayout.CENTER);
    add(imgpanel,BorderLayout.SOUTH);
    catch (Exception e)
    e.printStackTrace();
    public static void main(String[] args)
    Frame f = new Frame("SwingCapture");
    SwingCapture cf = new SwingCapture();
    f.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    playerclose();
    System.exit(0);}});
    f.add("Center",cf);
    f.pack();
    f.setSize(new Dimension(320,550));
    f.setVisible(true);
    public static void playerclose()
    player.close();
    player.deallocate();
    public void actionPerformed(ActionEvent e)
    JComponent c = (JComponent) e.getSource();
    if (c == capture)
    // Grab a frame
    FrameGrabbingControl fgc = (FrameGrabbingControl)
    player.getControl("javax.media.control.FrameGrabbingControl");
    buf = fgc.grabFrame();
    // Convert it to an image
    btoi = new BufferToImage((VideoFormat)buf.getFormat());
    img = btoi.createImage(buf);
    // show the image
    imgpanel.setImage(img);
    // save image
    saveJPG(img,"c:\\test.jpg");
    class ImagePanel extends Panel
    public Image myimg = null;
    public ImagePanel()
    setLayout(null);
    setSize(320,240);
    public void setImage(Image img)
    this.myimg = img;
    repaint();
    public void paint(Graphics g)
    if (myimg != null)
    g.drawImage(myimg, 0, 0, this);
    public static void saveJPG(Image img, String s)
    BufferedImage bi = new BufferedImage(img.getWidth(null),
    img.getHeight(null), BufferedImage.TYPE_INT_RGB);
    Graphics2D g2 = bi.createGraphics();
    g2.drawImage(img, null, null);
    FileOutputStream out = null;
    try
    out = new FileOutputStream(s);
    catch (java.io.FileNotFoundException io)
    System.out.println("File Not Found");
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
    JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
    param.setQuality(0.5f,false);
    encoder.setJPEGEncodeParam(param);
    try
    encoder.encode(bi);
    out.close();
    catch (java.io.IOException io)
    System.out.println("IOException");

    JPEGImageEncoder isn't a JMF class...so this isn't a JMF question. You need to go to the appropriate forum, which would be Java2D, I believe.
    Also, is there a specific reason you're not just capturing from your web camera directly?

Maybe you are looking for