MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: JLink

  • To: mathgroup at
  • Subject: [mg80570] Re: [mg80452] JLink
  • From: Todd Gayley <tgayley at>
  • Date: Sun, 26 Aug 2007 03:07:56 -0400 (EDT)
  • References: <>

At 11:57 PM 8/22/2007, dh wrote:

>Mathematica 6 comes with an outdated Java. Therefore, it may be
>necessary to use a newer version. A clumsy solution is to change the
>Java in the installation. However, there was a better method that worked
>before v6:
>InstallJava takes an option "CommandLine" that specifies a command line
>to start Java. In version 6 this does no more work correctly. If I say:
>InstallJava[CommandLine->"name of new  java"]
>the old Java of mathematica is loaded, despite the option. However, if I
>prevent mathematica to find the java executable by renaming the
>corresponding folder, the correct java is now loaded.


Java is now launched at startup time, so when you call 
InstallJava[CommandLine->"..."] J/Link just returns the current Java 
link. What you need to do is force Java to restart with your desired options:


Incidentally, the pre-launch of Java has been anticipated for a long 
time, so the J/Link User Guide has been warning about it for several 
years: "Programmers should not assume that they have the ability to 
control the launch of the Java runtime, as it might already be 
running. If for some reason you absolutely must apply options to 
control the launch of the Java runtime, use ReinstallJava instead of 


  • References:
    • JLink
      • From: dh <>
  • Prev by Date: Re: FindFit and complex function?
  • Next by Date: Re: IsExact
  • Previous by thread: JLink
  • Next by thread: Re: JLink