• Post Reply Bookmark Topic Watch Topic
  • New Topic

-target directive in JDK 1.5  RSS feed

 
Tim Cao
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am trying to compile a Java applet, and in order to make it able to work in M$ IE I need to target 1.1 version. It was working well with JDK 1.4 but my work admin has just upgraded to 1.5 and I got this error

javac: target release 1.1 conflicts with default source release 1.5

Could anyone give me some hints on how to overcome this problem?

Much appreciated,

Tim
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you need to specify the -source option as well since target indicates what version compatible class files to generate. source indicates the version of source code to accept:

Sun tools - javac options

From the explanation it looks like this would work:

javac -source 1.3 -target 1.1
 
Tim Cao
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ta, -source is the one

Tim
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) There's no company that I'm aware of that goes by the name or acronym M$, and certainly none that offers an internet browser or other product from which applets can be run.

2) under the assumption that you made a typo and were actually meaning to type MS (standing for Microsoft corporation, trading under MSFT at the NASDAQ), you can install a 5.0 JVM into their internet browser, commonly known as IE, quite easily. In fact Microsoft themselves recommend all users upgrade from the installed 1.1 JVM.
 
Tim Cao
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry if my opinion of MSFT was offensive to any of you. From now on, I will try to keep my post as free from personal view as possible.

Just want to stress that most of end-users never upgrade their IE's JVM (either because they dont know how to/ dont want to/ dont bother to/ or simply they cant because of security restrictions).

Tim.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!