Ron T
Ron T

Reputation: 61

How can I get a gwt-maps-3.0 api jar compatible with java 1.5 compiler

I am working for a large company that changes slowly. We are deploying to a Weblogic 10.2 environment, and are stuck with java 1.5. That is not a problem with GWT libraries, but the downloaded version of gwt-maps-3.0.2b.gwt22.jar we have pulled down was built with a 1.6 compiler. Does anyone know if a 1.5 built version is available?

Baring that, is it possible to rebuild with the 1.5 compiler, since the source is in the jar? If so, does anyone have a build script to do so?

-- Some additional info We are trying to upgrade some existing code, This is the first error that they ran into offshore. The compile error tat they got was: o Error: “class file has wrong version 50.0, should be 49.0”

I checked the jar file using the following method.

  1. built the following program:

    import java.io.*;

    public class CheckVersion {
    public static void main(String[] args) throws IOException {
    for (int i=0; i < args.length; ++i) {
    checkVersion(args[i]);
    }
    }

    private static void checkVersion(String classFileName) throws IOException {
        DataInputStream in = new DataInputStream(new FileInputStream(classFileName));
    
        int magicNo = in.readInt();
        if (magicNo != 0xCAFEBABE) {
            System.err.println(classFileName + " is not a valid class file name");
            return;
        }
        int minor = in.readUnsignedShort();
        int major = in.readUnsignedShort();
        System.out.println(classFileName + ": " + major +"." + minor);
        in.close();
    }
    

    }

  2. extracted the jar file eg. "jar xvf gwt-maps3-0.2b.jar"

  3. ran the following command: "find . -name *.class | xargs java CheckVersion | cut -d':' -f2 | sort -u"

Upvotes: 0

Views: 299

Answers (2)

Ron T
Ron T

Reputation: 61

I was able to resolve this by downloading the source, commenting out the @Override annotations which in 1.5 require that method in the parent have an implementation, and recompiling the module.

Upvotes: 0

Arcadien
Arcadien

Reputation: 2278

You have to download sources from google code :

http://code.google.com/p/gwt-google-maps-v3/source/checkout

-- No this does not work. All versions on the page were built with 1.6

Upvotes: 1

Related Questions