Menu

x64 executable for Windows

2010-11-16
2013-10-14
  • Mike Paluchowski

    Is there a chance you could add an x64 executable to the Windows distribution of Freemind? The existing x86 one doesn't find x64 Java and I have to launch the program via the .bat script, which further leads to .mm file associations not working.

    As half of Windows 7 users are using the x64 version of Windows, this will be a growing problem.

     
  • Christian Foltin

    Hi,

    what is the difference between the two javas (32 and 64bit)? I don't have windows here.

    TIA, Chris

     
  • LogicDaemon

    LogicDaemon - 2010-11-16

    christianfoltin, 32-bit java launcher located %SystemRoot%\system32\java.exe, 64-bit system files are in %SystemRoot%\SysWOW64\, I don't think there are other difference. This is why .bat works: it just launches java, which is looked thru %path%, and SysWOW64 is there.

     
  • Mike Paluchowski

    Perhaps a separate executable isn't needed at all. I mingled with the .bat script a bit and if I change:

    java -cp …

    to

    start javaw - cp…

    then I'm getting close to what I want. The command line window disappears, I can add a shortcut to the start menu referring to the .bat script and the application launches correctly.

    This doesn't however, solve the problem of .mm file associations.

     
  • LogicDaemon

    LogicDaemon - 2010-11-17

    redmagic, to get association do this on command prompt:

    assoc .mm=Freemind
    ftype Freemind=cmd.exe /C "c:\Program Files\FreeMind\freemind.bat" "%1"
    

    and add

    CD /D "%~dp0"
    

    to freemind.bat before "java …". But you'll get flashing console window at launch.

    As alternative, you may want to write full java -cp  line to ftype:
    ftype Freemind=javaw -cp "c:\Program Files\FreeMind\lib\freemind.jar";"c:\Program Files\FreeMind\lib\commons-lang-2.0.jar";"c:\Program Files\FreeMind\lib\forms-1.0.5.jar";"c:\Program Files\FreeMind\lib\jibx\jibx-run.jar";"c:\Program Files\FreeMind\lib\jibx\xpp3.jar";"c:\Program Files\FreeMind\lib\bindings.jar" freemind.main.FreeMindStarter "%1"

     
  • LogicDaemon

    LogicDaemon - 2010-11-17

    oops,

    ftype Freemind=javaw -cp "c:\Program Files\FreeMind\lib\freemind.jar";"c:\Program Files\FreeMind\lib\commons-lang-2.0.jar";"c:\Program Files\FreeMind\lib\forms-1.0.5.jar";"c:\Program Files\FreeMind\lib\jibx\jibx-run.jar";"c:\Program Files\FreeMind\lib\jibx\xpp3.jar";"c:\Program Files\FreeMind\lib\bindings.jar" freemind.main.FreeMindStarter "%1"
    

    And remember to replace

    c:\Program Files\FreeMind\
    

    with path to your FreeMind location

     
  • Daniel Polansky

    Daniel Polansky - 2010-11-17

    What I do not understand is this: Why does Freemind.exe not find the right java in Windows x64? Freemind.exe just launches javaw.exe, unless Freemind.exe comes from the installer that has Java bundled with FreeMind. Are you using FreeMind with Java bundled?

    Java is bundled with FreeMind-Windows-Installer-0.9.0_RC_10-max-java-installer-embedded.exe

    Java is not bundled with FreeMind-Windows-Installer-0.9.0_RC_10-max.exe

    The installer that is currently selected in SourceForge as the default one for Windows is the one with Java bundled, and the bundled Java is probably the 32bit one. I am not sure setting the bundled Java as default Windows installer is a good idea; I would go for the installer without bundled Java.

    -Dan

     
  • Mike Paluchowski

    @logicdaemon Hack-ish, but should do the trick. Thanks. Now if only the installer could do all these things for me :)

    @danielpolansky I use the version sans Java, not the one with the installer, but the .zip distribution. I just realized that I never checked whether the executable works :) And… it does. I can run Freemind.exe and it does find Java and launch the program correctly.

    I used the .zip distro because the installer was first complaining that it can't find Java (because I have no 32 bit Java installed) and then insisted on installing into the Program Files (x86) folder.

    So the baseline is that Freemind does work correctly with x64 Java. What I could be asking, though, is to make it work flawlessly, without any extra warnings, error messages and the like :)

     
  • LogicDaemon

    LogicDaemon - 2010-11-20

    @redmagic, as long as freemind.exe works for you, shorten the FreeMind file type:

    assoc .mm=Freemind
    ftype Freemind="c:\Program Files\FreeMind\FreeMind.exe" "%1"
    

    (don't forget to replace

    c:\Program Files\FreeMind\
    

    with path to your FreeMind), and you're done.

    This is just what FreeMind installer do (you may check it with

    ftype Freemind
    

    after installing Freemind on clean system).

    rem: in batch file, you must screen % symbol in "%1" by second "%", so this is how batch file looks (associate.bat for example):

    assoc .mm=Freemind
    ftype Freemind="c:\Program Files\FreeMind\FreeMind.exe" "%%1"
    
     
  • Christian Foltin

    Hi redmagic,

    > the installer was first complaining that it can't find Java (because I have no 32 bit Java installed) and then insisted on installing into the Program Files (x86) folder.

    The question for me is, what is wrong with the installer.
    First of all, I didn't manage to get java 64bit from java.com. It always directs me to the same page. Is there a special 64bit version at all?
    Second, the installer uses

      if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\JavaSoft\Java Runtime Environment', 'CurrentVersion', AVersion) then
      begin
        if (AVersion = '1.4') or (AVersion = '1.5') or (AVersion = '1.6') or (AVersion = '1.7') then
            Result := True;
      end;
    

    to detect java on the system. What is this in your case?
    Third: what does x86 folder mean? Where should it install into?

    TIA, Chris

     
  • Mike Paluchowski

    @christianfoltin

    I admit I don't know the mechanics of Windows in this case very well. But I did some research and:

    1) When you're running 64bit Windows, it has different registry values for 32 and 64bit applications. See here for an explanation:
    http://stackoverflow.com/questions/869783/windows-64-bit-registry-v-s-32-bit-registry

    So if I have only 64bit Java installed on my system, then 64bit applications looking for the registry value you mentioned will find it, while 32bit applications (like Freemind) will not. Hence the installer warning.

    2) Windows, if I read correctly, determines the type of application (32 or 64bit) based on the 'TargetPlatform' property set in the installer:
    http://msdn.microsoft.com/en-us/library/cd7a85k9.aspx

    If the target platform is x86, then the application will install (on a 64bit system) by default to C:\Program Files (x86)\, while if the platform is x64, then it will install to regular C:\Program Files\. This means that a x64 system treats x86 applications as 'exceptions', while x64 ones are treated as standard.

    Now, considering 1) and 2), Freemind is somewhere in between. It's neither x86 nor x64, it's both, because it can run on both systems, dependent only on the JVM. Perhaps you can configure the installer somehow to take that into account? On 64bit systems with x64 Java it'll be treated as an x64 application, while in any other case it'll work as x86?

    I know that's doable, because for instance the freeware application Paint.NET works this way: http://www.getpaint.net/ - one installer handles both cases.

     
  • Jeffrey Smith

    Jeffrey Smith - 2011-10-03

    This is a very annoying software defect. It is still present 2011-Oct-03. I am using Windows 7 Home Edition, 64-bit Java 7.

     
  • Anonymous

    Anonymous - 2012-08-01

    It is still present 2012-AUG-01. I am using Win 7, 64-bit Java 7.

    Adding Java "bin" folder to PATH helps. But this is not clean as on my system path there is already java.exe in C:\Windows\System32

     
  • Thierry

    Thierry - 2012-09-14

    I had the same issue after installing "FreeMind-Windows-Installer-1.0.0_Beta_6-max-java-installer-embedded.exe"

    I first uninstalled / reinstalled it (multiple time, even added all possible combination of environment variables)

    I then installed FreeMind-Windows-Installer-1.0.0_Beta_1-max-java-installer-embedded.exe (with no Environment variable entries added) and then change the content of:
    C:\Program Files (x86)\FreeMind\Freemind.bat

    To

    @echo off
    start C:\Windows\SysWOW64\javaw -Xmx256M -Xss8M -cp lib\freemind.jar;lib\commons-lang-2.0.jar;lib\forms-1.0.5.jar;lib\jibx\jibx-run.jar;lib\jibx\xpp3.jar;lib\bindings.jar;lib\jortho.jar freemind.main.FreeMindStarter

    (make sure to return to the line after @echo off)

    It worked

    I then installed FreeMind-Windows-Installer-1.0.0_Beta_6-max-java-installer-embedded.exe (Note: it will show as Beta 7 when FreeMind starts)

    I had to change as above again i.e.:
    C:\Program Files (x86)\FreeMind\Freemind.bat

    To

    @echo off
    start C:\Windows\SysWOW64\javaw -Xmx256M -Xss8M -cp lib\freemind.jar;lib\commons-lang-2.0.jar;lib\forms-1.0.5.jar;lib\jibx\jibx-run.jar;lib\jibx\xpp3.jar;lib\bindings.jar;lib\jortho.jar freemind.main.FreeMindStarter

    It works!

     
  • Hilbert

    Hilbert - 2013-10-08

    The 64-bit-Java-on-64-bit-Windows-7 problem is still there in FreeMind 1.0.0.RC5!! Haven't any of the the developers noticed yet?!!!

    First: The problem DOES NOT exist with the FreeMind forks, specifically Freeplane 1.2.23 and Docear 1.0.0.15 rc build 213 -- these work perfectly from first install with 64-bit Java.

    Second: Here, the latest Java run-time was used, i.e.: Java 7, update 40, 64-bit - file jre-7u40-windows-x64.exe.

    Third: Although the 64-bit jre installs in the "Program Files" dir and not the (x86) one, java.exe, javaw.exe and javaws.exe end up being installed in the system32 dir--and nothing goes in the sysWOW64, thus stuff referenced there won't obviously work.

    Fourth: To solve the problem I just copied javaw.exe from the system32 to the sysWOW64 dir. (To remind myself of this action later, I then copied 'javaw.exe' to 'javaw_exe_copied_fm_sys32_dir.ex_' which now appears directly under javaw.exe in the listing.)

    (PS: For some reason adding 'C:\Program Files\jre7\bin' to the system path did not work.)

    All now seems to work AOK.

    For heavens sake developers, please fix this--the simplest of problems: clearly those who've developed forks of FreeMind certainly have!

     
    • Adrien Beau

      Adrien Beau - 2013-10-14

      This problem was discussed in this thread: http://sourceforge.net/p/freemind/discussion/22101/thread/7948fe4f/

      Hopefully FreeMind 1.0.0 RC6 or 1.0.0 final will include the fix.

       

Log in to post a comment.