java-7

Java 7 does not support ciphers which should be supported

隐身守侯 提交于 2019-12-13 00:49:23
问题 I need connect to foreign server via client side in JAX-WS. Client side run on Wildfly 8. With Java 8 is connection ok. But I have problem with connect to server in Java 7 (I tried u45,67,79). Properties of server side security is https://www.ssllabs.com/ssltest/analyze.html?d=app.bundesnetzagentur.de In part "Cipher Suites" are four ciphers. GCM ciphers should not be supported in Java 7 by source http://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html#footnote1-1

Java WatchService on Windows informing of folder creation before contents have been copied

拟墨画扇 提交于 2019-12-12 22:36:56
问题 I'm trying to use Java 7 and WatchService to monitor when folders are added to a folder (by being copied from a different location), then I want to act on the files within the newly created folder. On OSX it works as I expect, I don't receive notification of new folder creation until the folder and its contents have been copied over. But on Windows I receive the key event on the folder creation before the contents of the folder have been copied so when I try to process the files within the

Setting standalone = 'YES' using XMLEventWriter

血红的双手。 提交于 2019-12-12 21:38:18
问题 I'm using 'XMLEventWriter' to generate an XML file in Java. Code snippet is as below: XMLEventWriter writer = outputFactory.createXMLEventWriter(new FileWriter(outFile)); XMLEvent startEvent = eventFactory.createStartDocument("UTF-8","1.0",true); writer.add(startEvent); In spite of setting the third argument to 'true', I'm seeing that the generated XML document's header does not have standalone="YES" Could anyone suggest the changes (if any) to be made to make standalone="yes" appear in the

JDK7 SSL conenction Issue Ignoring unsupported cipher suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256

做~自己de王妃 提交于 2019-12-12 19:43:29
问题 I am making a SSL connection (as client) and according to this Oracle article the following two cypher suits are supported in JDK7 if you use TLSv1.2 and enable the Strong version of the jurisdiction policy. TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 However the two cypher algorithms are ignored when making secure connection. Ignoring unsupported cipher suite: TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 Ignoring unsupported cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC

Drools Java 7 support in Eclipse

六月ゝ 毕业季﹏ 提交于 2019-12-12 18:24:02
问题 I created a Drools project in Eclipse (Indigo) configured to use JRE 1.7. But I get an error pointing to my .drl file: com/sample/DroolsTest$Message : Unsupported major.minor version 51.0 The com.sample.DroolsTest.Message class is imported by the .drl file. The Drools runtime was 5.2.1 (also tried with 5.3.0.Final). Any help would be appreciated. Thanks. 回答1: This exception doesn't seem to have to do anything with Drools in particular, but is a generic Java error. It occurs if you try to

Return intersection of generic types

送分小仙女□ 提交于 2019-12-12 14:25:50
问题 I would like to have a function return an object that is guaranteed to implement two interfaces. The exact object is not necessarily known at compilation time. My code looks something like: class HelloWorld { public interface A {} public interface B {} public static class C implements A, B {} public static class D implements A, B {} public static <T extends A & B> void g(T t) {} public static <T extends A & B> T f(boolean b) { if (b) return new C(); // Doesn't compile return new D(); // Doesn

Sun.security cannot be found after upgrading Java

点点圈 提交于 2019-12-12 13:34:49
问题 I have an application created with Play 2.0. I implemented scribe-java library to use some OAuth services. Until today everything was fine but when I upgrade jdk and reboot the server I couldn't use scribe-java library. It seems it uses some classes like sun/security/pkcs11/P11Key and sun/security/pkcs11/Length in sun.security package but couldn't find it. "java -version" returns this: java version "1.7.0_03" OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu3) OpenJDK

Debugging RxJava zip operator that halts

大兔子大兔子 提交于 2019-12-12 13:19:29
问题 Writing in Java I call zip() method that receives a few method that return an Observable<...>. Currently I am not able to progress to the following map and this is probably due to the fact that one of the methods didn't return a value yet. (Though it seems all methods where called.) Is there a way to debug the process and see why it is stuck? Thanks. 回答1: Suppose you have: result = Observable.zip(sourceA, sourceB, sourceC) Just add a .doOnNext() on each of the sources to log what they are

JAVA 7 watch service

こ雲淡風輕ζ 提交于 2019-12-12 12:37:31
问题 How can I have the watch service process any files that are in the directory on when the application starts up? I already have the application running, but I noticed that only new files that are dropped in the directory are processed but files that were there from the start are ignored. 回答1: I have the same use case here and I am surprised that I did not find much useful online for such common scenario. I see some problems on the below approach. Let's say we utilize the walkTree method to

How to move directories using jdk7

牧云@^-^@ 提交于 2019-12-12 11:26:21
问题 Using jdk7 , I am trying to use the java.nio.file.Files class to move an empty directory, let's say Bar , into another empty directory, let's say Foo Path source = Paths.get("Bar"); Path target = Paths.get("Foo"); try { Files.move( source, target, StandardCopyOption.REPLACE_EXISTING); } catch (IOException e) { e.printStackTrace(); } After executing that code snippet, I expected that the Bar directory would be in the Foo directory ( ...\Foo\Bar ). Instead it is not. And here's the kicker, it's