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
0 answers

Android Cordova App not Installed issue

we currently have an app that has been in usage for several years now. We are currently facing an issue with deployment where users are failing to install updates to the existing app. this is the error they see when trying to install on an android…
Prakash Chennupati
  • 3,066
  • 3
  • 27
  • 38
1
vote
4 answers

How can one rewrite Java 8 stream() using Java 7 patterns?

I want to rewrite the following Java 8 code to be Java 7 compliant: System.out.println("items: " + stringList.stream().collect(Collectors.joining(", "))); A naive way is: System.out.print("items: "); String joiner = ""; for (String item :…
Ray Zhang
  • 1,411
  • 4
  • 18
  • 36
1
vote
1 answer

Is it safe to flush a GZIPOutputStream followed by a ByteArrayOutputStream reset?

Here is an example code ByteArrayOutputStream baos = new ByteArrayOutputStream(bufSize); GZIPOutputStream gzos = new GZIPOutputStream1(baos); gzos.write(...) ... gzos.write(...) ... // Would the content get flushed properly? gzos.flush() byte[]…
pythonic
  • 20,589
  • 43
  • 136
  • 219
1
vote
1 answer

Signed jar file recognized in java 1.7.0_76 but not java 1.7.0_75

I signed a jar file using the signer provided with jdk 1.7.0_71. This also worked previously until we updated from X.509, CN=GlobalSign CodeSigning CA - SHA256 - G2, O=GlobalSign nv-sa to X.509, CN=GlobalSign CodeSigning CA - SHA256 - G3,…
Florian
  • 388
  • 2
  • 3
  • 13
1
vote
1 answer

Why is this JPanel not clearing itself of any graphics?

I'm trying to display 100 strings with the given JTextField once I press the draw button, and then be able to rotate them all 90 degrees when I press the rotate button. However, when I rotate, some of the strings from earlier still appear. But then…
E. Kaufman
  • 129
  • 2
  • 11
1
vote
1 answer

Install Java7 on Ubuntu 16.04 through bash script

I have below function java_install written in a bash script to install java on Linux box, to which I pass jdk-1.7.0_80-linux-x64.tgz as JAVA_PACKAGE. Now what is happening is java gets installed and works fine only within the script. Once I come out…
Elina
  • 21
  • 1
1
vote
2 answers

How can I get MAC Address without using the IP in Java?

How can I found the MAC address of a network card without knowing and using the IP address in Java?
Vlad V
  • 31
  • 1
  • 3
1
vote
2 answers

Java Futures: Could someone explain me the program flow

I am fine with javascript promises. So I wanted to try out Java Futures (still stuck in java 7). But these Java Futures don't make sense to me. Here is a trimmed and modified version of journaldev: import java.util.concurrent.*; public class…
tokosh
  • 1,772
  • 3
  • 20
  • 37
1
vote
1 answer

Multiple Spring @Transactional rollbacks supported in same process?

Project in question uses Spring 4, Java 7, and persists to Oracle and PostgreSQL. I'm writing integration tests for a service that persists data to both databases. For the integration test, I want to have both transactions rollback automatically. …
1
vote
1 answer

How to mock a function which does not return anything in java

public class Service1 { private Service2 service2; // FunctionA private FuncA(Object1 obj1) { /* code to make Obj2 from Obj1 */ service2.FuncB(obj2); } } public class Service2 { // FunctionB private FuncB(Object2 obj) { …
ankita gupta
  • 193
  • 1
  • 3
  • 12
1
vote
2 answers

how to view contents of a imported jdk class file in intellij

Newbie java programmer here. Is there any way I can view the contents of a class file in the Intelli J idea? Suppose I import a class java.lang.Math.* is there any way I can view the contents of *?
DaCruzR
  • 347
  • 2
  • 5
  • 14
1
vote
1 answer

Server closes connections made using httpclient and Java 7

I am trying to connect to a remote server that serves certificates using SNI. I noticed that the server is closing connections made when I compile and run code using Java 7 and not when I compile and run it via Java 8. Below is the code that i made…
ivanorone
  • 450
  • 4
  • 17
1
vote
2 answers

Invalid file path exception

My application throws an exception - java.io.FileNotFoundException: Invalid file path. Not sure why. I've read the questions and answers about the theme but no one could help me. Here is the code: String userhome =…
1
vote
2 answers

Why does this complex generics example not compile with Java 7, (but does with Java 8), and how can I work around it?

Here's the code. The errors and warnings for both Java 7 and 8 are included in comments. It is possible to change the signature of takeCollection(...) so that callers have a way to call it and pass SubRoot/Foo/Bar collections and compile this both…
Learner
  • 1,215
  • 1
  • 11
  • 26
1
vote
1 answer

How to I access this particular class?

The class in question is sun.security.tools.KeyTool and I'm using OpenJDK 7. I keep getting "cannot find symbol" though, and I'm no Java expert so I can't figure out through documentation why that could be or if it's gone. Any ideas? Exact error…
Yousef Amar
  • 651
  • 6
  • 19
1 2 3
99
100