jdk6

How to tell why a file deletion fails in Java?

让人想犯罪 __ 提交于 2019-12-17 05:07:57
问题 File file = new File(path); if (!file.delete()) { throw new IOException( "Failed to delete the file because: " + getReasonForFileDeletionFailureInPlainEnglish(file)); } Is there a good implementation of getReasonForFileDeletionFailureInPlainEnglish(file) already out there? Or else I'll just have to write it myself. 回答1: In Java 6, there is unfortunately no way to determine why a file cannot be deleted. With Java 7, you can use java.nio.file.Path#delete() instead, which will give you a

Android SDK installation doesn't find JDK

与世无争的帅哥 提交于 2019-12-16 20:14:16
问题 I'm trying to install the Android SDK on my Windows 7 x64 System. jdk-6u23-windows-x64.exe is installed, but the Android SDK setup refuses to proceed because it doesn't find the JDK installation. Is this a known issue? And is there a solution? 回答1: Press Back when you get the notification and then Next . This time it will find the JDK . 回答2: Actual SETUP: OS : Windows 8.1 JDK file: jdk-8u11-windows-x64.exe ADT file: installer_r23.0.2-windows.exe Install the x64 JDK , and try the back-next

JDK6开发原生webservice

随声附和 提交于 2019-12-04 00:57:38
webservice接口开发有用到Axis2、XFire、CXF等框架发布通过获取相关的wsdl文件即可实现远程通讯数据交互。 Axis2配合相关的IDE生成服务并发布到服务器上面相当简单和根据选择其中之一的wsdl引擎生成客户端调用java类,感觉类库jar包比较庞大应用起来也比较复杂。 XFire是比较强大的webservice框架,容易与web容器整合,以及spring提供整合支持。 CXF是apache收购XFire后改造产物,功能也相当强大。 而JDK6自带了webservice特性,可以不使用web容器,深感部署之简单,真正的轻量级,可以使你集中尽力解决服务端的相关功能设计与实现。 下面介绍JDK6自带的Webservice特性例子: IDE:eclipse javaee版 新建一个java工程后,建如下类即可简单实现webservice: package com.ws; import javax.jws.WebService; import javax.xml.ws.Endpoint; @WebService public class Helloword { public String sayHello() { return "helloworld"; } public static void main(String[] args) { /

JDK6: when to use bundled JAX-WS implementation versus Project Metro

Deadly 提交于 2019-11-30 07:32:02
JAX-WS implementation bundled with JDK6 can be used to provide a web services server without any additional libraries. JVM will start with a WS server on a specified port. http://java.sun.com/developer/technicalArticles/J2SE/jax_ws_2/ http://java.sun.com/developer/technicalArticles/J2SE/jax_ws_2_pt2/ The question I have is how does this differ from project Metro? If the end goal is to host web services inside tomcat, then can I still use bundled functionality and then just redirect to this bundled ws server or is it better to deploy the metro servlet? SimonSez As far as I know JAX-WS is only a

Using transparent window in both Java 6 and Java 7

只愿长相守 提交于 2019-11-29 10:39:09
I'm developing application in Java 6 (1.6.0_24) which using transparent JFrame to get disappearing animation. Here is my code: public static void slowDisappearWindowAction(Window source, int milisSlow, int milisFast) throws InterruptedException{ float level = 1.0f; //slow effect -> 50% for(int i=0; i<8 ; i++){ level=level-0.05f; AWTUtilities.setWindowOpacity(source,level); Thread.sleep(milisSlow); } //fast effect -> 0% for(int i=0; i<8 ; i++){ level=level-0.05f; AWTUtilities.setWindowOpacity(source,level); Thread.sleep(milisFast); } AWTUtilities.setWindowOpacity(source,0.1f); } It works fine

JDK6: when to use bundled JAX-WS implementation versus Project Metro

╄→гoц情女王★ 提交于 2019-11-29 09:59:05
问题 JAX-WS implementation bundled with JDK6 can be used to provide a web services server without any additional libraries. JVM will start with a WS server on a specified port. http://java.sun.com/developer/technicalArticles/J2SE/jax_ws_2/ http://java.sun.com/developer/technicalArticles/J2SE/jax_ws_2_pt2/ The question I have is how does this differ from project Metro? If the end goal is to host web services inside tomcat, then can I still use bundled functionality and then just redirect to this

Using transparent window in both Java 6 and Java 7

两盒软妹~` 提交于 2019-11-28 04:07:34
问题 I'm developing application in Java 6 (1.6.0_24) which using transparent JFrame to get disappearing animation. Here is my code: public static void slowDisappearWindowAction(Window source, int milisSlow, int milisFast) throws InterruptedException{ float level = 1.0f; //slow effect -> 50% for(int i=0; i<8 ; i++){ level=level-0.05f; AWTUtilities.setWindowOpacity(source,level); Thread.sleep(milisSlow); } //fast effect -> 0% for(int i=0; i<8 ; i++){ level=level-0.05f; AWTUtilities.setWindowOpacity

How to tell why a file deletion fails in Java?

我只是一个虾纸丫 提交于 2019-11-26 20:51:45
File file = new File(path); if (!file.delete()) { throw new IOException( "Failed to delete the file because: " + getReasonForFileDeletionFailureInPlainEnglish(file)); } Is there a good implementation of getReasonForFileDeletionFailureInPlainEnglish(file) already out there? Or else I'll just have to write it myself. In Java 6, there is unfortunately no way to determine why a file cannot be deleted. With Java 7, you can use java.nio.file.Path#delete() instead, which will give you a detailed cause of the failure, if the file or directory cannot be deleted. Note that file.list() may return entries

Does Android support JDK 6 or 7 [duplicate]

人盡茶涼 提交于 2019-11-26 18:44:14
This question already has an answer here: diamond operator is not supported [duplicate] 4 answers I am new to Android development. Can I use my existing Java code developed using JDK 7 in Android? The functions use xerces dom and xslt and xpathapi. Currently when I installed Android Eclipse ADT environment these functions are not compiling. I would also like to know whether an Android device itself supports JRE 6 or 7? Muhammad Annaqeeb Originally Android development tools supported only jdk 6 features. But that was changed, first by Android Studio 0.3.2 in October 2013 see: http://tools

Does Android support JDK 6 or 7 [duplicate]

给你一囗甜甜゛ 提交于 2019-11-26 08:56:18
问题 This question already has answers here : diamond operator is not supported [duplicate] (4 answers) Closed 4 years ago . I am new to Android development. Can I use my existing Java code developed using JDK 7 in Android? The functions use xerces dom and xslt and xpathapi. Currently when I installed Android Eclipse ADT environment these functions are not compiling. I would also like to know whether an Android device itself supports JRE 6 or 7? 回答1: Originally Android development tools supported