java-7

Java applet won't run under JRE7, no error displayed in console

放肆的年华 提交于 2020-01-01 14:59:14
问题 Under Windows 7, 64-bit, since upgrading to JRE-7 32-bit, under IE9 32-bit or Chrome, I can't run applets such as this one. Inside the Applet rectangle, I see the message "Error. Click for details" Clicking on the applet box (blank) leads to a dialogue box: Application Error DrawingLines.class There was an error while executing the application. Click "Details" for more information. Clicking "Details" button opens the Java console, but there are no errors, just Java Plug-in 10.3.0.5 Using JRE

add a jar to maven exec:java classpath

不羁岁月 提交于 2020-01-01 10:52:30
问题 I have a batch file which runs a java class using maven which depends on tools.jar (from the JDK). For example: mvn -f .\pom.xml -e exec:java -Dfile.encoding="UTF-8" -Dexec.mainClass=MyClass -Dexec.args="%1 %2 %3 %4 %5 %6 %7 %8 %9" -Dexec.classpathScope=runtime My program uses tools.jar from the JDK and I've added a system dependency in maven which points to it. Since the exec:java goal doesn't include system dependencies, I want to add the dependency from the command line manually. Although

add a jar to maven exec:java classpath

断了今生、忘了曾经 提交于 2020-01-01 10:51:48
问题 I have a batch file which runs a java class using maven which depends on tools.jar (from the JDK). For example: mvn -f .\pom.xml -e exec:java -Dfile.encoding="UTF-8" -Dexec.mainClass=MyClass -Dexec.args="%1 %2 %3 %4 %5 %6 %7 %8 %9" -Dexec.classpathScope=runtime My program uses tools.jar from the JDK and I've added a system dependency in maven which points to it. Since the exec:java goal doesn't include system dependencies, I want to add the dependency from the command line manually. Although

Java JDK 8 IndexedPropertyDescriptor has changed since JDK 7 with List object

南笙酒味 提交于 2020-01-01 09:57:08
问题 I have a simple issue. I have a program working in Java JDK7 but it doesn't work in JDK8 because of some introspection changes. Here is a test program to reproduce the issue: import java.beans.BeanInfo; import java.beans.IntrospectionException; import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] args) throws IntrospectionException { BeanInfo info = Introspector.getBeanInfo

Should I use Groovy's @CompileStatic if I'm also using Java 7

元气小坏坏 提交于 2020-01-01 07:56:11
问题 I've read through the "What's new in Groovy 2.0" and I'm a bit confused about when to use @CompileStatic. The article mentions that the @CompileStatic annotation was added for developers who weren't able to take advantage of the invoke dynamic part of Java7. So developers looking for performance improvements would not see much changes in Groovy 2.0, if they aren’t able to run on JDK 7. Luckily, the Groovy development team thought those developers could get interesting performance boost, among

Why is the catch parameter implicitly final?

ε祈祈猫儿з 提交于 2020-01-01 05:49:07
问题 catch (IOException|SQLException ex) { logger.log(ex); throw ex; } here why is ex implicitly final? What is the use of making ex implicitly final? 回答1: 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

Exception coming out of close() in try-with-resource

ぃ、小莉子 提交于 2020-01-01 04:13:06
问题 I was reading about the try-with-resource in JDK7 and while I was thinking of upgrading my application to run with JDK7 I faced this problem.. When using a BufferedReader for example the write throws IOException and the close throws IOException.. in the catch block I am concerned in the IOException thrown by the write.. but I wouldn't care much about the one thrown by the close.. Same problem with database connections.. and any other resource.. As an example I've created an auto closeable

Forward compatible Java 6 annotation processor and SupportedSourceVersion

。_饼干妹妹 提交于 2020-01-01 03:56:06
问题 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

java compiler's target version “jsr14” with JDK7/8

一世执手 提交于 2020-01-01 02:35:06
问题 Can anybody tell me the jsr14 target option of javac will be still available with JDK7/8? Say, $ javac -source 1.5 -target jsr14 Hello.java 回答1: We are heavily using -jsr14 in OSGi because it allows us to use generics in our API but still deploy on 1.4 environments, which are still popular in embedded. Unfortunately, they made JDK 7 not backward compatible with Java 6 and 5. Javac 1.7 ignores the generic information that is actually present in the JAR files. There is fortunately no problem at

Where can I locate and browse JDK 7 source files? [closed]

邮差的信 提交于 2019-12-31 11:00:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Can anyone direct me to where the jdk 7 source is hosted? 回答1: This is the repository for OpenJDK As for Oracle's JDK7, there are binaries and docs, but no source to browse. 回答2: The direct link is this. If you wonder how this link is got, follow this link, except that select "jdk7/jdk7-gate/jdk" instead of