maheswaran
maheswaran

Reputation: 417

Whether Possible to install two java SDK in a mac?

Actually i need to install a Java SDK 1.4 but my mac shows Java SDK 16 available. if i install 1.4 what will happen ? whether it is possible to have both ? because of this may be any affect in mac ? please advise me

Thanks, Maheswaran

Upvotes: 0

Views: 162

Answers (3)

UPT
UPT

Reputation: 1480

Every version of Mac OS X comes with Java out of the box. No download, installation, or setup is necessary to run applications, view Applets, or even build your own Java code from the command line. New Java releases are made easily available through Software Update, and developer packages can be found at the Java Downloads page.

Upvotes: 1

Santosh
Santosh

Reputation: 17903

In general, yes two JDKs can co-exists. Which JDK will be used, will depend on way your application uses java. If its using some env variable (Like JAVA_HOME or JDK_HOME) then you need to set at variable to correct path.

There are certain applications like (Applet) which does not use env variable to locate java runtime. Check this link for Java on Mac

Upvotes: 1

Ben
Ben

Reputation: 13635

Yes it is fine to have both, just make sure to default the right one and add the other as parameter for the programs that need a different SDK. This is generally done by setting JDK_HOME = /directory/of/jdk in the runscripts

Upvotes: 1

Related Questions