Questions tagged [java-7]

Java SE version 7 was released in 2011. The new features, in comparison to the version 6, include dynamic language support, compressed pointers, small language extensions, elliptic curve cryptography, new network protocols, the ability to use Strings as case values in a switch statement, and various system library extensions.

Oracle has two products that implement Java Platform Standard Edition (Java SE) 7: Java SE Development Kit (JDK) 7 and Java SE Runtime Environment (JRE) 7.

JDK 7 is a superset of JRE 7, and contains everything that is in JRE 7, plus tools such as the compilers and debuggers necessary for developing applets and applications. JRE 7 provides the libraries, the Java Virtual Machine (JVM), and other components to run applets and applications written in the Java programming language.

The following conceptual diagram illustrates Java component technologies:

Java component technologies stack

See for more information.

Java 7 Official Documentation: http://docs.oracle.com/javase/7/docs/api/

Java SE 7 Features and Enhancements

2995 questions
1
vote
3 answers

How do I create a pattern string for the following regex in java?

I have a pattern that needs to be matched in a string and I'm unable to figure out the correct regex pattern. A string may contain multiple matches of this pattern and I need the count of it. Starts with lowercase english letter. Zero or more…
Sukumar
  • 171
  • 10
1
vote
0 answers

Running ANT with Different JDKs via EXEC (APT/WSGEN workaround)

I hope this finds an ANT build master who has some experience running ANT with different JDK versions concurrently! I have inherited a fairly old set of libraries & ANT build files that currently work under Java 6/7. In attempting to modernize this…
J.M.
  • 11
  • 1
1
vote
2 answers

Maven Fatal alert: protocol_version

I have a problem with Maven. I use as environment Windows 10 Java SE JDK Version 8 update 80 Eclipse Mars 2 with M2Eclipse Maven 3.5.4 I try to use any of the two but the protocol_version error arises. enable TLS 1.2 in the java application. But…
1
vote
2 answers

Fibonacci using Fork Join in Java 7

This is a program for Fibonacci using Java 7 ForkJoin . But seems like there is a dead lock. package ForkJoin; import java.time.LocalTime; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.RecursiveTask; import static…
1
vote
1 answer

Displaying the contents of a HashMap which contains Date objects in a dataTable in JSF/PrimeFaces

I created the following method, which returns a HashMap> where the key is a Date object and the value is a List of Date Objects. The method accepts a List of timeStamps and groups them by day. It then returns those grouped…
Ebony Maw
  • 514
  • 7
  • 23
1
vote
2 answers

Group a List of timestamps (Date objects) by day in a HashMap construct

We are starting with a List of timestamps, which are Date objects. We need to group all timestamps which belong to a unique day. For example, when a user logs into our server, a timestamp is added to a single List. We want to be able to parse this…
Ebony Maw
  • 514
  • 7
  • 23
1
vote
1 answer

Maven Build failure, How to change -source 1.5 to -source 7 or higher for maven in eclipse

I have a Maven project in Eclipse. While building its showing error: --- maven-clean-plugin:2.5:clean (default-clean) @ DataMasking --- [INFO] Deleting D:\workspaces\Datamasking\DataMasking\target [INFO] [INFO] ---…
paardhu
  • 101
  • 8
1
vote
0 answers

Converting xml input into json format with skipping parent keys but coping its values to childs

I must convert XML document to JSON format with skipping specified keys and appending its values to parents. I'm forced to use Java 7. For example I have following XML and I must skip "message" elements: 1
mtw
  • 144
  • 10
1
vote
1 answer

JColorChooser with Substance look and feel, Java 7

I'm writing an application that uses the Substance look and feel along with a JColorChooser. This works fine with Java 6, but on trying things out with Java 7 it really doesn't JColorChooser's: java.lang.NullPointerException at…
Michael Berry
  • 70,193
  • 21
  • 157
  • 216
1
vote
0 answers

How to understand the 'check for race ' comment in FutureTask.removeWaiter() method?

As code shown below in FutureTask.java (Jdk1.7): /** * Tries to unlink a timed-out or interrupted wait node to avoid * accumulating garbage. Internal nodes are simply unspliced * without CAS since it is harmless if they are traversed anyway *…
Hello World
  • 129
  • 7
1
vote
1 answer

Method overloading including parent and child class

Why does the following code print "string"? Why is there no error because the method call is ambiguous? class Mixer { void print(String s) { System.out.println("string"); } void print(Object o) { …
Sourabh
  • 119
  • 1
  • 9
1
vote
1 answer

JAXB - TreeGrid solve conflict XmlElement

I have this classes structure to serialize TreeGrid (www.treegrid.com) object: DataGrid.java @XmlRootElement(name = "Grid") public class DataGrid implements Serializable { private static final long serialVersionUID = 337286974296229101L; …
Joe Taras
  • 15,166
  • 7
  • 42
  • 55
1
vote
1 answer

Apply decimal format to a CellType.Formula

I've recently update my POI lib to 3.17 and since then when I have a CellType.FORMULA I can't do the following: public static void writeDecimal(Cell cell) { DecimalFormatSymbols symbols = new DecimalFormatSymbols(); …
1
vote
2 answers

preserve generics in list elements

I have a class who relies on generics to bind types internally. class C { T1 e1; T2 e2; /* stuff */ } In my code I know that, while c.e1 and c.e2 might not have the same class, c.e2 is an instance of a subclass of the…
Vito De Tullio
  • 2,332
  • 3
  • 33
  • 52
1
vote
1 answer

Streams backport compile error

Using streamsupport with a Java 7 javac compiler I encounter the following compile error: [ERROR] method map in interface java8.util.stream.Stream cannot be applied to given types; [ERROR] required: java8.util.function.Function