Questions tagged [java-6]

Java SE version 6 was released in December 2006. Use this tag for questions specific to this version of Java.

java-6
Filter by
Sorted by
Tagged with
0 votes
2 answers
888 views

Swing Progress Bar updates via Worker to EventDispatch thread

I have a JAVA6 GUI handling data import to our database. I have implemented a working JProgressBar. I understand that changes made to the GUI must be done via the event dispatch thread--which I do not ...
tenwest's user avatar
  • 2,148
49 votes
10 answers
96k views

The JDK is missing and is required to run some NetBeans modules

Complete error message: The JDK is missing and is required to run some NetBeans modules Please use the --jdkhome command line option to specify a JDK installation or see http://wiki.netbeans.org/...
Claudio Vasconcelos's user avatar
18 votes
1 answer
35k views

When is Java 6 end of life? (In the context of writing developer tools) [closed]

Background This is not as immediately obvious to figure out as you would think. First off, while Oracle has stopped public support of Java 6 as of Feb 2013 but with Premier support going out to Dec ...
Stephen Connolly's user avatar
16 votes
8 answers
16k views

@Override compile error, implementing an interface (eclipse jdk1.6.0_23 linux)

I am getting compile errors in eclipse when using the @Override annotation for a class that is implementing an interface. Compiler compliance level is set to Java 6.0. I am using the latest version ...
jsoc's user avatar
  • 421
16 votes
1 answer
9k views

Why does this code compile in Java 1.6 but not in Java 1.7?

The following code compiles fine in Java 1.6 but fails to compile in Java 1.7. Why? The relevant part of the code is the reference to the private 'data' field. The reference is from within the same ...
Paul's user avatar
  • 3,029
13 votes
7 answers
29k views

Jboss Server Error:Server already running on localhost

I am working on web project where jboss application server is required. After configured the jboss server, I was running my application. It is showing error like:Server already running on local host....
user1835080's user avatar
13 votes
3 answers
55k views

How to solve JDK issue unexpected at this time

I need your assistant in configuring the Jdeveloper 11.1.3 in my machine. I installed it and I installed the JDK. When I tried to ran a sample jsf file " Right Click-> Run", it generates the error: ...
user3407440's user avatar
12 votes
2 answers
9k views

Java 6 File Deletion

I am aware that this question is a raging duplicate of this question. However, I have now read that entire page twice, and some sections 3 times, and for the life of me I don't see how/where it is ...
IAmYourFaja's user avatar
  • 56.3k
12 votes
3 answers
23k views

No com.sun.tools.javac in JDK7

I'm using JDK7 and Eclipse Indiago in Windows 7 64-bit. I set environment variable JAVA_HOME to F:\JDK7 and add %JAVA_HOME%\bin in path. It's my sample code: com.sun.tools.javac.Main m1 = new com.sun....
Michel Gokan Khan's user avatar
10 votes
3 answers
20k views

How many characters can a Java StringBuilder hold?

Does StringBuilder have a limit of characters for maximum capacity in JAVA. StringBuilder url=new StringBuilder(); stmt = connnection.createStatement(); String sql="SOME QUERY"; rs = stmt....
Narendra Rawat's user avatar
10 votes
1 answer
13k views

Running JUnit4 Test classes in specified order

I've written a number of tests, divided not only into separate classes but, depending on what area of my application they're testing, into separate sub-packages. So, my package structure looks a bit ...
blalasaadri's user avatar
  • 6,070
9 votes
4 answers
12k views

Do i have to install jdk win64?

I have installed windows 7 x64, therefore i have a confusion whether i have to install JDK x64 or JDK x86? please help me, thank you
srisar's user avatar
  • 1,544
9 votes
3 answers
15k views

How do I Pipe process output to a file on Windows and JDK 6u45

I have the following windows batch file (run.bat): @echo off echo hello batch file to sysout And the following java code, which runs the batch files and redirects output to a file: public static ...
Barak's user avatar
  • 3,076
8 votes
4 answers
46k views

Tomcat: Trouble with SSL https connection on port 8443

We are having trouble with the https (port 8443) connection on an app that runs on Tomcat 7. The app is running fine on http (port 80) now. I have uncommented the "Define a SSL ..." section in the ...
user2526641's user avatar
8 votes
3 answers
13k views

How to generate end tag for empty element in XML using JAXB

I'm generating XML using JAXB. But JAXB is generating an empty Tag closing it self. But my client want separate empty tag. I know both are equals but he is not agree with me. please any one suggest ...
Rajesh Narravula's user avatar
7 votes
4 answers
4k views

What is the reason behind putting two jre, one in jdk and one outsite jdk in the java folder in Program files

I have see two jre in the java folder one in jdk and one outside jdk. Can you tell me the what is the reason behind having these two jre?
Naveen Chauhan's user avatar
7 votes
8 answers
22k views

unable to place breakpoints in eclipse

I am using eclipse europa (3.5) on windows vista home premium 64-bit using JDK 1.6.0_18 (32 BIT). Normally, I am able to put breakpoints just fine; However, for a particular class which is NOT part ...
anjanb's user avatar
  • 13.4k
6 votes
8 answers
12k views

Java - How to find count of items in a list in another list

Say I have two lists: List<String>products = new ArrayList<String>(); products.add("computer"); products.add("phone"); products.add("mouse"); products.add("keyboard"); List<...
David Buckley's user avatar
5 votes
1 answer
3k views

How can I use a library compiled for Java 7 in Java 6?

I'm working on a Java application, where I need to use a jar called myBeans.jar. This myBeans.jar contains lots of class files, that are compiled with jdk 1.7. I don't have the source code for those ...
RAS's user avatar
  • 8,140
5 votes
2 answers
7k views

How can I suppress the creation of the hs_err_pid file?

We are running a java application under java 1.6.0_13. When it crashes it creates the normal hs_err_pid file. I don't want this file created even if the application crashes. Is there a way on the java ...
Stephen's user avatar
  • 327
4 votes
1 answer
2k views

Implementation of the addAndGet in AtomicInteger class

I was going through the Java(Java 6) souce code for the addAndGet method in the AtomicInteger class. The corresponding code was as follows: public final int addAndGet(int delta) { for (;;) { ...
Sandipan Aich's user avatar
4 votes
4 answers
2k views

Java annotation cannot access protected static fields from upper class

Is this code valid? public abstract class A { protected static final String c = "my const"; } @myAnnotation(value=A.c) public class B extends A { } Eclipse with JDK 1.6.0.23 accepts this, but ...
adranale's user avatar
  • 2,864
3 votes
1 answer
3k views

Is it possible to write a program in Java without main() using JDK 1.7 or higher? [duplicate]

The following program will print Hello world when compiled with JDK 1.6 or lower versions of JDK. public class A { static { System.out.println("Hello world"); ...
user avatar
3 votes
1 answer
1k views

Java Cross-Compilation - Benefits of Latest JDK

I maintain a Java application which I have always compiled using JDK 1.6 before distributing it as this is the minimum version that my application requires - I don't use any newer features. I don't ...
chrixm's user avatar
  • 1,004
3 votes
5 answers
3k views

Java enums: implementing common methods, avoiding duplication

Let's say that I have two differents enumeration public enum SomeEnumClass { private static final SomeEnumClass[] mValues = SomeEnumClass .values(); ONE(1), TWO(2), THREE(3); } public ...
Milan's user avatar
  • 1,645
3 votes
2 answers
4k views

UnsupportedOperationException on ByteBuffer.asCharArray().array()

Could someone be so kind to explain why on the following line I have UnsupportedOperationException? System.out.println(ByteBuffer.wrap(new byte[] {'t', 'e', 's', 't', '\n'}).asCharBuffer().array());...
user1568898's user avatar
2 votes
1 answer
3k views

Ebean EmbeddedId mapping column to ManyToOne relation

I'm facing a problem with Ebean when trying to create Composed Keys (EmbeddedId). This is a draft of what I have: @Entity public class EntityA extends Model{ @Id private String ID; @...
João Pinho's user avatar
  • 3,755
2 votes
3 answers
3k views

Behaviour of String.split in java 1.6?

My code is: String s = "1;;;; 23;;"; System.out.println(s.split(";").length); and gives as output 5. The source code of split is: public String[] split(String regex) { return split(regex, 0)...
dierre's user avatar
  • 7,150
2 votes
2 answers
1k views

prevent inheritance of static block

If we run derived class,it will print derived and parent..is there any way to prevent inheritance of static block ? //Class 1 public class parent { static { System.out.println("Parent"); } } /...
Rips's user avatar
  • 1,994
2 votes
1 answer
988 views

Is it ok to save JavaVM * and JNIEnv * as a global variable and use it elsewhere?

JavaVM *javaVM = NULL; JNIEnv *jniEnv = NULL; ( createJavaVM )( &javaVM, ( void * )&jniEnv, &javaVMInitArgs ) where javaVM * and jniEnv * are global variables
shawn's user avatar
  • 4,133
1 vote
3 answers
2k views

Java runtime.exec does not execute correctly

I am getting an exe-File, which I have to execute using Java (Version 6) on Windows Server 2008 R2. Now there is s problem I do not really understand. When executing the file with the commandline "C:\...
John Johnson's user avatar
1 vote
1 answer
5k views

Issue with using bouncycastle libraries to enable TLSv1.2 for JDK1.6 running on Tomcat7

I am trying to make api calls from my apache tomcat7 server running jdk1.6 (on an aws ec2) to aws api gateway private endpoints inside my vpc. Such private endpoints only allow TLSv1.2. I am using ...
user11932773's user avatar
1 vote
3 answers
9k views

send a mail from java5 and java6

I know similar questions have been asked many times befor, but I think this one slitly different :) I'm writing a maven report plugin which will send emails to a list of users. I now have the problem,...
domi's user avatar
  • 2,217
1 vote
2 answers
2k views

JVM crashes on Lucene DataInput.readVInt

My JVM (1.6.0_29) keeps crashing on intensive use when indexing documents with Lucene. I get: # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=...
robsf's user avatar
  • 1,723
1 vote
1 answer
2k views

Java - Removing the double quotes in XML attributes

I have an xml string which I get via a REST call. However, some of the attributes have corrupted values. For example: <property name="foo" value="Some corrupted String because of &...
vahdet's user avatar
  • 6,551
1 vote
3 answers
12k views

to increase MaxPermSize memory in Java by command line

Could you please explain me how to increase this PermSpace size. I am using Gate application and loading huge amount of data and large number of plugins and unfortunately after every run it gives the ...
user2249205's user avatar
0 votes
1 answer
3k views

java 1.6 SystemTray icon does not appear on windows startup

I have a Java 1.6 desktop application, started with javaw from a batch file on Windows XP. There is a .lnk link to this batch file, which is placed to windows Startup folder in order to start this ...
user avatar
0 votes
1 answer
531 views

Is the JDK 1.6 the development kit for Java 6?

I have the following doubt. For a Spring training course they say to me that I have to prepare my environment installing the JDK 1.6 on Windows. So what it means? That I have to install the JDK ...
AndreaNobili's user avatar
0 votes
2 answers
2k views

Loading Properties from a JAR file (java 1.6)

I manually inject a properties file inside a jar. How to load properties from a jar file before java 1.7 ? I tried many workarounds and nothing worked so far. There's plenty questions about it, but ...
krzakov's user avatar
  • 4,021
0 votes
2 answers
3k views

Compiling java 7 for java 6 with Eclipse

I need to compile a project for Java 6 to use with java 6 or 7 (I can't upgrade all of the computers in my life). I've been searching all over and found somewhat helpful stuff, but I'm rather new to ...
WarpSpeed's user avatar
-2 votes
2 answers
2k views

java 6 IO - wrapped streams closing [closed]

Consider : public static void read(String filename) throws IOException { String charsetName = "UTF-8"; InputStream file = new FileInputStream(filename); // say no problem ...
Mr_and_Mrs_D's user avatar
  • 33.2k
27 votes
1 answer
8k views

Forward compatible Java 6 annotation processor and SupportedSourceVersion

I am trying out Java 7 for one project and getting warnings from annotation processors (Bindgen and Hibernate JPA modelgen) of this sort: warning: Supported source version 'RELEASE_6' from annotation ...
bernie's user avatar
  • 10.1k
16 votes
1 answer
670 views

JDK implementation of AbstractList::equals() does not check for list size equality first

Strangely the default JDK 6 implementation of AbstractList::equals() does not seems to check first if the two lists have the same size: public boolean equals(Object o) { if (o == this) ...
Laurent Grégoire's user avatar
16 votes
2 answers
9k views

What is the difference between the Java 1.6 and 1.7 jarsigner

Just noted that you can´t sign Android APKs with the Java 1.7 jarsigner. So I wonder why this is and what is the difference between the 1.6 and 1.7 signer?
Martin's user avatar
  • 11.7k
15 votes
4 answers
7k views

Is it possible to compile java using Oracle JDK and run the code on OpenJDK?

So is it possible to do all the development of a Java daemon (Apache Daemon) on a Windows 7 machine, then install the service on Ubuntu server (still have to search how to do that) which has OpenJDK ...
Muhammad Gelbana's user avatar
12 votes
1 answer
6k views

what is the role of "vm thread" in JDK 1.6 [duplicate]

We are seeing lot of activity of this thread in our customer's system and hence would like to know what might be happening. any links, info, tutorials ? P.S : this is happening on Solaris 10 with ...
anjanb's user avatar
  • 13.4k
11 votes
2 answers
7k views

Loading generic service implementations via java.util.ServiceLoader

I've stumbled upon some inconvenience the other day using java.util.ServiceLoader and some questions formed in me. Suppose I have a generic service: public interface Service<T> { ... } I ...
Kohányi Róbert's user avatar
11 votes
3 answers
10k views

Kerberos broken after upgrading from Java6 to Java7

I have a working application using the spring-security kerberos extension, running on jboss, running java 6. I'm in the process of upgrading my jvm from java 6 to java 7. When I do that, using the ...
A Ehrensberger's user avatar
11 votes
5 answers
9k views

Old projects compatible with Java 7

My old projects use Java 6 (1.6), and I don't know when I update (Java 7), they can run fine ?
rebecca's user avatar
  • 111
11 votes
3 answers
5k views

When should we use console class?

I was reading about Console class, and in the very first line, it was written New to Java 6 and when we are running Java SE 6 from command line, then we are typically using console class object ...
Ravi's user avatar
  • 31.1k