Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Matt O'Toole
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?
 
Marilyn de Queiroz
Sheriff
Posts: 9079
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.
 
David G Risner
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".
 
Tim Holloway
Bartender
Posts: 18467
61
Android Eclipse IDE 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
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!