• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Problem in JDK compatibility

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to compile my classes in JDK1.4 version and few classes depends on other classes which are complied in JDK1.5 version .

I am getting the following error:

bad class file: /home/w3eqadm/emtclients/companypage/build/script/emtclients/companypage/lib/emt.jar(com/csfb/equity/edge/util/ApplicationProperties.class)
class file has wrong version 49.0, should be 48.0



I am in a situation that, I have to compile classes in JDK1.4 which are depending on classes complied in JDK1.5.

How can it be possible? Please advice.

Thanks,
Biswajit.
 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can possibly do this:

Download the latest version of JDK 1.5. With it, run the compiler with the -target 1.4 argument to javac. This will generate Java 1.4 compatible class files. Whether this will work with your java 1.5 class files I don't know, but it will at least compile the source.

Honestly? Either you have to find a Java 1.4 compliant version of whatever libraries you're using, or you need to upgrade your project to Java 1.5

Jeremy
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic