• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Compiling applets

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

I am using JDK 1.5 update 5. I code some applets and compiled it using 1.5. Any of the applets did not work in machines having JRE 1.4.2 so I had to uninstall 1.5 install 1.4.2 and recompiled my applets
Now my problem
Without uninstalling JDK 1.5 is there a way for me to compile my applets so that they can work in 1.4.2 JRE
May be a special compile time option so that thought the machine has 1.5 it actually output my applet in 1.4.2(or any version before)

Saying any one viewing this applet must download JRE 1.5 is not an option(according to my boss)

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

Originally posted by Sameera Abeysinghe:
Hi all,

I am using JDK 1.5 update 5. I code some applets and compiled it using 1.5. Any of the applets did not work in machines having JRE 1.4.2 so I had to uninstall 1.5 install 1.4.2 and recompiled my applets
Now my problem
Without uninstalling JDK 1.5 is there a way for me to compile my applets so that they can work in 1.4.2 JRE
May be a special compile time option so that thought the machine has 1.5 it actually output my applet in 1.4.2(or any version before)

Saying any one viewing this applet must download JRE 1.5 is not an option(according to my boss)

Thank You





Answer is simple.

Just install jdk1.4.2 and simply set the env. varibale(Path) to point your 1.4.2 installation rather instead of your 1.5 installation.

And then compile your applet on 1.4.2. and distribute it . it will run on every machine having jre1.4.2


Enjoy

 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Installing and reinstalling JDKs doesn't sound all that simple.

Just use the "-target 1.4" option during compilation, and the resulting class files will be compatible with 1.4 JVMs. You need to take care not to use any Java 5 APIs, of course.
 
Sunil Kumar Gupta
Ranch Hand
Posts: 824
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It always show the error That

Conflict with 1.5 source
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's why I said to make sure not to use Java 1.5/5.0 APIs. A 1.4 JVM will not be able to use code based on 1.5.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic