java-7

Eclipse CVS extssh broken under Windows 7 + Java 7

北城以北 提交于 2019-12-03 16:29:42
I'm running Windows 7 64-bit. After installing Java 7 (part of PS3 media server) when I was previously using Java 6, my Eclipse (Indigo Service Release 2, Build id: 20120216-1857) CVS stopped working to the server that's on a VPN. I connect using Cisco AnyConnect VPN Client Version 2.5.2019. The error I get whenever I try to connect to a repository is the following: Could not connect to :extssh:username@example.com:/cvsroot/username/project: CVS communication error: org.eclipse.team.internal.ccvs.ssh2.CVSSSH2ServerConnection$SSH2IOException: Permission denied: connect Permission denied:

Why is the catch parameter implicitly final?

青春壹個敷衍的年華 提交于 2019-12-03 16:09:37
catch (IOException|SQLException ex) { logger.log(ex); throw ex; } here why is ex implicitly final? What is the use of making ex implicitly final? It's implicitly final because it does not make sense for you to change the object pointed to by ex , especially in this case where it could be either an IOException or an SQLException , and thus the (static) assignment typing would be difficult to figure out by the compiler. 来源: https://stackoverflow.com/questions/7737257/why-is-the-catch-parameter-implicitly-final

Why can't we switch on classes in Java 7+?

浪子不回头ぞ 提交于 2019-12-03 15:45:27
It seems to me that such a switch statement would make a lot of sense, but it gives a compile error : public void m(Class c) { switch (c) { case SubClassOfC1.class : //do stuff; break; case SubClassOfC2.class : //do stuff; break; } } However, classes are not supported to switch on. What is the reason why? I am not trying to workaround instanceof , it's really at the class level that I got some operations to perform, no instances there. The compile error is around SubClassOfC1 & SubClassOfC2 : constant expression required. Holger Interestingly, all answers so far are basically saying “because

Java Issue: Memory and CPU usage in MAC OS

淺唱寂寞╮ 提交于 2019-12-03 13:40:13
I am developing a javaFx application for MAC and Windows, and I found that the application is using extremely large memory and cpu usage in MAC compared to Windows. When I see my application's activity in Windows Task Manager, it shows usage of average 80MB memory and 1-2% CPU which reaches it maximum of 150MB and 12-15% CPU. On the other hand in MAC Activity Monitor the same application shows 150MB and 12-15% CPU at starting and increases continuously beyond 1GB and 90%CPU. This is a very strange problem I found in my JavaFX application. I even tested this for simple java application and

Is it possible to use Java 7 with IBM WebSphere Application Server 8.5 Trial

你离开我真会死。 提交于 2019-12-03 12:20:45
I have installed WAS 8.5 Trial version on Windows 7. I would like to deploy and run Java 7 application. Is it possible to do it? I can not see "IBM WebSphere SDK for Java Technology Edition 7" in the IBM Installation Manager's feature list and there is no SDK 7 installed, yet. >managesdk.bat -listAvailable CWSDK1003I: Available SDKs : CWSDK1005I: SDK name: 1.6_64 CWSDK1001I: Successfully performed the requested managesdk task. > Has somebody managed to make WAS 8.5 Trial and Java 7 work together on Windows 7? Thanks in advance! I've just found one of the possible solutions... Select the method

Kerberos broken after upgrading from Java6 to Java7

本小妞迷上赌 提交于 2019-12-03 12:10:50
问题 I have a working application using the spring-security kerberos extension, running on jboss, running java 6. I'm in the process of upgrading my jvm from java 6 to java 7. When I do that, using the same codebase and the same keytab that worked on java 6, I now receive an error when using java 7. I consistently receive: java.security.PrivilegedActionException: GSSException: Failure unspecified at GSS-API level (Mechanism level: Invalid argument (400) - Cannot find key of appropriate type to

Old projects compatible with Java 7

落花浮王杯 提交于 2019-12-03 11:32:14
My old projects use Java 6 (1.6), and I don't know when I update (Java 7), they can run fine ? There is an official list of known incompatibilities between java 6 and java 7 from Oracle (including descriptions of both binary and source-level incompatibilities in public APIs). Also you can look at the independent analysis of API changes in the Java API Tracker project: http://abi-laboratory.pro/java/tracker/timeline/jre/ The report is generated by the japi-compliance-checker tool. They should do, yes. Java has a reasonably strong history of backward compatibility. However, if these are in any

How is multi-catch implemented in Java 7?

≡放荡痞女 提交于 2019-12-03 11:25:08
How is the Java 7 compiler handling multi-catch blocks ? A naive implementation would be to generate bytecode as if multiple catch blocks are present. However, I have gathered from multiple source that this is not the case - A catch block that handles multiple exception types contributes no duplicate bytecode during compilation. So, how does it work ? Is there a new bytecode instruction that tells the JVM about multi-catch blocks ? Based on the Java Virtual Machine Specification , exceptions are compiled as follows (in summary): try code is run normally each catch block is compiled as if it

Coldfusion 10 slower when using Java 1.7 compared to 1.6

和自甴很熟 提交于 2019-12-03 11:11:20
问题 I have a webservice running on Coldfusion 10 64bit . While investigating a memory leak I went to upgrade the JRE from 1.6 to 1.7 but noticed a significant performance hit. I had created a simple test webservice which on JRE 1.6 I could run easily at 5000 requests per minute as soon as I changed the JRE to 1.7 though this rate drops too 2000 or less per minute. Does anyone know of tuning settings or something I am missing. The preference is to use JRE 1.7 as it appears to have fixed the memory

How to implement equals with hibernate without risking losing the symmetric property?

谁说我不能喝 提交于 2019-12-03 11:10:38
After reading up on (again, should have done this a long time ago) implementing equals and hashcode correctly i came to these conclusions,that works for me: If pre JDK 7 : Prefer using Apache commons equalsbuilder and hashcodebuilder. (or Guava). Their javadocs contain examples of how to use them in good way. If JDK 7++ : Use the new Objects utility class But, If writing for hibernate some special requistes appear (see sources farther down) Amongst them are the recommended usage of instanceof instead of getClass , due to hibernate creating proxys of subclasses that are lazy-loaded. But as i