#1600 Win7 launch

Akcelisto Tue 2 Aug 2011

I launch fan.exe and nothing happens. Altrough in XP fan.exe writes in console.

I add to fan.exe in properties: "launch from administrator" and "compatibility with XP 3". But this not help.

What wrong?

DanielFath Tue 2 Aug 2011

Did you add it to your Path variable? I'm running Win7 and I got no such problems.

brian Tue 2 Aug 2011

You can see how to turn on debug in Setup chapter

If you can't get it to work, then you can just use Java command line too - see here

Akcelisto Wed 3 Aug 2011

I used launcher debug:

1st try:

c:\Programs\Fantom\bin>fan
-- launcher version 1.0.50 2-Feb-10
--   args[0] = "fan"
-- init
--   fanHome = c:\Programs\Fantom
--   config.props:
--     runtime=java
--     java.options=-Xmx512M
--     runtime.substitutes=/E:/fan/src/buildall.fan           = E:\rel  /E:/fan/
src/buildboot.fan          = E:\rel  /E:/fan/src/sys/build.fan          = E:\rel
  /E:/fan/src/sys/java/build.fan     = E:\rel  /E:/fan/src/sys/js/build.fan
  = E:\rel  /E:/fan/src/sys/dotnet/build.fan   = E:\rel  /E:/fan/src/compiler/bu
ild.fan     = E:\rel  /E:/fan/src/compilerJava/build.fan = E:\rel  /E:/fan/src/b
uild/build.fan        = E:\rel
-- parseArgs
--   fanArgs (0)
-- getRuntime = java
-- findJvmPath
ERROR: Cannot read registry: SOFTWARE\JavaSoft\Java Runtime Environment CurrentV
ersion

2nd try with path to jdk:

c:\Programs\Fantom\bin>fan
-- launcher version 1.0.50 2-Feb-10
--   args[0] = "fan"
-- init
--   fanHome = c:\Programs\Fantom
--   config.props:
--     runtime=java
--     java.jvm=c:\Program Files\Java\jdk1.6.0_26\jre\bin\server\jvm.dll
--     java.options=-Xmx512M
--     runtime.substitutes=/E:/fan/src/buildall.fan           = E:\rel  /E:/fan/
src/buildboot.fan          = E:\rel  /E:/fan/src/sys/build.fan          = E:\rel
  /E:/fan/src/sys/java/build.fan     = E:\rel  /E:/fan/src/sys/js/build.fan
  = E:\rel  /E:/fan/src/sys/dotnet/build.fan   = E:\rel  /E:/fan/src/compiler/bu
ild.fan     = E:\rel  /E:/fan/src/compilerJava/build.fan = E:\rel  /E:/fan/src/b
uild/build.fan        = E:\rel
-- parseArgs
--   fanArgs (0)
-- getRuntime = java
-- findJvmPath
--   java.jvm = c:\Program Files\Java\jdk1.6.0_26\jre\bin\server\jvm.dll
-- initOptions
--   options:
--     -Djava.class.path=c:\Programs\Fantom\lib\java\sys.jar
--     -Dfan.home=c:\Programs\Fantom
--     -Xmx512M
-- loadJava
--   load c:\Program Files\Java\jdk1.6.0_26\jre\bin\server\jvm.dll...
ERROR: Cannot load library: c:\Program Files\Java\jdk1.6.0_26\jre\bin\server\jvm
.dll

3rd try with path to jre:

c:\Programs\Fantom\bin>fan
-- launcher version 1.0.50 2-Feb-10
--   args[0] = "fan"
-- init
--   fanHome = c:\Programs\Fantom
--   config.props:
--     runtime=java
--     java.jvm=c:\Program Files\Java\jre6\bin\server\jvm.dll
--     java.options=-Xmx512M
--     runtime.substitutes=/E:/fan/src/buildall.fan           = E:\rel  /E:/fan/
src/buildboot.fan          = E:\rel  /E:/fan/src/sys/build.fan          = E:\rel
  /E:/fan/src/sys/java/build.fan     = E:\rel  /E:/fan/src/sys/js/build.fan
  = E:\rel  /E:/fan/src/sys/dotnet/build.fan   = E:\rel  /E:/fan/src/compiler/bu
ild.fan     = E:\rel  /E:/fan/src/compilerJava/build.fan = E:\rel  /E:/fan/src/b
uild/build.fan        = E:\rel
-- parseArgs
--   fanArgs (0)
-- getRuntime = java
-- findJvmPath
--   java.jvm = c:\Program Files\Java\jre6\bin\server\jvm.dll
-- initOptions
--   options:
--     -Djava.class.path=c:\Programs\Fantom\lib\java\sys.jar
--     -Dfan.home=c:\Programs\Fantom
--     -Xmx512M
-- loadJava
--   load c:\Program Files\Java\jre6\bin\server\jvm.dll...
ERROR: Cannot load library: c:\Program Files\Java\jre6\bin\server\jvm.dll

But via java it works:

c:\Programs\Fantom\bin>java -cp %fan_home%\lib\java\sys.jar fanx.tools.Fan -vers
ion
Fantom Launcher
Copyright (c) 2006-2011, Brian Frank and Andy Frank
Licensed under the Academic Free License version 3.0

Java Runtime:
  java.version:    1.6.0_26
  java.vm.name:    Java HotSpot(TM) 64-Bit Server VM
  java.vm.vendor:  Sun Microsystems Inc.
  java.vm.version: 20.1-b02
  java.home:       C:\Program Files\Java\jre6
  fan.platform:    win32-x86_64
  fan.version:     1.0.59
  fan.env:         sys::BootEnv
  fan.home:        C:\Programs\Fantom

I never have problems with launch on XP.

brian Wed 3 Aug 2011

The launcher programs are 32-bit, you might want to check that your installed Java is not 64-bit

SlimerDude Wed 25 Jul 2012

If using 64 bit Java on a 64 bit Windoze machine you can delete / rename bin/fan.exe and create the following bin/fan.cmd:

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

which allows you to run .fan scripts and Fantom main methods. e.g.

fan build.fan
fan afGundam
fan afGundam::Main

Login or Signup to reply.