jdk

Configuring servlet logging properly under Resin

Hello. I have trouble to configure standard JDK logging resin uses. I have read the documentation many times and looked for examples, but in the end I'm still puzzled. I run a servlet under resin 4.0.1 with simple logging requirements. All logging configuration should be possible in web.xml (and not global resin.xml) resin (com.cauch...

Getting Java JDK to compile on ubuntu

I'm trying to start working with Java, but so far haven't been able to get it on my machine properly. I'd really like to be able to compile from command line. After following the instructions here with no errors I can't compile with javac. Here's what I have so far: When I enter: $ java -version I get: java version "1.6.0_16" Java...

Compare two Java objects with a check for null

I feel like such a novice for asking this question, but is there a method in the JDK that compares two objects for equality, accounting for nulls? Something like this: public static boolean equals(Object o1, Object o2) { if (o1 == null) { return o2 == null; // Two nulls are considered equal } else if (o2 == null...

How is the Eclipse JDK setting affecting the system's JDK setting

I was trying to compile a Grails application referencing third party JARs on Mac OSX. Although my system's JRE and JDK is set to Java 1.6 I always got a Compilation error: java.lang.UnsupportedClassVersionError: Bad version number in .class file when accessing classes in the JAR. Also when testing an existing Grails app the default stats...

How do you enable 32 binary compatability in JDK?

Is there a vm option option to enable 32bit compatibility mode? I've googled but couldn't find how to do it anywhere! The reason I am doing it is I'm trying to run the GWT on Linux Ubuntu 64 as the link below indicates is possible. Issue 134: GWT hosted web browser does not work in 64-bit Linux ...

Where can I find old versions of the JDK and JRE?

To test compatibility, I need to find old versions of the JRE and JDK. Where can I find download links to these files? ...

Reading content of a JAR file (at runtime)?

I have read the posts: http://stackoverflow.com/questions/320510/viewing-contents-of-a-jar-file and http://stackoverflow.com/questions/1429172/list-files-inside-a-jar But I, sadly, couldn't find a good solution to actually read a JAR's content (file by file). Furthermore, could someone give me a hint, or point to a resource, where my ...

Axis 1.3 + JDK 1.5 + tomcat + JAX-WS guide for dummies

I have to expose web services using JDK 1.5, Tomcat and JAX-WS. if any tutorial / link for this. Please advise. ...

java isEmpty() undefined for string

I'm working on a school project in eclipse, and when I try and use the isEmpty() method on a String, Eclipse shows up the following error: "The method isEmpty() is undefined for the type String" I've run the Java updates, but am still getting it. Is any reason why this method would be undefined? ...

What does Java Error "Your active platform is: JDK_1.6, but the corresponding property "platforms.JDK_1.6.home" is not found in the project's properties files" mean?

I'm a Java noob (but have been programming for 25+ years, and have worked with OO languages from day 1). All of a sudden I started getting this error: Your active platform is: JDK_1.6, but the corresponding property "platforms.JDK_1.6.home" is not found in the project's properties files. Not sure what caused this condition, and not s...

Depending on com.sun.javadoc from tools.jar (Sun JDK) in Eclipse

One of our plugins requires an installed JDK, not just an JRE. We need com.sun.javadoc and friends from tools.jar. I do not think Sun's license will allow redistributing tools.jar (which is not necessary if you already have a JDK anyway). It also seems there is no way in Eclipse to specify a JDK as a dependency. All answers in the Eclip...

JavaFX JDK not found

I'm trying to install JavaFX for the first time and it says that version 1.6.0 or higher is required but none found. Also when I load a JavaFX app in firefox or chrome it says it can't find Java. This is strange since I have 1.6.0_07-b06 installed and I actively use it for development. Is there a certain place JavaFX looks? Is this a bu...

Why is EventListenerList traversed backwards in fireFooXXX()?

I don't understand the rationale of this code, taken from javax.swing.event.EventListenerList docs: protected void fireFooXXX() { // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); // Process the listeners last to first, notifying // those that are interested in this event f...

How install a specific jdk on a mac ?

Hi everyone, I want to install a specific jdk (the latest for example). For this, i went to jdk download homepage: http://java.sun.com/javase/downloads/index.jsp I look for a mac version but i'm a bit surprise to have only downloadable version for linux, window and solaris.. Here the message for Mac: "Apple Computer supplies their own...

XSLT 2.0 support in JDK 6?

Does JDK 6 support XSLT 2.0 for transformation. My question is, does it come with an XSLT processor built for XSLT 2.0? or DO I need to go for other libraries like Saxon. ...

How do I find javac.exe programmatically?

I'm calling javac from C# code. Originally I found its location only as follows: protected static string JavaHome { get { return Environment.GetEnvironmentVariable("JAVA_HOME"); } } However, I just installed the JDK on a new computer and found that it didn't automatically set the JAVA_HOME environment variable. Req...

where can I get the latest JRE / JDK as a zip file, I mean, no exe installer

You may call me a maniac, but I like to be sure that just by copying the contents of the java folder and setting the environment variables, everything will work fine. So I usually run the installer in a virtual machine, zip the \java folder contents, go back to a snapshot of the virtual machine, and then unzip the compressed file. I co...

Differences when compiling Java with GNU Compiler for Java instead of the Sun JDK

I'm working on a school project where I am required to use the GNU Compiler for Java. I've always worked using the official Sun JDK and now I'm concerned about differences that might complicate my work. I'm specially interested in which version of Java is the one supported by the latest GCJ compiler Could someone shed some light in the...

Where to set JDK to be used for SunOne server?

Where to set the JDK to be used by the SunOne server on Solaris? Is it all configured via an environment variable like JDK_HOME or JAVA_HOME, or is there a config file for the SunOne server somewhere where the path to the JDK is being set? ...

Missing java.util.HashMap

Hey everyone, Is there any reason that I would be missing the java.util.HashMap package? I have java.util.Hashtable, but no HashMap... I have the most up to date JDK and JRE... Thanks! ...