java-7 Questions

38

Solved

I'm compiling a project in Eclipse using m2eclipse. I set the JDK path in Eclipse like this: Windows-->preferences-->installed jres--> jdk1.7.xx path But this is showing an error [ERRO...
Uptotheminute asked 29/10, 2013 at 10:11

4

Solved

I am using OpenCsv and the new CSVWriter() method takes a Writer as an argument. What I am trying to achieve is that to avoid writing to the file system and instead return an InputStream. I am not...
Schizont asked 9/3, 2016 at 6:6

30

Solved

How do I recursively list all files under a directory in Java? Does the framework provide any utility? I saw a lot of hacky implementations. But none from the framework or nio
Aldon asked 13/1, 2010 at 11:29

2

Solved

Java 7 introduced java.nio.file.Path as a possible replacement for java.io.File. With File, when I access a file under a specific, I would do: File parent = new File("c:\\tmp"); File child = new ...
Tolidine asked 22/11, 2011 at 13:22

5

I am having some trouble updating the compiler compliance of my eclipse workspace (I am actually using RTC, but it is essentially eclipse). Currently, it uses a jdk of 1.6 so I can change the JDK c...
Yolanthe asked 27/8, 2013 at 10:34

3

Hey there community I was wondering if is possible to create a program that allows for the user to Drag a file from anywhere on there hard drive (the desktop, documents folder, videos folder) and d...
Emogeneemollient asked 12/9, 2015 at 1:3

4

Solved

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 Sourc...
Primogenitor asked 14/2, 2019 at 22:46

3

Solved

I have a private method in an inner class which is private I would like to use the SafeVarargs annotation. However, I am required to either have a static or final method. Why does a private method ...
Transcalent asked 11/10, 2011 at 15:56

5

Solved

Consider this Java code which attempts to instantiate some Lists: List<String> list1 = new ArrayList<String>(); List<String> list2 = new ArrayList<>(); List<String> l...
Marquesan asked 5/3, 2014 at 14:30

7

Solved

This is my very first question on SO and I'm confused there isn't a similar question yet! So the question is: Why doesn't try-with-resources work with field variables? Or in other words: Why ...
Tutti asked 21/6, 2013 at 12:31

5

Solved

Until Java 7 there was an area in JVM memory called PermGen, where JVM used to keep its classes. In Java 8 it was removed and replaced by area called Metaspace. What are the most important differ...
Stellastellar asked 25/11, 2014 at 15:52

4

I encountered a problem regarding reordering elements in a JList using Drag and Drop. This following code is a modification of a code where you could drag elements from one JList to another (worked...
Selfinduction asked 16/5, 2013 at 11:46

3

I am programming an editable combobox in a JFrame Form, but i want to change te background color. How the program works: If i click the button "press", then the combobox his background needs to be...
Impetrate asked 21/4, 2012 at 10:46

1

Solved

According to the Maven release history, it should be possible to run any recent version of Maven (at the time of writing anyway) on JDK 7. However, when I try to do so on my Ubuntu 21.04 machine, I...
Laban asked 11/5, 2021 at 6:43

5

Solved

I get AttachNotSupportedException while running jmockit tests on linux (ubuntu 64bit). Java version is 1.7.0_51. This JDK is from Oracle. Tests are run using ant(that probably is not relevant) See...
Angevin asked 22/8, 2014 at 3:11

4

Solved

Is it possible to ignore the exception thrown when a resource is closed using a try-with-resources statement? Example: class MyResource implements AutoCloseable{ @Override public void close() t...
Ravi asked 31/7, 2011 at 13:16

5

Solved

Method description says: Returns true if the arguments are deeply equal to each other and false otherwise... Equality is determined by using the equals method of the first argument. Which (t...
Vandavandal asked 22/7, 2012 at 0:28

4

Solved

I want to watch (monitor) multiple directories using Java NIO WatchService. My problem here is the number of directories to watch is dynamic and the user can add any number of directories to the Wa...
Dubrovnik asked 20/3, 2013 at 7:22

3

I have used com.sun.image.codec.jpeg.JPEGImageEncoder to handle JPEG images, like charts and others, in my webapp. Now, I am updating my machine to use JDK7, but this version deprecated this class....
Jeopardize asked 4/11, 2011 at 20:21

6

Solved

First, I had installed jdk 1.6.0_43 and oracle weblogic 12.1.1, I was successfully able to deploy my application. I then upgraded both my jdk (1.7.0_60) and weblogic (12.1.2), but was unable to de...
Contemporaneous asked 30/6, 2014 at 12:13

2

Solved

Using Oracle(Sun) JDK6 and trying to move to Oracle JDK7 I am using sun.awt.GraphicsEnvironment to find all system fonts in order to use them to change pdf font used in my pdf file. Here is the ex...
Variance asked 3/12, 2012 at 13:33

1

I've installed Android Studio - Version 2.2 and jdk version 1.7.0_72. During the installation an error occurred "Warning: An error occurred while preparing sdk package google apis intel x86 atom sy...
Enplane asked 6/10, 2016 at 13:14

16

Solved

I would like to use the WatchService API as mentioned in this link: http://download.oracle.com/javase/tutorial/essential/io/notification.html After reading around, I found out that WatchService is...
Firstborn asked 7/6, 2011 at 15:12

3

Solved

I think the title says it all. How would I specify FOLLOW_LINKS? Why create an enum with just one option? For example, the method java.nio.file.Files.getLastModifiedTime(Path, LinkOption...) takes ...
Bowerman asked 18/11, 2013 at 16:22

2

Solved

I have been using Java Application Bundler to pack a Java application as .app. I have managed to run the application if I pack the JRE7 inside of the .app bundle. Is it possible to configure .app (...
Acronym asked 9/7, 2013 at 10:50

© 2022 - 2024 — McMap. All rights reserved.