Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6530555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:46:11+00:00 2026-05-25T09:46:11+00:00

I’ve got a project that was originally written for Java 1.4, but I only

  • 0

I’ve got a project that was originally written for Java 1.4, but I only have Java 6 on my Mac and I cannot install Java 1.4.

Normally, I’d use a line like this to compile:

javac -source=1.4 -target=1.4 MyClass.java

However, MyClass.java implements the java.sql.ResultSet interface, which added several new methods in Java 6, so I get compile errors like:

MyClass is not abstract and does not override abstract method
updateNClob(java.lang.String,java.io.Reader) in java.sql.ResultSet

I cannot simply implement the missing methods because many use generics, which are not available in Java 1.4.

It seems a solution would be to obtain and compile against the Java 1.4 JARs. So, I’ve got a few questions:

  1. Is there a better way?
  2. How do I specify to my Java 1.6 javac that I’d like to use the 1.4 JARs instead of the Java 6 JARs?
  3. Will this even work, and if so, will the project run on Java 1.4 as well as Java 6?
  4. How do I do this in Maven?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:46:12+00:00Added an answer on May 25, 2026 at 9:46 am

    Your situation seems to be quite contrived. I’ll try to simplify matters. At first, I am going to ignore your question about Maven.

    So let me first state some facts:

    -source=1.4 means: Dear compiler, please accept only language constructs — not library features — which were available with javac of JDK 1.4.

    -target=1.4 means: Dear compiler, please write class files in a binary file format which is compatible with a JRE 1.4.

    I gather that you are interested in load-time compatibility with JDK 1.4, i.e. you want that the class files produced in your setup can be loaded by JDK 1.4. Is that right?

    Do you also want to support source compatibility? I.e. do you want to allow others to compile your code on a JDK 1.4?

    If the answer to the last question is yes, I would try to install JDK 1.4 on OS X. It supports multiple installed JDKs. So I am pretty sure it is possible. If that is no option use:

    -source=1.4 -target=1.4 -bootclasspath=[path/to/1.4.jar]
    

    Note, do not use -Xbootclasspath. This changes the boot classpath of the jvm executing javac.

    If the answer to the above question is no. You can dispose of -source=1.4 allowing you to use generics and other Java 5 enhancement in your code. But you still have to provide binary compatibility by using:

    -target=1.4  -bootclasspath=[path/to/1.4.jar]
    

    Another option would be to use Retroweaver.

    After re-reading your question, I’d like add that you have to get hold of JDK 1.4 variant of the jdbc class files. Otherwise you’ll run into the compiler errors you’ve shown in your question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I've got a string that has curly quotes in it. I'd like to replace
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.