Questions tagged [java-7]

1

votes
3

answer
123

Views

Invalid flag -parameters in java 1.7

I have the task to create the spring-boot application using Java 7. So, as usual, I created a template on start.spring.io resource and open him via File -> New -> Project from Existing Sources... When I run with jdk-8, everything works fine, but when I change JDK to version 1.7 (also I change java-v...
Valentyn Hruzytskyi
1

votes
1

answer
34

Views

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; @XmlElement(name = 'Body') public DataGridData data = new Data...
Joe Taras
1

votes
0

answer
34

Views

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 * by releasers. To avoid effects of unsplicing from alrea...
Hello World
1

votes
0

answer
35

Views

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 2 3 4 Expected output is: { 'messages' : [ 1, 2, 3, 4 ] } I'm using XML.toJSONObject(xmlInput...
mtw
1

votes
1

answer
209

Views

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 java.time.temporal.ChronoUnit.MILLIS; class Fibonacci extends...
vddmanikanta
1

votes
0

answer
128

Views

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 system to utilize Java 8 or any future JDK upgrades...
J.M.
1

votes
0

answer
271

Views

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 have such implementation of annotation: @Target({Eleme...
Sebastian Jakubiak
1

votes
1

answer
56

Views

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', DataType.LONG).setAutoNumber(false)) .addColumn(new ColumnBuilder('ReaderID', Data...
Agi Hammerthief
1

votes
0

answer
38

Views

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 records, it takes 1 sec. This is slowing our apis down...
Anmol Vijaywargiya
1

votes
0

answer
23

Views

Embedded Tomcat without unpacking

What steps are required to make a executable war without unpacking the war. ( Similar to the way spring boot does). Basically want to wrap Embedded Tomcat into existing war and make it execurable. Env: Spring mvc, Java 7, Webapp with web.xml So far I have done following research: How Spring boot cre...
Vishwas
1

votes
2

answer
75

Views

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(); } } ================================================== package test.pack; public class TestClassTwo { publ...
Andrew Dvoychenkov
1

votes
0

answer
362

Views

Error: Default interface methods are only supported starting with Nougat (--min-api 24) when NOT using them

I'm getting the following error from android-studio when compiling my libgdx game: Error: Default interface methods are only supported starting with Android N (--min-api 24): com.hgames.core.item.Item com.hgames.core.item.misc.MiscItem.deepClone() which I don't understand because I don't use defau...
Clément hgames
1

votes
0

answer
33

Views

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) { openClosedFaultStatusRequestData = openClosedFaultStatusRequestDao.getFmOvOnOpenFasoId(value)...
Anirban
1

votes
1

answer
37

Views

Websphere 8.5 reboot breaks classLoader code

I have a JAVA application deployed on Websphere. This application is looking for a local WSDL file to do a SOAP request. However whenever the Websphere reboots which is nightly scheduled, this below line throws a NullPointer as it couldn't find the path of the WSDL. When we cycle the JVM everything...
james2611nov
1

votes
2

answer
93

Views

sort a map Map<String, List<String>>

Morning everybody, I'm trying to sort a map Map> which the map key set contain the order 1 2 3 4 ext ... The file which I'm retrieving data filter.properties 1=gwtCacheControlFilter:com.palmyra.arch.presentation.port.server.GWTCacheControlFilter:true:/*:null:presentation public Map initiateMapOfFilt...
Ghaith Briki
1

votes
1

answer
62

Views

Spring boot with Java 7 in Weblogic

I have a requirement to deploy the spring boot application in weblogic server 11g. The weblogic server supports only Java 7. Please assist me with the correct spring boot version and I get the following error if I use spring boot version 1.5.6.RELEASE. On hover the following message gets displayed....
Sowmea shree
1

votes
1

answer
1.3k

Views

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 org.pushingpixels.substance.internal.ui.SubstanceListUI$SubstanceListSel...
Michael Berry
1

votes
1

answer
126

Views

is build b144 the current latest version for java-7?

its already past 2nd June! Btw I just want to know is it true that the features stated at Pure Danger are accurate? If not does anyone know where can be get an accurate overview of the finalized features in Java 7? And just one quick question, in the Download Page, it lists the version for the down...
Pacerier
1

votes
1

answer
288

Views

Intereseting Fork/Join or Divide and Conquer Examples

We want to showcase the new JDK7 Fork/Join Framework on a conference workshop. For this we are currently searching for an interesting example what can be done with the framework. There are obvious ones like sorting or matrix calculations but are there more interesting ones which people like to work...
Fabian
1

votes
1

answer
795

Views

Why does this JDialog flicker in Win7 when modal?

In Windows 7, and Java 1.7 (or if 1.6, comment-out the two lines indicated), create a NetBeans/Eclipse project named 'test' with two classes, Test and DroppableFrame, and paste this code into it. And then run it. If you run with modal = true, it flickers. If you run with modal = false, it doesn't. W...
Rick Hodgin
1

votes
1

answer
917

Views

Compilation fails after Clover instrumentation of Java 7 try-with-resources

I am using a simple try-with-resources statement like the following: try (final CSVWriter w = new CSVWriter(new OutputStreamWriter(r.getOutputStream(), 'UTF-8'));){ //do stuff...... } It compiles fine using a normal javac Ant task, but when I have Clover instrument the code first, the resultant code...
Dave L.
1

votes
1

answer
499

Views

Using Java 7 CommonDataSource with Scala

There seems to be a problem compiling Scala code that uses older (Java 6) JDBC DataSource drivers with the Java 7 JVM and Scala. In Java 7, Oracle added a new method, Logger getParentLogger(), to the CommonDataSource interface. Older classes built with Java 6 that implement CommonDataSource are not...
Ralph
1

votes
2

answer
1.6k

Views

Java 7 URL connection hangs

While executing the following under Java 7, the program hangs. However, it doesn't hang under Java 6. package pkg; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; final public class Main { public static void main(String[] args) { try...
Lion
1

votes
2

answer
1.7k

Views

Transaction check error when installing Sun JDK 7

One my linux instance, I am trying to install JDK 7 using the rpm. There is already JRE 6 installed, and I want to install JDK 7 along that. When I try to install JDK 7, getting the following error: # rpm -ivh jdk-7u3-linux-x64.rpm Preparing... ########################################...
Noman Amir
1

votes
1

answer
525

Views

Reducing slug size (or increasing limit) for JDK7 and JRuby

I'm developing a fork of the Heroku buildpack for JRuby that uses JDK7 and JRuby 1.7.0.preview1. The good news is that it works - the bad news is that the slug is very large. Once I bundle together JRuby, the JDK, and a 'Hello, world' Rails 3 app, the compressed slug size is 98.4 MB at deploy time....
Brad
1

votes
3

answer
590

Views

Java 7 escape analysis is not working

For the below given code , I see lot of GC activity. As per my understanding this is a suitable scenario for EA. Why EA is not effective. DummyObject has nothing allocated inside it. JVM options used : -server , -verbosegc. static void anayzeEA() { for(int i = 0 ; i < 100000000; i++) { DummyObjec...
Shilu
1

votes
3

answer
5.1k

Views

Compiling java code and creating jar online

My problem: I have JDK 1.7 version on my machine. The jar I created with this does not run on my Unix machine as it has JRE 1.4 installed (I don't have admin rights to this machine). So, is there a way to compile my code with version 1.4 w/o uninstalling 1.7 on my machine. Can it be done online?
Piyush
1

votes
2

answer
59

Views

Referencing jre7

I am running Eclipse on my USB memory. I need to use jre 7. I can't install JRE 7 on my public computer. It has got only JRE 6. How can I reference JRE 7? Best regards
uml
1

votes
1

answer
94

Views

Where did the 2nd level of maven java compiler error information go when I updated to java7?

When using java6 I saw two levels of error information The error: file:[line,char] error: cannot find symbol Details: symbol: method .... location: class com..... Now, that I updated to java7 I no longer have this information. If I compile manually using '-Xlint:all' I see the details. For some r...
Peter Kahn
1

votes
1

answer
153

Views

does eclipse support the abstract enum in java7 ,how to enable it?

How can i enable 'abstract enum [SomeClassName]' in eclipse with jdk7 ? With Indigo Service Release 2 and jdk7, it will report error in the code when I write 'abstract enum [SomeClassName] '. Is there something I need to do in order to get this working ? i need that feature very much, which reduce m...
Johnny
1

votes
1

answer
643

Views

What is the meaning of File System in java 7?

Is it a collection of files(Directory) that are arranged in alphabetical order?
CoffeeCup
1

votes
2

answer
530

Views

What version of apache tomcat supports java 7 features in netbeans?

I'm using Netbeans 7.2 with apache tomcat server of version 5.5.It is not supporting java 7 features and asking to set server level to 7? how can i do that? or should i use other server?which one will u recommend?
user1616530
1

votes
1

answer
393

Views

Java 7 changed the behavior of Collections.checkedCollection to allow nulls. Is it still worthwhile for an API to use this in a mixed environment?

First of all, here's the behavior added by Java 7's Collections.checked*: Since null is considered to be a value of any reference type, the returned collection permits insertion of null elements whenever the backing collection does. This doesn't appear to be listed in the compatibility documentation...
benc
1

votes
1

answer
948

Views

Applet deployment javafx 2.2, firefox, ubuntu

I try to have my javafx applet working under Firefox, Ubuntu 12.04 x64, using JDK 1.7u10 b06 x64 The test on this page works (but doesn't use javafx): http://technonstop.com/install-java-plugin-ubuntu-linux This one doesn't : http://privatewww.essex.ac.uk/~wsomba/ParticleFx.html => I'm asked to ins...
Pierre Mardon
1

votes
1

answer
1.4k

Views

Netbeans 7.2/Jdk 7u7 bundle - javafx failure..jfxrt.jar issue

I have just done a fresh install of the netbeans 7.2/JavaFx2.2 SDK bundle downloaded from oracle. None of my old code will compile. This is the error I receive: (I know the code is good - consider bad code ruled out). Oddly enough, the javafx sample programs bundled with the Netbeans distribution...
Marc H
1

votes
1

answer
1.4k

Views

Eclipse Run a project error - java hotspot(TM) 64-bit server VM -1.7.0_09 <> 1.5.0

I ran a project, an opensource project called Adempiere. It is an Opensource ERP System and am interested in using this ERP. I got the source, downloaded it with SVN in eclipse Indigo. I ran the project and an error occured saying java hotspot(TM) 64-bit server VM -1.7.0_09 1.5.0 what is wrong with...
oneofakind
1

votes
1

answer
150

Views

Java 7 ForkJoin freezes when it has to fork

Background: I'm running simulations of escape panic, how people escape from rooms, buildings corridors etc. For large populations there is a large number of computation as each person needs to calculate a 'social force' from each other person (i.e. 2000 people = 2000^2 calculations) Code: I tried to...
Edgar H
1

votes
1

answer
172

Views

test java applet is getting started in windows 7 even after successful install of JRE 7 update 9 in IE9

I am getting following exceptions while testing my java installation, even after I reinstalled JRE and Internet Explorer 9 several times. Please help me. I am testing my jre installation through www.java.com/en/download/testjava.jsp. java.io.IOException: Invalid Http response java.io.IOException: In...
bhupesh.hardel
1

votes
1

answer
126

Views

How do I call a method from another class?

I am having problems accessing a method that is in a separate class, when I try to call it from my main class. This is the method class RobotData { private int junctionRecorder(IRobot robot) { int[] juncX; int[] juncY; int[] arrived; int[] junctions; int i = 0; i = junctions[0]; juncX[i] = robot.get...
Connor Hobbs
1

votes
1

answer
189

Views

How do I take an `int` and cast it to `Integer` if generics are in play in Java?

My goal is to simply take my int and interpret it as an Integer trough any means, no work-arounds I have an object Node (int Key, T value). I am working towards a program that can properly use generics, for now I just want it to use integers. However I can't make Node, I have to use Node. I don't kn...
Kalec

View additional questions