348
questions
0
votes
0
answers
654
views
TLS v1.2 on old Java 5 and Tomcat 5.x
I have an old Java 5 application running on a Tomcat 5 server.
I tried everything suggested to implement the TLS v1.2 protocol yet nothing worked and the browser will return a ...
0
votes
0
answers
183
views
Java Paste From Clipboard Not Working In Every App On Linux
I have a Swing app written in Java 5 for an old openSuse 10.0 system and I'm trying to copy some text from a JTextArea to the clipboard and paste it in another app. The paste function works in a ...
-2
votes
1
answer
98
views
Can you pass no Values to a Java Parameter Array
Most people should know of the Object... objs way of having an array as a parameter. Essentially it's just Object[] objs. However I found something, where you can't match the functionality. (Or I just ...
1
vote
0
answers
50
views
I can't make the case which String code compiled to StringBuffer code
1. Summarize the problem
I've heard String + operation will be changed when compiling after JDK 1.5.
But sadly I couldn't find the optimization case.
What did I miss? What did I do wrong?
2. Describe ...
0
votes
1
answer
254
views
ArrayList does not satisfy generic serializable list type
Given the following java code:
public static <I extends Serializable, L extends List<I> & Serializable> L getList() {
return new ArrayList<I>(); // <-- Compile error
}
...
0
votes
1
answer
774
views
Handling multiple Classes with Types in client code
Suppose if I have the following classes
class A {}
class B {}
abstract class ParentClass<T> {
abstract void accept(T t);
}
class Child1 extends ParentClass<A> {
void accept(A ...
0
votes
2
answers
442
views
Code Build in JDK 1.5 but runtime uses 1.8, any performance issues?
Our project has legacy frameworks that needed 1.5 as a compulsory JDK version to build. But in runtime, we use JDK 1.8. Will there be any performance impact, as we are creating the binaries using JDK ...
-1
votes
2
answers
211
views
DateTime addmonths method is adding 1 extra day
I am currently working on an issue where DateTime.addMonths(iStartDateH, durationAsInt) is adding an extra day. It uses GeorgianCalendar internally.
We are using Java 5 currently in this project
Eg: ...
0
votes
1
answer
630
views
Support JAVA-8 Jar in Android 5 - React Native
Solution from Android Documentation is below
android {
defaultConfig {
// Required when setting minSdkVersion to 20 or lower
multiDexEnabled true
}
compileOptions {
// Flag to ...
3
votes
2
answers
1k
views
Get all duplicate values from multiple list in Java
I want to get all values that has duplicate from multiple List of Integers.
The confusing part is these list of Integers are inside a Map of Map like this LinkedHashMap<String, LinkedHashMap<...
-1
votes
3
answers
848
views
How to run old school Java programs with latest Java LTS 11?
I want to run Siemens LOGO Soft Comfort.
dell@dell-Precision-M6400:~/Hämtningar/Logo 6.1/Linux/tools/Application$ ./LOGOComfort
Unrecognized option: -Xincgc
Error: Could not create the Java Virtual ...
2
votes
2
answers
2k
views
Cannot Attach to JVM using jdk 1.5
I have a java application that must run with jdk 1.5. I need a way to attach to this application JVM using its PID.
I tried ByteBuddy library but it is giving me the following error when trying to ...
5
votes
1
answer
189
views
Why is javac -source 1.5 allowing @Override on interface methods?
Here is some sample java code that is illegal under 1.5, if I understand correctly
(since @Override could not be used for overrides of interface methods until java 1.6):
public class A {
public ...
2
votes
1
answer
915
views
iBatis (version 2.0) with Java 1.5 code throwing : No type handler could be found to map the property 'codec' to the column 'codec'
I'm working on a legacy application using Java 1.5, PostgreSQL 8.4.20 and iBatis version < 2.3.4.726 (as I've to use two jars for iBatis namely ibatis-common-2.jar & ibatis-sqlmap-2.jar) . I've ...
1
vote
0
answers
89
views
Java SDK Mismatch
I have an old WebSphere app that I'm trying to compile with Java 1.5. I'm working in in IntelliJ on Windows 10. In my Project Settings I have the Project SDK set as:
1.5 (java version "1.5.0_22")
...
2
votes
1
answer
1k
views
Maven secure HTTPS repository and JDK5
Since January 2020, maven has switched their repo from HTTP to HTTPS.
In order my project (running with Java 5 + maven 3.1.1) to download the repos i changed in my pom.xml the repos to look to: https:/...
0
votes
1
answer
355
views
Java Generics. Child extends Parent
Can you please help me with a generics.
I have a requirement where I have a UI form but based on type, form changes completely. I have created Parent DTO with common fields and child DTOs for each ...
4
votes
3
answers
414
views
use varargs can loose type-checking in compile time?
In the Effective Java book, Item 42 talks about varargs method.
It says:
ReturnType1 suspect1(Object... args){}
<T> ReturnType2 suspect2(T... args){}
Methods with either of these ...
0
votes
1
answer
2k
views
Default SSL context init failed: SunX509 KeyManagerFactory not available
I have an exception when I try to do a post call using restTemplate from my local app hosted on weblogic 10 to an authentication service
I've tried many things like using TLSv1.2 with java 5 (using ...
0
votes
2
answers
363
views
Why does Java claim 1.5 version need to be backward compatible?
Java 1.5 was released with Generics and they wanted it to be backward compatible with earlier versions and hence Java disallowed usage of method specific generics when creating raw instances.
for eg.,...
1
vote
0
answers
65
views
How to create a Java web service program on Java 5 or older, on UNIX platform
I am working on a project that requires me to deploy a web-service.
The working platform is UNIX and the Java version that it is using is Java 5.
I have tried few basic web service on UNIX, but do ...
3
votes
1
answer
216
views
Java Upgrade from 5 to 8 with Spring
I am working on a legacy application which is still running on JDK5. As part of our new requirement we need to update it to JDK 8. As per my understanding since Java is backward compatible, this ...
0
votes
3
answers
80
views
Java Reflection to set each methods
I have a problem with setting up each field in my class by using the setter method.
For my Object Class i have
public class HealthDetails{
private String id;
private String name;
private ...
-3
votes
2
answers
3k
views
Migration of Java Application from 1.5 to 1.8 [closed]
We are working in the project of migrating a application(built in java 5)
to java 8 for better performance,
But , we are not sure that
1. upgrade an environment or
2.Build that complete app in java 8 ...
0
votes
0
answers
57
views
I can't create or download a system on AVD manager(Android studio
I installed android studio, I wanted to create a virtual device but I I got this error message "Installation did not complete successfully. See the IDE log for details" how can I fix this pls? android-...
0
votes
0
answers
348
views
What was the need to introduce enums in Java 5
I am going through Enums that were introduced in Java 1.5. In Effective Java 2'nd Edition it's mentioned that before Java 1.5 there were int and String enum patterns which were having some ...
0
votes
0
answers
245
views
Rest service with jdk5
I am trying a JSON Rest service using jersey 1.18.
I am stuck up with jdk5.
Could please help with the Jersey jar version compatible with jdk5.
Or an example For rest service with jdk5?
0
votes
1
answer
1k
views
IDE can't find declaration of element in xsl file
I work on an old java 5 project but I can't run it.
Before I try to run it, Eclipse (Neon.2 Release 4.6.2) indicate to me this error:
cvc-elt.1 cannot find the declaration of element xsl:stylesheet
...
3
votes
0
answers
385
views
Scanner.nextLine() need double enter to finish a line in Java6
I have problem in Java6 when using Scanner.nextLine().
The code is simply below
package test;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Scanner;
public class ...
0
votes
1
answer
936
views
How to find OC4J server jdk version?
I'm facing problem with deploying web application into OC4j 10.1.3 server and getting error with "java wrong version 50.0 should be 49.0".
I know that, this is because of jdk version clashing which ...
0
votes
1
answer
3k
views
Can SonarLint be run on JDK 5,6, or 7?
I am trying to install SonarLint for Eclipse Ganymede (3.4.2) - and our project is very old, so we're using JDK 1.5 here. So is it possible to run SonarLint for JDK 5?
1
vote
0
answers
328
views
Documenting unfinished development work - Annotation
Using Javadoc, to document objects of type(workWithAnnot,Method,Constructor,Annotation,Package) as unfinished in development, below is the code,
src
package1
package-info.java
...
0
votes
1
answer
339
views
How can I align different elements in two composites?
I try to make this widget :
For that I create one composite for the group (with 1 column) and one composite with 2 columns (for the label and text) for id and password
And then, I create one ...
0
votes
1
answer
274
views
Spring Security in Rest API
I have problem to choose security type to our REST API. Firstly I describe a problem. There is an application which will be using this REST API. This application has front end and back end side. It ...
0
votes
2
answers
2k
views
Is it possible to override the minimum requirement of Java 1.6 for NetBeans 8.2?
I believe I'm lacking in the knowledge that should be pretty basic, but, here's my scenario:
I manage a 3rd party application that still runs on Java 1.5. The application server (WebLogic 11) can run ...
0
votes
2
answers
6k
views
How does switch statements work in java 1.5 with string arguments?
Can i implement switch statements(by passing string arguments) in java 5 without making use of enums?I tried doing it using hashcode but i got an error
package com.list;
import java.util.Scanner;
...
1
vote
0
answers
2k
views
A fatal error has been detected by the Java Runtime Environment: SIGSEGV (0xb) at pc=0xca9adb00, pid=18779, tid=39
I am migrating application with 1.5 to 1.6 and two databases are connecting to fetch the data for the application. Both database versions are oracl11 and 12c.
While trying to access the application ...
0
votes
2
answers
450
views
How is the compile time check of the type of annotations changed in Java 5?
I am looking at the changes introduced in Java 5 , the following piece of documentation looks unclear to me .
<T extends Annotation> T getAnnotation(Class<T> annotationType);
This ...
10
votes
3
answers
7k
views
Extracting information from a a java core dump with jmap(1.5)
Long story short, some coworkers are running a pretty old setup(oc4j jdk1.5.6 in x86_64) with an application which happens to be mission critical. They recently have tried to deploy a new version of ...
16
votes
2
answers
125k
views
Invalid maximum heap size
I have copied a jdk directory from another location. Since then, I get the following error message.
Your environment has been set.
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard ...
1
vote
1
answer
204
views
how to expose RESTful WebService using Java1.5 and jersey1.2, Bad version number in .class file
Error : UnsupportedClassVersionError: Bad version number in .class file
used following jars :
activation.jar
asm-3.1.jar
jackson-core-asl.jar
jackson-jaxrs.jar
jackson-mapper-asl.jar
jackson-xc.jar
...
0
votes
0
answers
299
views
Does com.sun.tools.attach.VirtualMachine API works in JRE 1.5?
I wants to attach with virtual machine with below way.
VirtualMachine localVirtualMachine = VirtualMachine.attach(PID);
localVirtualMachine.loadAgent(agentName);
...
5
votes
2
answers
9k
views
Need to generate QR Code in Oracle [closed]
I am in need of generating QR Code in oracle database and print them in PDF document generated through BI Publisher.
I have tried many places and found below post which makes use of Zxing Library to ...
1
vote
1
answer
253
views
Convert Java 8 feature to Java 1.5
How do I convert the below mentioned piece of code in Java 1.5?
final List<String> filteredEntries = entries.stream()
.filter(e -> e.toLowerCase().contains(getText().toLowerCase()))
....
0
votes
1
answer
348
views
Size Method of a Vector resulting in a "Cannot find Symbol" Error
I'm having some issues with the following code, which uses a vector to store print and calculate the average of a list of numbers, by the user. The issue I'm having is a Cannot find symbol error on ...
3
votes
2
answers
2k
views
@Override annotation on implemented method of interface in Java 5 code doesn't give a compilation error
I have a legacy Java 5 project that will still be maintained until at least 31 December 2017.
My default system JDK is 1.8.
JDK 1.5 is also installed, as described in Install Java 5 in Ubuntu 12.04 ...
0
votes
2
answers
209
views
Create a setter to provide a java List Implementation class
I'm writing a small type-conversion framework, based on this interface:
public interface Converter <From,To> {
public To convert(final From from);
}
So that I can write custom type ...
2
votes
0
answers
855
views
Java Version upgrade for existing project from 1.5 to 1.7
How do I upgrade an existing project running on JDK 1.5 to JDK 1.7? What type of compatibility issues I might have and how do I proceed, I'm blank on this.
0
votes
1
answer
3k
views
Can not Start Java RMI Server and Client
I am new for Java RMI. I tried to start simple basic example java RMI with eclipse. But I cannot start Server and Client code. please help me to solve this problem.
Server Code:
MyServer.java
...
0
votes
1
answer
1k
views
Mockito NullPointerException DataSourceTransactionManager.getTransaction()
I have a nullPointerException when I try mock a DataSourceTransactionManager, I just test one Method without access to DB.
Maybe I am do something wrong, but I don't know what.
TestClass
@RunWith(...