jdk1.6

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

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? ...

Add warning for missing @Override annotation for interface implementation in Eclipse

In Eclipse 3.4.1 using JDK1.6.0_10 how can I activate a warning on a missing @Override annotation on a method that implements an interface method? In the Preferences window this option: Java > Compiler > Errors / Warnings > Annotations > Missing '@Override' annotation works fine for missing annotations on methods that overrid...

Using Java 6, on linux how can I make sure to use an ipv4 socket?

I'm trying to write a quick little java application to read the contents of a pcap file (from Wireshark) and play the data back on the network on a linux box. The file will only contain UDP broadcast packets, so my application only really needs the timestamp, port number, and data from the packet to do what I need. My problem is that t...

What libraries ship with support for the Java 6 ServiceLoader facility (META-INF/services) ?

I'm wondering what adoption rate is of the (now officially supported) ServiceLoader facility in Java 6. I'd like to begin using it as a preferred way to locate dependencies. Obviously this would be made much easier if the jars already ship with with the necessary configuration file in place. Just poking around I was happy to see the MyS...

Is JDK 6u14 Garbage First (G1) garbage collector, suitable for JRun?

Garbage First (G1) garbage collector http://weblogs.java.net/blog/opinali/archive/2009/02/here_comes_jdk.html Do you think this garbage collector is better for JRun, running ColdFusion 8? ...

installing jdk1.6 and netbeans on opensolaris2008.11

i installed jdk 1.6 using both the .sh( jdk-6u12-solaris-x64.sh ) and the .tar.Z(jdk-6u12-solaris-x64.tar.Z) files but neither the command prompt nor the netbeans installer is detecting the installation. wat is the correct way to install the jdk on opensolaris? ...

How to get java 1.6 applet working on mac os x

anyone got java 1.6 applet working on mac os x ? check it on gemal.dk/browserspy/java.html I got Java using object and applet tag 1.5.0_16 (1.5.0_16-133) from Apple Inc. and you ? on windows and linux 1.6 working gracefully :S ...

Can I add classes to sun's rt.jar file?

I downloaded the Javax.mail package. I have jdk1.6.0_11. Problem is...I cannot get javac or java to find those classes! I can get apps to compile using JCreator LE ( by adding the mail jar to its search list ) but, when I try to run the app in a command window, it fails. Can I add these new classes to the rt.jar without hurting my jdk ...

Logic (if any) behind Google App Engine excluding standard JDK 1.6 APIs

It looks like GAE has chosen a subset of JDK 1.6 classes, as per: Google App Engine JDK white list which is very unfortunate as one gets class linkage errors all over the place with most common java libraries that deal with data binding, reflection, class loading and annotations. Although some omissions may be for deprecated or legacy ...

Axis 1.2 web service problem with JDK 1.6.0.

Hi all, We ate migrating one of our axis web service which was built using JDK 1.4 and axis 1.0. We are trying to migrate it to JDK 1.6.0 with axis 1.2, but I am getting the following null pointer exception. The same code is working fine as soon as switch back to JDK 1.4. Any help? Thanks in advance. java.lang.NullPointerException ...

Random crashes of Java VM in ConcurrentGCThread

We have problems with JVMs running internet applications under changing load. This problem comes and goes. One day we see three VMs dying and after that, there is nothing for a week or two. We have not found a pattern yet, found nothing to reproduce or cause it. Also a search in the Sun bug database did not help. We tried a suggested wo...

Alternative to javax.activation.MimetypesFileTypeMap().getContentType(filename);

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...

How to shutdown com.sun.net.httpserver.HttpServer ?

The Http Server embedded in JDK 6 is a big help developing web services, but I've got situation where I published an Endpoint and then the code crashed and left the server running. How do you shutdown the embedded server once you've lost the reference to it (or the published Endpoint)? ...

Running Two Versions of Java JDK

I primarily use JDeveloper 10 with JDK 1.4.2 on Vista. I would like to install Eclipse and have it run the latest JDK 6. Is this possible without conflict? Ideally I would like to just use JDeveloper and switch back/forth between JDK versions. Is this possible? ...

Experience with JDK 1.6.x G1 ("Garbage First")

I'd like to know what are the experiences with G1 garbage collector in newest JDK? I see NullPointerException thrown in my program, although code didn't change and behave correctly in earlier JDKs. ...

SystemTray for jdk 1.5

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...

Java 1.6 Applet and Mac OS X, is there an official issue here?

I'm developing an applet in Java 1.6 which is supposed (ofcourse) to run on Mac and PC. However people with Mac seems to all have Java 1.5 installed even due they keep thier software updated with the Mac update tool. This seems very strange to me that Java isn't automatically updated by Apple as Java 1.6 was released in 2006. Is there...

Why are we getting ClosedByInterruptException from FileChannel.map in Java 1.6?

A customer of ours complains that, sporadically, calls of ours to FileChannel.map fail with a ClosedByInterruptException. The Javadoc does not list this as a legitimate possibility. Does anyone know what might be going on here? Cause0: java.nio.channels.ClosedByInterruptException Cause0-StackTrace: at java.nio.channels.spi.AbstractInte...

PgSQL Exception: column name not found.

Hi, I am using postgresql-8.3-603.jdbc4.jar with jdk 1.6 in my application to do the db operations. I am getting the below exceptions at sometimes and doing restart helps to avoid this exceptions temporarily. org.postgresql.util.PSQLException: The column name sender_id was not found in this ResultSet. at org.postgresql.jdbc2.A...

Do generics in Java avoid all ClassCastExceptins?

Since generics are only checked during compile time with Java 5, can they avoid ClassCastExceptions in all situations? ...