Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2007

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

Search the Archive

Re: JLink

  • To: mathgroup at
  • Subject: [mg82104] Re: JLink
  • From: John Jowett <John.M.Jowett at>
  • Date: Fri, 12 Oct 2007 02:55:33 -0400 (EDT)
  • References: <><far9so$4ci$>

Before my last post appeared, I found the answer myself. Change "java"
to "javaw" in

ReinstallJava[CommandLine->"C:\\Program Files\\Java\\jre1.6.0_02\\bin\

However I can claim that I was misled by the page JLink/tutorial/
in the Mathematica 6 Help system, which explicitly suggests using

ReinstallJava[CommandLine -> "d:\\full\\path\\to\\java.exe"]

This should be corrected, I think.

John Jowett

On Aug 26, 9:25 am, Todd Gayley <tgay... at> wrote:
> At 11:57 PM 8/22/2007, dh wrote:
> >Hello,
> >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.
> >Daniel
> Daniel,
> 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:
>      ReinstallJava[CommandLine->"..."]
> 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, useReinstallJavainstead of
> InstallJava."
> --Todd- Hide quoted text -
> - Show quoted text -

  • Prev by Date: Re: Just for fun: Shortest InputForm to achieve a given Kernel error
  • Next by Date: Re: Re: problem with contourplot
  • Previous by thread: Re: Non-numeric arguments to Compile-d functions
  • Next by thread: Re: JLink