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
1 answer

Memory Error/500 Error when migrating from Java 7 to Java 8 on Google App Engine

After Java 7 to 8 migration, your project may exhibit an increased 500 error rate and you may see this error: Uncaught exception from servlet java.lang.OutOfMemoryError: Java heap space
1
vote
0 answers

Cannot mock method calls with Mockito

I am using Mockito in my JUnit test cases. I have a Java application, the relevant part of the method is: if (requestType.equalsIgnoreCase("Open") || requestType.trim().equals("")) { if (daysBack != null) { …
Anirban
  • 925
  • 4
  • 24
  • 54
1
vote
2 answers

Instant.now equivalent to java.util.Date or Java 7

I have a system using Java 7 and I need to generate a date equivalente to Instant.now (Java 8). For example, Instant.now().toString() generate a date like that: "2018-12-19T12:32:46.816Z" Using java.util.Date I have this date:…
Computered
  • 440
  • 1
  • 7
  • 21
1
vote
0 answers

TNS:received bad datatype in NSWMARKER packet

I am using Oracle 10.2.0.5 as database, ojdbc14.jar as jdbc driver and calling this via jdbc from an application deployed in JBoss EAP 6.4. I am sometimes getting the following exception while connecting to database: 11:01:53,804 ERROR [stderr]…
Anirban
  • 925
  • 4
  • 24
  • 54
1
vote
2 answers

Debugging Java in Eclipse stops without a breakpoint

I wanna debug very simple code that consists of two simplest classes. package test.pack; public class TestClass { public static void main(String[] args) { TestClassTwo tc2 = new TestClassTwo(); …
1
vote
1 answer

How can i run a file.JAR passing a dynamic arguments using controller RESTFUL ( Spring Framework )

I have two projects, the first one is a maven project developed with Spring framework ( Version 4 ) and it contains the web services Restful which is used to communicate with the front end application ( Developping with Angular 4) and the other one…
1
vote
5 answers

WIll JDK 7 allow a program to alter its own code?

I noticed a compiler API in JDK 7. Does this mean that a Java program can recompile and alter the definition of a running program? At the moment I know that products like JavaRebel can do this, but to offer a free download of a product excludes…
yazz.com
  • 57,320
  • 66
  • 234
  • 385
1
vote
3 answers

Difference between 2 calendar instances giving inconsistent answers

I'm using jdk 1.7 and using the Calendar class to calculate the difference between 2 dates. I'm using the below code but it gives inconsistent results. Meaning sometimes it's correct but sometimes it's off by a day or something and there is no…
Akshay Salvi
  • 71
  • 1
  • 10
1
vote
0 answers

Querying Amazon Web Services RDS via Google App engine Standard Environment

Querying Amazon Web Services RDS via Google App engine Standard Environment seems to be very slow and is proportional to number of records that are being fetched. For example, if the query returns one record, it takes 100ms and if it returns 10…
1
vote
1 answer

How do I convert from a long to an Access Date/Time value in Jackcess?

I have the following code: // Model the table Table tbl = new TableBuilder("Transactions") .addColumn(new ColumnBuilder("TransactionID", DataType.LONG).setAutoNumber(true)) .addColumn(new ColumnBuilder("ControllerID",…
Agi Hammerthief
  • 2,114
  • 1
  • 22
  • 38
1
vote
1 answer

How do I make uCanAccess use Samba authentication, with special characters in username or password?

TL;DR: What Database.FileFormat constant should I use for an MS Access 2000-2003 database, when creating the Database object? I have built a SAMBA test application using jCIFS. It allows me to create/overwrite files if given the correct…
Agi Hammerthief
  • 2,114
  • 1
  • 22
  • 38
1
vote
2 answers

Date difference in days for Java7

I have date formats as: EEE, dd MMM yyyy HH:mm:ss Z For ex., Date 1 : Mon Sep 10 08:32:58 GMT 2018 Date 2 : Tue Sep 11 03:56:10 GMT 2018 I need date difference as 1 in above case, but I am getting value as 0 if I use joda date time or manually…
1
vote
2 answers

Java 7 Generic: How to access method of generic type?

I am working on a legacy application which uses Java 7. I have a generic Request class (annotations are from lombok): @AllArgsConstructor @Getter public class Request { int Id; T requestContext; } Here is one of the requestContext…
amy
  • 257
  • 1
  • 3
  • 10
1
vote
0 answers

Changing custom annotation implementation with multiple fields at runtime in java 7

I need to change one of the custom annotation field at Runtime (Java 7) from another class. As its not a problem to access the annotation field for given method, a cannot discover how to change value of fields in annotation (if its possible). I…
1
vote
1 answer

Why does uCanAccess fail to execute query with error `user lacks privilege or object not found` when table and column exist?

I have a database with a number of tables, three of which are as follows: Controllers_Readers ------------------- ControllerID: Number (Long Integer), Default 0, Indexed (Y, no Duplicated) ReaderID: Number (Long Integer), Default 0, Indexed (Y, No…
Agi Hammerthief
  • 2,114
  • 1
  • 22
  • 38