Tagged Questions
0
votes
1answer
57 views
JDBC incompatibility error
I have a legacy code written in older version of java. I am trying to compile the code and generate an .ear file using ant. The java version i am using is jdk7/jdk6 as java home .
On executing the ...
0
votes
0answers
415 views
Java7 javax.net.ssl.SSLException: Received fatal alert: unexpected_message
Updated my application from Java6 to Java7 and I am getting the below exception for SSL,
pool-2-thread-1, RECV TLSv1 ALERT: fatal, unexpected_message
pool-2-thread-1, called closeSocket()
...
0
votes
2answers
43 views
Java Norwegian decimal separator different in Java 6 and 7
The following snippet behaves different in Java 6 than Java 7:
final Locale locale = new Locale("nb", "NO");
System.out.println(locale.getDisplayLanguage()); // Norwegian Bokmål
final ...
0
votes
1answer
74 views
Install and switch from Java 6 and 7
I'm new on mac and I need to install both Java 6 and Java 7.
My Mac's version is Mac OS X Lion 10.7.5 (11G63)
The problem is I have found already installed Java 7 and I need to install Java 6 and ...
1
vote
1answer
123 views
Java 6 -> 7 migration ClassFormatError: Illegal local variable table length
I'm working on upgrading several programs to JDK 1.7 for the company I work for. I have run into the ClassFormatError described in
Java7 ClassFormatError: Illegal local variable table length while ...
4
votes
2answers
83 views
Any disadvantage to compiling for java6 instead of java7?
If I compile with my java7 jdk, I get a jar which runs fine with java7 but obviously fails to load with java6. If I compile with my java7 jdk but specify the output to be compatible with java6, it ...
1
vote
1answer
76 views
Java 6 runtime not overriding class called from within .jar dependency
I have a project with different classes and packages as dependencies. Note that everything writte below occurs in one project.
I have a class that at some point runs the code ...
4
votes
1answer
230 views
Implementation difference of String.substring() between JDK 6 and JDK 7 [duplicate]
I heard that String.substring() in Java has some implementation difference between JDK 6 and JDK 7. Can somebody shed some light on the improvements or risks that would be resulted from this change? ...
4
votes
1answer
105 views
why this regex is not working on java 7?
As per answer from How to determine whether a character is a letter in Java? i was using
below code snippet to match if string contains unicode letter or not in the begining. It was working great on ...
0
votes
3answers
79 views
Two installed javas on same pc. The one with lower version can not be called
I have two javas installed on my pc. jdk1.7.0_45 (x64) and jdk1.6.0_45(x86). I want that default java on my machine would be jdk1.6.0_45(x86). I added JAVA_HOME with value C:\Program Files ...
0
votes
1answer
297 views
GWT 2.6 - Java 6 conflict
I'm trying to migrate to gwt 2.6 in a project compiled using java 6
The project is made of a library based on gwt and a gwt application.
When launching my app I get a "javascriptObject major.minor ...
0
votes
0answers
57 views
Is there a chance to get -splash:<image> work for SWT applications that require -XstartOnFirstThread?
I am launching my Scala SWT application using:
java -splash:splash.jpg -jar application.jar
Using JDK 1.6.0 on Mac OS X 10.9.1 the splash screen was opened immediately (seconds before the actual ...
0
votes
1answer
432 views
how to set java version path to firefox in runtime
Please anyone help me to set java version path in Runtime.
i installed two java versions in different directories.but i need to use java 7 compile code to execute appliction using java6 version.
I ...
0
votes
1answer
94 views
Hamcrest JDK7 migration
Hi I try to migrate project to java 7 (JDK1.7.0_21) from java 6.
On one test I noticed failures.
Update:
I debugged the problem. I got to ReflectiveTypeFinder.findExpectedType.
public ...
1
vote
1answer
55 views
Converting from Java 7 to 6, Matcher.group
I'm converting a Java 7 application to a Java 6 application. I'm stuck on the matcher.group property, since I don't really understand what it does.
I have the following code:
public static final ...
0
votes
3answers
490 views
Need to use two Java versions in one machine
My application will support only java 1.6 version and I need to execute all test cases using java 1.7 compiled class files code.
My question how to reach above requirement...
Is it possible to ...
1
vote
5answers
299 views
is it possible to execute java 1.7 compiled code file in local machine which contains java 1.6
I have java program compiled with java 1.7 and I need use this compiled file in another machine which contains java 1.6.
When i am running 1.7 java compiled file with java 1.6 "unsupported class ...
7
votes
1answer
212 views
Young garbage collection longer pause with java 7 vs java 6
I noticed that each young garbage collection with java 7 takes on average 10 more milliseconds than with java 6. I'm using 1.6.0_31 and 1.7.0_21. The configuration hasn't changed, neither has the ...
1
vote
0answers
136 views
ColdFusion Zero Byte Padding Java 1.6 vs 1.7
<cfset var strB = createObject("java", "java.lang.StringBuilder")/>
<cfloop from=1 to=32 index="i">
<cfset zeroPad = zeroPad & URLDecode("%00")/>
</cfloop>
<cfset ...
4
votes
4answers
107 views
Java backward compatibility explanation
I have a java class file. I compiled with JVM 7. which I implemented java 1.7 additions like String switchcase, diamond operator. Now I want to run this .class file on java 1.6 JRE. Will it run?
A ...
0
votes
1answer
157 views
How to Convert That Java 1.7 Code to Java 1.6?
I am converting an existing Java 1.7 project into 1.6. I have changed diamond operations and try with resources. However 1.7 has some File operations capability that 1.6 does not have. How can I ...
0
votes
3answers
310 views
running neo4j in a machine with java 1.6
I am trying to run neo4j for the first time.
In my RHEL 6 machine, I have Java 1.6 installed. I do not want to change that because other programs are using that. When I tried to run neo4j, downloaded ...
6
votes
2answers
428 views
Java 7 is 8x slower than Java 6 on some basic parsing tasks
I recently noticed a specific part of my code is running significantly slower since I updated to Java 7. Pretty surprising as Java 7 is globally faster than Java 6.
The program is pretty large but I ...
5
votes
2answers
6k views
How to set specific java version to Maven
On my machine I've two java versions installed (1.6 and 1.7 installed manually by me), and I need both of them for different projects. But for Maven I need 1.7, now my Maven uses 1,6 java version, how ...
0
votes
2answers
293 views
How to use java internal XMLStreamWriter with another provider present
I'm using this code to get an XMLStreamWriter:
javax.xml.stream.XMLOutputFactory
.newInstance()
.createXMLStreamWriter( outputStream )
Recently I had to include the jars of jaxws to my ...
0
votes
0answers
92 views
java 7 security update 25 update impact java 1.6 as well
I have installed java 1.7 security update 25 and after that my jnlp application stopped working even when I use java 1.6 and I am not using java 1.7 anywhere.
So when we update java 1.7 security ...
0
votes
2answers
540 views
Downgrading from Java 7 to Java 6
For whatever reason I had to change pc's as a result of the change I now have to use Java 6 (the final update) Instead of java 7. When importing my existing project to Java 6 I get the following error ...
1
vote
1answer
270 views
What's the difference of UseParallelGC between Java6 and Java 7
Now I'm using the jvm parameter UseParallelGC, and I want to upgrade my jvm version to Java 7. Is there any difference between java 6 and java 7? Any one has some experience on it?
2
votes
1answer
483 views
How to enforce Java 1.6 standard during compilation in Ant?
I use JDK 7. But, there is a class I want to compile to Java 6 standard (means, it must be able to run on JRE 6). My Ant compilation command is as following:
<target name="myAntTarget">
...
13
votes
2answers
2k views
JDK 1.7 breaks backward compatibility? (generics)
I've found similar topics, but overly complicated and not quite the same. So the thing is. Here's the(minimal) code which is fine on 1.6, but doesn't compile with 1.7 javac.
public class Test {
...
-1
votes
1answer
270 views
Can we create object for private class
It is the basic doubt that I am asking. Before asking here I asked with some of my colleagues and even with google but none returned me the answer which convinced me. So please anyone clarify my ...
0
votes
2answers
216 views
JRE6 compiled software not working properly with JR7
even thought java is backwards compatible, I have problems running my Java 6 application using JRE7.
First problem:
javax.sound.sampled.Clip simply doesn't work when I run using JRE7, but works ...
0
votes
1answer
468 views
Why is my Netbeans (7.3.1.) blurry with MacOS (10.x) and Retina display?
I just installed Netbeans on my new MacBook Pro with Retina Display. And now everything inside the IDE is blurry (font, ect.).
I've installed Java SE 7.
How can I get it sharp without downgrading to ...
1
vote
0answers
693 views
Java Web Start don't launch by JRE6 javaws.exe on installed JRE7 update 25
Environment:
My Application is launched on ...
Client
Windows 7 64bit
JRE 7 update 25 32bit
JRE 6 update 24 32bit
Server
Redhat Linux 5
apache-tomcat-6.0.18
JDK 1.6.0 update 13 32bit
and
I ...
-5
votes
1answer
127 views
Applet is not running in java6 and it is working using java7 [closed]
I am using applet code in my application. When I am running that applet it is aksing me to install java 7 version.
Is it mandatory to install java7 version?
If it is mandatory how the applets were ...
14
votes
2answers
16k views
Which JDK version (Language Level) is required for Android Studio?
I am a new comer to the android world and with a .NET background. I am trying to install the Android Studio but I am having a mismatch on Android.com about the JDK version required for developing ...
0
votes
1answer
294 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 (;;) {
...
4
votes
1answer
970 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 ...
4
votes
4answers
6k views
JRE 6 and 7 side-by-side with JRE 6 as default (Win 7)
For a migration project to migrate from Java 6 to Java 7 runtime on Windows 7, we are looking to get the following situation:
Both JRE 6 and JRE 7 are installed on the machine
JRE 6 is set as the ...
1
vote
3answers
219 views
How do I implement Objects.hashcode within java 1.6
I have some code as such:
@Override
public int hashCode() {
int hash = 5;
hash = 47 * hash + Objects.hashCode(this.bendWidth);
hash = 47 * hash + Objects.hashCode(this.bendSideLength);
...
0
votes
1answer
927 views
Revalidate and repaint - Java 6
I am trying to compile my java class files however I am unable to do so due to the java on my school computer being old (java 6) whereas on my own laptop it works (java 7)
import ...
0
votes
1answer
150 views
Programing with Eclipse for Java 6 and 7
How to setup Eclipse executions environments and projects to be developed for both JAVA 6 and JAVA 7 JREs?
I'm asking this because not all programs that are developed to run over JAVA 6 will run in ...
1
vote
1answer
207 views
String comparison - JDK versions produce different results
I've implemented a basic Guava predicate:
containsPatternIgnoreCase(@Nullable final String input) {
checkNotNull(input);
return new Predicate<String>() {
@Override
public ...
5
votes
1answer
406 views
@SafeVarargs and Java 6 interoperability
I have a method with a generic varargs parameter in my API. I want my API to be Java 6 source and binary compatible, but it would be nice if Java 7 API consumers wouldn't suffer from unnecessary ...
3
votes
0answers
389 views
java 7 jaxb unmarshall not compatible with java 6
my app works well in java 6, but after I update java to version 7, some test failed. by debugging I found that jaxb couldn't parse some xml file correctly with java 7. here are my code:
the xml file ...
0
votes
2answers
533 views
How to mark Hibernate bean property as @Transient on Java 6?
I have an application that I am being forced to host on a provider that only runs JRE 6.
I get a compilation error on my Hibernate beans that have properties that have been annotated with @Transient. ...
-1
votes
1answer
2k views
Make a Mac Lion (10.7.5) default to Java JDK 6 even when JDK 7 is installed [closed]
I have a Mac with 10.7.5.
Ref: https://discussions.apple.com/message/21725940?ac_cid=op123456
I have attempted everything reasonably sane:
Oracle's "how to uninstall J7" (ha! only removes the ...
13
votes
1answer
1k 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 ...
0
votes
1answer
131 views
java embedded OS X Applications VS System installed Java
If a Mac OS X computer have instaled Java ( 6 - 7 - Both ??? ) & an Application (from AppStore) has Java ( 6 - 7 Which ??? ) embedded, Will the system used the Systemwide installed or the embedded ...
5
votes
4answers
3k views
How to silently install Java JDK into a specific directory on windows
On my development machine I always have to install Java 6 and Java 7 and I have to install each JDK in both, the 32 and 64 bit version, for testing purposes. Since the frequency of Java updates seems ...