#2443 Setup problem

Atul Shanbhag Fri 21 Aug 2015

I am on Windows 10 and was trying to setup fantom. I have java and jre installed to the latest versions on my pc and they both work fine (I can run java code). I setup fantom, extracted it as C:\Program Files\Fantom\fantom-1.0.67. I set my environment variable as FAN_HOME with C:\Program Files\Fantom\fantom-1.0.67. Also in system variables I put C:\Program Files\Fantom\fantom-1.0.67\bin. On trying fan -version I get this error ERROR: Cannot read registry: SOFTWARE\JavaSoft\Java Runtime Environment CurrentVersion. Help me out.

SlimerDude Fri 21 Aug 2015

I am on Windows 10

Ah, there's your problem! :) Not really...

Cannot read registry: SOFTWARE\JavaSoft\Java Runtime Environment CurrentVersion.

Sounds like you have a 64 bit JVM installed, try this article:

Fantom on Windows 64-Bit

tl;dr

Use the Fantom Installer for Windows

...or...

Download a 64 bit Fantom installation: fantom-1.0.67-win32-x86_64.zip (9.48 MB)

...or...

Replace fan.exe with fan.cmd:

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

matthew Fri 21 Aug 2015

If you pull the latest changes from our Bitbucket repo, you will see that we have gotten rid of the fantom executables on windows, and now use windows batch files. This allows us to get around the 64-bit issue with the executables.

Check out this post for some background on that.

Atul Shanbhag Fri 21 Aug 2015

Error: Could not find or load main class Files\Fantom\fantom-1.0.67\lib\java\sys.jar

I get this error on trying the 64bit version which has no .exe files. I also tried the java command on existing 32bit version and that too gave same error

matthew Fri 21 Aug 2015

Ok looks like a problem with installing Fantom in a directory path that contains spaces in it (e.g. "Program Files"). I'll look at that. But you could probably get around that by moving your installation into a path that doesn't contain any spaces.

Atul Shanbhag Fri 21 Aug 2015

Okay the Fantom installer worked. But I don't understand one thing. I installed Fantom for all systems and not just this user so in environment variables there was variable declared under system variables obviously. But fan -version didn't work until I added a variable to this user too.

Jeremy Criquet Fri 21 Aug 2015

I'm a fan of C:/dev/fantom/

matthew Fri 21 Aug 2015

I just pushed a changeset that fixes the batch files to handle directories with spaces in them. So you can pull that and try it out.

But, personally, I'm a fan of never installing software into a path that has spaces in it on Windows.

SlimerDude Sat 22 Aug 2015

@jcriquet - yeah, it's C:\Apps\fantom\ for me! I stick everything, bar MS products, in C:\Apps\

@Atul Shanbhag - thanks for the update. The spaces issue has been addressed in the Fantom Installer but I had not copied it over to the .zip file. It's now fixed in both places.

Login or Signup to reply.