ringo / ringojs

RingoJS is a JavaScript platform built on the JVM and optimized for server-side applications.
https://ringojs.org
Apache License 2.0
838 stars 101 forks source link

Build fails with Java 1.5 #125

Closed tschaub closed 13 years ago

tschaub commented 13 years ago

I'm not entirely sure that this is Java 1.5 specific, but after 2c98c5617fdec5d02e5f58f17020d0448419d486, this is what I get from ant jar:

compile:
    [mkdir] Created dir: /path/to/build/classes
    [javac] Compiling 52 source files to /path/to/build/classes
/path/to/ringojs/src/org/ringojs/jsgi/JsgiRequest.java:21: cannot access javax.servlet.http.HttpServletRequest
bad class file: /path/to/ringojs/lib/jetty/servlet-api-3.0.20100224.jar(javax/servlet/http/HttpServletRequest.class)
class file has wrong version 50.0, should be 49.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
import javax.servlet.http.HttpServletRequest;
tschaub commented 13 years ago

Rolling back 2c98c5617fdec5d02e5f58f17020d0448419d486 on my fork makes it so Ringo builds again with Java 1.5.

hns commented 13 years ago

I think this issue can be solved by including servlet-api-2.5.jar instead of servlet-api 3.0.jar.

I'm wondering wheter Java 1.5 support still is important? Are there platforms where Java 6 isn't available, or are you developing or deploying with Java 1.5?

tschaub commented 13 years ago

We are still deploying with Java 1.5. I have some work to do to update to the latest Ringo - not sure if there is currently an issue or not.

hns commented 13 years ago

I've updated ivy.xml to load Servlet 2.5 instead of 3.0.

The following should fix the problems with JDK 1.5:

rm lib/jetty/*
ant update

I'll update the jetty libs before 0.8.

hns commented 13 years ago

I just downgraded Servlet API to 2.5, should be working now.