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?
...
Conditions: do not modifiy the original lists; JDK only, no external libraries. Bonus points for a one-liner or a JDK 1.3 version.
Is there a simpler way than:
List<String> newList = new ArrayList<String>();
newList.addAll(listOne);
newList.addAll(listTwo);
...
I'm using Java 1.5 and I'd like to launch the associated application to open the file. I know that Java 1.6 introduced the Desktop API, but I need a solution for Java 1.5.
So far I found a way to do it in Windows:
Runtime.getRuntime().exec(new String[]{ "rundll32",
"url.dll,FileProtocolHandler", fileName });
...
I have installed Eclipse 3.3 on Mac OS X and it does not contain the src.zip file I am used to seeing with Windows and Linux installations. Where can I download the complete source code for the Java 1.5 JDK (must be specific versions).
I have been able to locate the full source code, however it contained the ungenerated Buffer implemen...
This may sound like a stupid question. Where are the core class files from Sun, like Button.class, located in the JDK installation folder C:\Program Files\Java\jdk1.5.0_12?
Or do the class files reside in C:\Program Files\Java\jre1.5.0_12 folder?
...
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...
Following is the sample schema I used to try to generate the JAXB classes. What I noticed is that when I have a string type with enumerations, for instance, in my case the stepType, with values starting with a numeral, JAXB does not generate a separate enum class say StepType class. It works fine, when I use only alphabets for the valu...
String s = UUID.randomUUID().toString();
return s.substring(0,8) + s.substring(9,13) + s.substring(14,18) +
s.substring(19,23) + s.substring(24);
I use JDK1.5's UUID, but it uses too much time when I connect/disconnect from the net.
I think the UUID may want to access some net.
Can anybody help me?
...
I have some code:
import javax.activation.MimetypesFileTypeMap;
...
..
.
String filename = "foo.xls"; // Where this can be any file name .doc, .pdf or whatever
String headerContentType = new MimetypesFileTypeMap().getContentType(filename);
It seems javax.activation.MimetypesFileTypeMap class is inside rt.jar which comes with JRE Sys...
I have write one java project on IntelliJ idea 8.1.1.When I go to compile option of IntelliJ IDEA 8.1.1 then it shows pop-up message box, in that it shows error-
cannot determine version for JDK
Update JDK configuration.
Even though I have proper JDK version, I have jdk1.5.0 installed in my PC working properly with other environm...
I am converting code from jdk 1.6 to jdk 1.5 and the code is:
import java.awt.SystemTray;
public static void main(String[] args) {
if (SystemTray.isSupported()) {
SystemTray tray = SystemTray.getSystemTray();
}
try {
tray.add(trayIcon);
} catch (AWTException e) {
System.err.println("TrayIcon could...
Hi,
We are implementing i18n using JSTL and encountered an issue that the resource texts defined in .properties file and having non ISO 8859 characters (e.g. inidic languages) can not be rendered by tag.
After diving through the code of tag and BundleHelper class ultimately we found that it internally uses ResourceBundle.getBundle met...
I am having the following message while installing JDK 1.5.0_06, 1.5.0_09, etc.
"Microsoft Visual C++ Runtime Library"
Assertion Failed!
Program: C;\Program Files\Java\jre1.5.0_06\bin\javaw.exe
File:../../../src/share/native/sun/font/t2k/t2kstrm.c
Line:132
Expression: pos<=t->maxPos
For information on how your program can cause an as...
This question has always bothered me. And the NetBeans wiki does not say anything about that... Besides, JDK 1.5 will complete the End of Life process very soon and 1.6 has been around for quite a while.
So why do they still use version 1.5 even if 1.6 is available on all Netbeans-supported platforms?
...
How to redirect verbose garbage collection output to a file? Suns site shows an example for unix but it doesn't work for windows.
...
Are there any gotchas in JDK 6 which did not exist in earlier versions? I am interested in finding out some surprising changes like the following one in the way Timestamp.valueOf() works.
Timestamp.valueOf(), when provided with a timestamp which contains a date or a month with a single digit. eg. 2009-9-20, 2009-9-3, 2009-12-4 etc., beh...
Hi guys,
I'm currently working on a project that uses the json-taglib-0.4.1.jar library to do some json communication between front and back end.
That library use to work fine until we migrated to Java 1.6 recently, we were compiling against 1.5 before that.
On top of not working anymore, I read it's not available in public reposito...
We're trying to generate source code stubs from a series of WSDLs (each with their own XSDs). We can do this fine and works perfectly under JDK1.6, however we need it to work under JDK1.5.
We're using jaxws-maven-plugin to generate the source code, however it depends on the wsimport binary being available (this is not available in JDK1...
I'm trying to use JAXB to unmarshal an xml file into objects but have come across a few difficulties. The actual project has a few thousand lines in the xml file so i've reproduced the error on a smaller scale as follows:
The XML file:
The XSD file for producing JAXB classes
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"&...
What do T and S mean?
public void main(String... abc) ; what does ... mean? Is ... called generic as well?
...