jdk-internal-api

Build warnings regarding using Sun proprietary API

允我心安 提交于 2019-12-12 11:15:44
问题 I am trying to clean up my build environment and have discovered a couple of warnings reported around usage of Sun proprietary API's. [javac] /workspace/<path-to-files>/Handler.java:18: warning: sun.net.www.protocol.http.Handler is Sun proprietary API and may be removed in a future release [javac] public class Handler extends sun.net.www.protocol.http.Handler { [javac] ^ [javac] /workspace/<path-to-files>/HttpClient.java:16: warning: sun.net.www.http.HttpClient is Sun proprietary API and may

With what should I replace sun.awt.shell.ShellFolder so I don't get compile warnings?

夙愿已清 提交于 2019-12-11 02:56:54
问题 I have a method using sun.awt.shell.ShellFolder.get("fileChooserComboBoxFolders"); which I want to replace (or suppress the warning if possible). Can I replace it with anything not Sun properietary so it doesn't throw warnings on some possible removals? -- UPDATE: not sure if the code is needed at all. It's in a legacy code and I was asked to remove all compile warnings. The one particular with the ShellFolder goes the following: new Thread { public void run() { ShellFolder.get(

Should I be concerned using AWTUtilities.setWindowShape()?

三世轮回 提交于 2019-12-06 05:29:26
问题 I am using the AWTUtilities class in my application to create custom window shapes. As far as I know, there is no other way to do it. It is a requirement. The javadoc generation gives me this error: warning: com.sun.awt.AWTUtilities is Sun proprietary API and may be removed in a future release What exactly does this mean? I can use it, but it may stop working with any release? Why put it in, then? More importantly, and the real question here, if Sun takes it out, will they likely replace it

Should I be concerned using AWTUtilities.setWindowShape()?

不想你离开。 提交于 2019-12-04 10:10:26
I am using the AWTUtilities class in my application to create custom window shapes. As far as I know, there is no other way to do it. It is a requirement. The javadoc generation gives me this error: warning: com.sun.awt.AWTUtilities is Sun proprietary API and may be removed in a future release What exactly does this mean? I can use it, but it may stop working with any release? Why put it in, then? More importantly, and the real question here, if Sun takes it out, will they likely replace it with another way to do the same thing? Is that what the warning is for? I suppose I could just check for

jdk7: sun.font.fontManager replacement/how to get filename information from fontname

萝らか妹 提交于 2019-12-01 05:05:48
Using Oracle(Sun) JDK6 and trying to move to Oracle JDK7 I am using sun.awt.GraphicsEnvironment to find all system fonts in order to use them to change pdf font used in my pdf file. Here is the exact code I am using: GraphicsEnvironment gEnv = GraphicsEnvironment.getLocalGraphicsEnvironment(); // get all system fonts final Font[] fonts = gEnv.getAllFonts(); After that I will need to get the exact font file path on the system, so I use: FontManager.getFontPath(true) + "/" + FontManager.getFileNameForFontName(font_name); The problem now is that sun.font.FontManager is no longer a class and has

jdk7: sun.font.fontManager replacement/how to get filename information from fontname

时光总嘲笑我的痴心妄想 提交于 2019-12-01 02:11:19
问题 Using Oracle(Sun) JDK6 and trying to move to Oracle JDK7 I am using sun.awt.GraphicsEnvironment to find all system fonts in order to use them to change pdf font used in my pdf file. Here is the exact code I am using: GraphicsEnvironment gEnv = GraphicsEnvironment.getLocalGraphicsEnvironment(); // get all system fonts final Font[] fonts = gEnv.getAllFonts(); After that I will need to get the exact font file path on the system, so I use: FontManager.getFontPath(true) + "/" + FontManager