• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Which Java version should I compile my applets for, and how?

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm wondering which Java version I should be compiling my applets for. Are most Microsoft browsers still stuck at 1.1? Is that what I should develop for? The second part of my question is, what's the best way to do this? Can I always safely, reliably use the latest SDK, compiling with the -target switch? Or is it better to use an actual older SDK?
 
Sheriff
Posts: 9099
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which Java version I should be compiling my applets for?

It depends.

Are most Microsoft browsers still stuck at 1.1?

Yes.

In my opinion, you should compile your applets for 1.1 unless you realize a need for a class/method that is beyond that.

As far as the reliability of the -target switch, I've compiled some classes with that switch and they seemed to work fine in the older (1.1.4) JVMs of IE5.5 and NN4.7

However, I've also compiled some classes with that switch which contained methods which were from the 1.3 JDK. They compiled just fine, but wouldn't run unless I used the plug-in.
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot use just the -target switch to ensure 1.1 compatibility.
Read the documentation for Javac for more information. Especially look at the "Cross-Compilation Example".
 
Saloon Keeper
Posts: 22266
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There may yet be hope:
http://zdnet.com.com/2100-1104-978786.html
 
It's a beautiful day in this neighborhood - Fred Rogers. 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
    Bookmark Topic Watch Topic
  • New Topic