jdk1.5

Why do people still use primitive types in Java?

柔情痞子 提交于 2019-12-16 20:04:26
问题 Since Java 5, we've had boxing/unboxing of primitive types so that int is wrapped to be java.lang.Integer , and so and and so forth. I see a lot of new Java projects lately (that definitely require a JRE of at least version 5, if not 6) that are using int rather than java.lang.Integer , though it's much more convenient to use the latter, as it has a few helper methods for converting to long values et al. Why do some still use primitive types in Java? Is there any tangible benefit? 回答1: In

btrace with JDK5

自闭症网瘾萝莉.ら 提交于 2019-12-14 03:46:34
问题 Can we use bTrace with JDK5 or lesser versions? If not, what is that things which is provided in JDK6 that makes bTrace work? My understanding is that btrace working on Java Byte Code Instrumentation which was there for JDK5 as well. is there some extra features of instrumentation which is being exploit by bTrace? 回答1: Please refer here: http://kenai.com/projects/btrace/forums/forum/topics/13112-running-BTrace-on-JRE Here is what have they answered: this scenario is not tested. In theory, it

Button text disappearing with 4Gb Ram and IBM Java 1.5

别说谁变了你拦得住时间么 提交于 2019-12-11 10:14:50
问题 We have a very strange error occurring at a developer site which we are unable to replicate ourselves. A developer in Poland has recently upgraded his Windows XP Service Pack 3 machine to 4Gb of Ram When he did so he started experiencing graphical errors in java programs using IBM JDK 1.5 This errors only occur in IBM JDK 1.5 and not in any other version. The problem manifests itself when you create a button or control on a form and move the mouse over it. We have a test program import java

How to compile classes to JDK1.5 when ant is running in JDK1.6

旧巷老猫 提交于 2019-12-10 19:33:34
问题 My development environment is running in JDK1.6, and I need to compile some classes so they are compatible with a client running JDK1.5. How would I do this with the 'javac' ant target? 回答1: Command line : javac -target 1.5 sourcefiles Ant: < javac srcdir="${src} destdir="${build}" target="1.5" /> 回答2: <javac source="1.5"... /> 来源: https://stackoverflow.com/questions/169044/how-to-compile-classes-to-jdk1-5-when-ant-is-running-in-jdk1-6

Java version determination error

穿精又带淫゛_ 提交于 2019-12-10 18:23:03
问题 I just install Android Studio 1.5 on Ubuntu 14.04. I created a new project and I get the following error: Error:Could not determine Java version using executable /usr/lib/jvm/java-1.5.0-gcj/bin/java. My /usr/lib/jvm/ contain: java-1.5.0-gcj java-7-oracle java-gcj java-1.5.0-gcj-4.8-amd64 java-8-oracle java-gcj-4.8 The Project Structure has the JDK location set up to /usr/lib/jvm/java-1.5.0-gcj . Should it me something else ? How can I know ? Many thanks for you help ! 回答1: I solved my problem

Why WebSphere 6.1 (JDK 1.5 Compliant) compiles my JSPs as JDK 1.4?

爱⌒轻易说出口 提交于 2019-12-08 05:50:43
问题 Our web application is JDK 1.5 compliant, and is running succesfuly on WebSphere 6.1 However, some JSPs we have that contain Java code in 1.5 syntax fail to compile by WebSphere. It seems that for some reason, WebSphere treats the JSPs as 1.4 complient and fails to compile. Any idea why and how to solve this? (Stop writing Java in JSPs is one answer, what else?) 回答1: if you are using RAD, open web.xml go to extensions tab and add new jsp attribute jdkSourceLevel and value 15 (no dot in it) it

Using JAX-WS 2.2.5 client with JDK/JRE 1.5

时间秒杀一切 提交于 2019-12-05 04:02:36
Java 6 shipped with JAX-WS 2.0. Java 5 didn't ship with JAX-WS as far as I know. I was able to use JAX-WS 2.2.5 with Java 1.6 for creating Webservice client stubs by using the Java Endorsed Override Mechansim which lists JAX-WS as one of the components which can be replaced in Java 6. All I had to do was create a lib\endorsed directory in my JDK & JRE 6 paths & then copy jaxb-api.jar & jaxws-api.jar from JAX-WS 2.2.5 into the directory named endorsed. And both JDK & JRE 6 picked up the 2.2.5 JAX-WS automatically. I could not find similar Java Endorsed Override Mechanism in the Java 5 documents

@Override annotation on implemented method of interface in Java 5 code doesn't give a compilation error

橙三吉。 提交于 2019-12-04 13:03:19
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 and https://askubuntu.com/questions/522523/how-to-install-java-1-5-jdk-in-ubuntu . The POM contains (as described in https://stackoverflow.com/a/22398998/766786 ): <profile> <id>compileWithJava5</id> <!-- NOTE Make sure to set the environment variable JAVA5_HOME to your JDK 1.5 HOME when using this profile. --> <properties> <java.5.home>${env.JAVA5_HOME}</java.5.home> <java.5.libs>${java.5.home}/jre

javax.swing.grouplayout not exist in jdk 1.5

末鹿安然 提交于 2019-12-04 09:36:22
I developed a java application with netbeans. It used jdk 1.6. It works fine. But now the requirement is I need to build the jar for the application from the .java files in another machine without netbeans and where jdk 1.5 is used. I cannot upgrade that machine to jdk 1.6. Is there any way I could make my java files compile and work in jdk 1.5 machine with a possible minimal change to my source code.. The error is javax.swing.grouplayout not available in jdk 1.5 Please help... Use the netbeans preferences and select org.jdesktop...., update manually the generated code by right-click in the

How Can I Tell Eclipse to Compile and Build a Project with a Different JRE Version than it Normally Does?

拜拜、爱过 提交于 2019-12-04 03:03:21
问题 I'm not sure if this question has been answered in full or if my title is descriptive enough given my situation, but I've been asked to convert a project from being built with Ant to Maven. That part isn't too bad, but I've been told that this application was designed specifically for the JRE version 1.5 rather than the JRE 6 everything else I've been dealing with uses. Now, I'm incredibly new to Eclipse and Java themselves, so I was a bit confused when I was asked to tell either Eclipse or