java-7

How to run Eclipse Indigo on JDK 1.7 OSX

血红的双手。 提交于 2019-12-03 10:58:57
问题 With the recently OSX JDK 7 ea release from Oracle. How to run Eclipse Indigo ? I get the following error msg: $ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/JDK 1.7.0 Developer Preview.jdk/Contents/Home $ java -version openjdk version "1.7.0-ea" OpenJDK Runtime Environment (build 1.7.0-ea-b211) OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode) $ /Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse JavaVM: requested Java version ((null)) not available. Using Java at "" instead.

Forward compatible Java 6 annotation processor and SupportedSourceVersion

帅比萌擦擦* 提交于 2019-12-03 09:41:47
I am trying out Java 7 for one project and getting warnings from annotation processors (Bindgen and Hibernate JPA modelgen) of this sort: warning: Supported source version 'RELEASE_6' from annotation processor 'org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor' less than -source '1.7' This is caused by the @SupportedSourceVersion(SourceVersion.RELEASE_6) annotation on the annotation processor classes. Since they are compiled with Java 6, the highest value of SourceVersion available to them is RELEASE_6 . The Java 7 version of SourceVersion introduces RELEASE_7 . My questions: How are

SecondaryLoop instead of SwingWorker?

a 夏天 提交于 2019-12-03 07:40:38
From the documentation for SecondaryLoop , it is not clear when you should use this new feature instead of a SwingWorker , a few examples of interesting cases would be useful. The intent of SecondaryLoop is basically the same as SwingWorker. However, using SecondaryLoop can be less hairy than chaining together multiple SwingWorkers. Take a look at Hidden Java 7 Features – SecondaryLoop for a detailed explanation & example. 来源: https://stackoverflow.com/questions/10196809/secondaryloop-instead-of-swingworker

grails 2 / groovy 2 / JDK7: how to reap the benefits?

可紊 提交于 2019-12-03 07:40:20
问题 I really love Grails but I was wondering how to get the performance benefits of Groovy 2. The question is how to configure the development and production environments in order to get that "close to Java" performance boost. So, if I setup: * JDK 7 * Groovy 2 (indie JAR to use invokedynamic) * Grails 2.2 are there any guidelines in order to really speed my webapp out-of-the-box ? And do I need to do any re-factoring in my Grails webapp codebase? I mean that dependency injection stuff like

Play Framework - can not reserve enough space for object heap

无人久伴 提交于 2019-12-03 05:47:20
I made some modifications to my play project and when I try and run it I get errors. >play run Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occured. Program will exit. Is this a common problem? I am fairly inexperienced with the play framework but I have ran my project several times before without encountering this error. Edit: Information regarding java version. >java -version java version "1.7.0_11" Java(TM) Runtime Environment (build 1.7.0_11-b21) Java HotSpot(TM)

Why does a generic cast of a List<? extends Set..> to List<Set..> succeed on Sun JDK 6 but fail to compile on Oracle JDK 7?

只谈情不闲聊 提交于 2019-12-03 05:45:48
The following code class GenericCompilationFailureDemo { List<? extends GenericCompilationFailureDemo> newList() { return new ArrayList<GenericCompilationFailureDemo>(); }; void useList() { List<GenericCompilationFailureDemo> list = (List<GenericCompilationFailureDemo>) newList(); } List<? extends Set<GenericCompilationFailureDemo>> newListOfSpecificSets() { return new ArrayList<Set<GenericCompilationFailureDemo>>(); }; void useListOfSpecificSets() { List<Set<GenericCompilationFailureDemo>> listOfSpecificSets = (List<Set<GenericCompilationFailureDemo>>) newListOfSpecificSets(); } List<?

Java 7 with emma and junit causing java.lang.VerifyError and Illegal local variable Errors

二次信任 提交于 2019-12-03 05:36:58
So I'm getting these errors [junit] Illegal local variable table length 17 in method test.nz.ac.massey.cs.sdc.log4jassignment.s06005586.AppenderLayoutTest.()V [junit] java.lang.VerifyError: Expecting a stackmap frame at branch target 11 in method test.nz.ac.massey.cs.sdc.log4jassignment.s06005586.StressTest.()V at offset 4 [junit] java.lang.ClassFormatError: Illegal local variable table length 17 in method test.nz.ac.massey.cs.sdc.log4jassignment.s06005586.AppenderLayoutTest.()V And I would like to know how I can fix it... What I've Read: Java 7 JVM VerifyError in Eclipse Testng, Emma,

How to get CPU, RAM and Network-Usage of a Java7 App

夙愿已清 提交于 2019-12-03 05:19:10
问题 I found this older article how-to-monitor-the-computers-cpu-memory-and-disk-usage-in-java and wated to ask, if there is something new in java 7. I want to get the current CPU-, RAM- and netzwork-Usage of my App periodically. It has to work for linux (mac) and windows. The data must not be extremely detailed, 3 values would be enough (cpu: 10%, Ram 4%, Network 40%). Would be cool if the data is just for the app and not the whole os-system, however this would work, too. Thank's for help 回答1:

Obfuscation causes VerifyError: Expecting a stackmap frame

廉价感情. 提交于 2019-12-03 05:11:29
问题 We are using latest JDK 7 (u45) and ProGuard Version 4.10 Lately starting our distribution fails, after obfuscating it, with the following error: Exception in thread "main" java.lang.VerifyError: Expecting a stackmap frame at branch target 155 Exception Details: Location: com/bla/bla/service/ioc/SpringBootstrap.c()V @0: getstatic Reason: Expected stackmap frame at this location. Bytecode: 0000000: b200 73b6 008b 9900 82b2 0073 b800 933b 0000010: 1a99 0074 b200 73b6 008d 9900 6bb2 0074 0000020

Kerberos broken after upgrading from Java6 to Java7

試著忘記壹切 提交于 2019-12-03 02:41:37
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 decrypt AP REP - RC4 with HMAC) I've tried to regenerate the keytab with the different /crypto options