r7 - 18 Feb 2007 - 16:00:26 - ArneJohannessenYou are here: TWiki >  ICab Web > UnofficialFAQ > JavaSettings

What is Java?

Java is a complete software development environment with its own programming language (called Java as well) which can be used for writing real double-clickable applications. Java programs are relatively easy to port to different operating systems, which makes it feasible to, say, program a Java app on a Mac and then ship it to users running Windows.

Java can also be used to write Java applets, which are small Java programs running within another program. Most web browsers are capable of running such Java applets embedded in web pages, and iCab is no exception. Java applets can be used on the Web for all sorts of things; sadly, they are abused a lot, just like every other aspect of the Web.

Note that Java is not JavaScript! Refer to JavaScript for a comparison of the two technologies.

Java programs and applets always require a JVM (Java Virtual Machine) to run. Some browsers include their own JVM, but iCab uses the JVM provided by the Mac OS instead. Mac OS 9 users thus need to install the MRJ. (Mac OS X has a JVM built-in.)


Java Settings under Mac OS X

There are not many settings related to Java in the iCab preferences because the entire Java configuration is handled by the operating system and the Java applet. Some versions of Mac OS X provide tools to change the system's Java Preferences at /Applications/Utilities/Java.

The confusion about Java settings in iCab arises mainly from the fact that under Mac OS X the term Java is mentioned at so many different places, namely the Java preferences, the Plug-ins preferences and the JavaScript preferences. Despite the fact that, depending on your system version, there might be as much as 40 Java-related checkboxes in those prefence panes, there really isn't much to configure. Basically, there are only three options, which will be discussed on this page in order:

  • Turn Java on or off
  • Disallow the execution of Java applets from other servers
  • Enable JavaConnect (a. k. a. LiveConnect), which allows communication between JavaScript and Java.

Turn Java On or Off

Depending on your system version and setup, you can enable Java in up to four different places. Java is enabled as soon as one of these switches are enabled; consequently, if you want to disable Java, you need to make sure that _all_ up to four switches are off.

These different ways to access Java have different abilities and disadvantages because they use different interfaces to the JVM. If you care about which of these you use, you have to ensure that only one of them is enabled and all the others are off. If you enable more than one of the following options, you will enable Java, but it is not clear which of the options will be used. So it's advisable to only enable the one you actually want to use.

(1) Java preferences pane

Go to iCab -> Preferences... -> Java to get to Execute Java applets.

All iCab versions since at least 2.5 or so support this way of enabling Java. This way lets iCab control the JVM directly using the Java Embedding Framework. However, Apple no longer develops or supports this now-deprecated framework. Therefore it is recommended to always keep this off unless you need JavaConnect (see below).

(2) Java Plug-in

This is the recommended way to enable Java. It provides access to Java 1.3.

Security and other settings for Java while using this plug-in can be made system-wide in /Applications/Utilities/Java/Java 1.3.1 Plugin Settings. (These settings are not currently in the scope of this document. Inquire at the ICabYahooGroup about them if you're interested in their addition.)

(3) Java Plug-in (CFM)

This is essentially equal to the above option (2). If in doubt, you should probably use the non-CFM plug-in instead of this one, particularly if you run the Universal Binary version of iCab.

The CFM (Code Fragment Manager) is a Mac OS 9 technology used for linking of executables in the legacy PEF format. On Mac OS X the CFM is not much more than a shim on top of the native dynamic link editor (dyld) for executables in Mach-O format. The Java Plug-in (CFM) is merely an adapter to the non-CFM Java Plug-in. This adapting may incur a very small performance penalty.

According to the iCab developer however, it doesn't matter whether you use the Java Plug-in or the Java Plug-in (CFM).

(4) Java Embedding Plugin

The Java Embedding (a. k. a. OJI) Plugin 0.9.5 does not work with iCab.

This plug-in can provide access to newer versions of Java than 1.3. It is supposed to be used with the Mozilla family of browsers. Some older versions of the plug-in might work with iCab, but they all just fall back to Java 1.3 anyhow, so it doesn't make much sense to use them.

(At time of this writing, neither iCab 2.9.8 nor the latest iCab 3 beta version have any way of providing access to Java 1.4 or Java 1.5. To change this, iCab wouldn't necessarily need this plug-in, but could use Apple's JavaPluginCocoa, which is part of Mac OS X, instead.)

Disallow the execution of Java applets from other servers

This security setting is only used by iCab when Java is enabled only via the iCab Java preferences (option (1) above). If you have any Java plug-ins enabled, this setting may be ignored.

Enable JavaConnect

JavaConnect (a. k. a. LiveConnect) allows communication between JavaScript and Java. JavaConnect requires Java to be activated via the iCab Java preferences (option (1) above). If you need JavaConnect, you have to switch off all of the Java plug-ins and enable Java in the Java preferences of iCab.

Note. The above information obviously is incorrect. More research needed. -- ArneJohannessen

There are some problems with JavaConnect: It may cause iCab to crash and it also has known security issues. Therefore it is recommended to always keep JavaConnect disabled unless you either need it for something temporarily or you know what you're doing.


Java Settings under System 7 to Mac OS 9

These are described in detail in the German iCab help files. If there is enough interest I might translate them. Contact me at the ICabYahooGroup.

-- ArneJohannessen

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r7 < r6 < r5 < r4 < r3 | More topic actions
 
risleynet
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback