#2379 64-bit Win Launcher

SlimerDude Tue 18 Nov 2014

As mentioned in numerous places on the forum, the standard fan.exe launcher for Windows don't work on 64-bit machines (or more specifically, with 64-bit Java installations).

The work around for this is to replace the fan.exe with a fan.cmd:

@java -cp %FAN_HOME%\lib\java\sys.jar fanx.tools.Fan %*

The other Fantom .exe files can then also be converted to .cmd files. Example, fanr.exe becomes fanr.cmd:

@java -cp %FAN_HOME%\lib\java\sys.jar fanx.tools.Fan fanr %*

or just:

@fan fanr %*

These window scripts (presumably) work on both 32 and 64 bit machines, but tomcl recently pointed out that the majority of Windows users are probably running 64 bit machines.

Question

So my question then is, why does the Fantom installation still ship with fan.exe and the other executables? Or rather, what is the advantage of using the .exe over a .cmd?

I've been using the .cmd versions for some time now, with no discernable problems.

brian Tue 18 Nov 2014

The simple batch file script doesn't do all the stuff that the exe does. The exe does a ton of things for reading from etc/sys/config.props and handling bootstrap builds. Given its complexity I am not sure it could easily be fully created as a batch file, think it would be better to do it as powershell which is pretty widely deployed now

SlimerDude Thu 20 Nov 2014

Cool, so the .exe files are used for bootstrap builds.

Reading the Windows CMD Line Syntax it seems .cmd files can do conditionals, loops and functions but the syntax looks brittle and awkward. PowerShell may well be the way forward.

Is this bit of work ear-marked for the next Fantom release? It strikes me as being quite beneficial to a lot of users.

SlimerDude Sat 10 Jan 2015

To make it easy for 64-bit Windows users to get started, I've created a 64-bit compatible version of the Fantom 1.0.67 distribution with:

  • .exe files replaced with .cmd files
  • a 64-bit swt.jar file for FWT

Fanny on Windows Details and download available @ Fantom on Windows 64-Bit.

controlsforall Sat 10 Jan 2015

Thank you for the effort SlimerDude.

Login or Signup to reply.