Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

64 bit Java on Windows 7 not seen #89

Closed
jim618 opened this issue Mar 22, 2013 · 20 comments
Closed

64 bit Java on Windows 7 not seen #89

jim618 opened this issue Mar 22, 2013 · 20 comments
Milestone

Comments

@jim618
Copy link
Contributor

jim618 commented Mar 22, 2013

From mailing list:
A cursory search for the terms java and/or 64 bit didn't bring anything. So I apologize if it this has been covered. I have a 64 bit java installation but multibit can't find it. And before the suggestion comes that I should downgrade to 32 bit java, there is a reason I need the 64 bit support. I ... require over 4 gigabytes of ram.

@jim618
Copy link
Contributor Author

jim618 commented Mar 22, 2013

The multibit.exe that is installed in your MultiBit installation directory searches for a Java runtime to use and is not picking up your 64 bit JVM. This is a bug. As a workaround you could try downloading the multibit-exe.jar executable jar for your release (https://multibit.org/releases) and putting it in your installation directory. Then try starting it directly using:

java -jar multibit-exe.jar

You can also substitute a path to your javaw.exe instead of the "java' above.

@gary-rowe
Copy link
Contributor

Might need to update the IzPack install configuration: http://maksim.sorokin.dk/it/2011/03/24/izpack-adding-64bit-support/

<native type="3rdparty" name="COIOSHelper.dll" stage="both">
  <os family="windows" />
</native>
<native type="3rdparty" name="COIOSHelper_x64.dll" stage="both">
  <os family="windows" />
</native>

For ShortcutPanel, you will also have to deliver 64bit dlls:

<native type="izpack" name="ShellLink.dll">
  <os family="windows" />
</native>
<native type="izpack" name="ShellLink_x64.dll">
  <os family="windows" />
</native>

@jim618
Copy link
Contributor Author

jim618 commented Mar 24, 2013

Another similar report:

I installed the latest 64 bit JVM 7u15 from Oracle on my Windows 7 Ultimate desktop.
The multibit installer complains “Java is not found on your computer”. When I install a 32 bit JVM the installer works. The website states, that multibit works on both architectures.

Am I doing something wrong?

Thx.

REPLY

I think the MultiBit installer is probably missing the search path for
the 64 bit version. (It probably needs updating). I'll raise it on
github - so it does not get lost and other people can see it.

I'll also put in your workaround of using a 32 bit Java so people can
get it working.

Thanks for the heads up.

@moneytoo
Copy link

moneytoo commented Apr 7, 2013

Same issue for me.

c:\>echo %PATH%
c:\Program Files\Java\jdk1.7.0_11\bin\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;c:\chromium\depot_tools\;C:\Program Files (x86)\Nmap;c:\OpenSSL-Win64\bin\
c:\>dir "C:\Program Files\Java"
 Volume in drive C is cecko
 Volume Serial Number is 9462-8413

 Directory of C:\Program Files\Java

27. 01. 2013  01:01    <DIR>          .
27. 01. 2013  01:01    <DIR>          ..
27. 01. 2013  01:01    <DIR>          jdk1.7.0_11
27. 01. 2013  01:01    <DIR>          jre7
               0 File(s)              0 bytes
               4 Dir(s)  58 851 246 080 bytes free
c:\>java -version
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

@gary-rowe
Copy link
Contributor

I don't have access to 64-bit Windows here, but I can put together a trial installer if anyone would be willing to test it out. Jim, can you let me know the most appropriate branch to base my trial on?

@jim618
Copy link
Contributor Author

jim618 commented Apr 7, 2013

Cheers Gary !
the next test release uses:

bitcoinj clone branch: bcj-master-mb-alice
multibit branch: mb-0.5-bcj-0.8-alice

(I am going to use alice, bob, carol, diana etc - don't want another number in the version of the bitcoinj clone !)

@jim618
Copy link
Contributor Author

jim618 commented Apr 9, 2013

This fix appears in the 0.5.9-SNAPSHOT code (https://multibit.org/releases).
Can someone with a Win64 machine please test it out ?

Thanks

@moneytoo
Copy link

moneytoo commented Apr 9, 2013

I tested both multibit-0.4.23-windows.exe and multibit-0.5.9-SNAPSHOT-windows.exe on my machine at work. I uninstalled both 32-bit and 64-bit versions of JDK, restarted and installed 64-bit version only. Previously both versions of multibit found Java but neither version worked with 64-bit JDK/JRE only.

I also removed java from PATH so this is what Java installer does (I didn't know that, it seems quite new):

c:\>WHERE java
C:\Windows\System32\java.exe

@jim618
Copy link
Contributor Author

jim618 commented Apr 15, 2013

Unfortunately the utility I use to produce the exe file from the executable jar (jsmooth) does not support 64 bit JDK/ JREs. See:
http://stackoverflow.com/questions/1967549/java-packaging-tools-alternatives-for-jsmooth-launch4j-onejar

The only viable suggestion in there is to use JFX and Java 7.

@da2ce7
Copy link
Contributor

da2ce7 commented Jun 9, 2013

The other option is to make a shortcut to a little batch file that executes the .jar file directly.
I did this for Moneychanger (now otapiJ-test-gui). Including code to check for both x64 and 32bit Java.

@da2ce7
Copy link
Contributor

da2ce7 commented Jun 10, 2013

I think that this code would work fine for MultiBit:

@echo off

set START_DIR=%cd%

if "%JAVA_HOME%"=="" call:FIND_JAVA_HOME

cd /D "%~dp0multibit"

call "%JAVA_HOME%\bin\java.exe" -jar multibit-windows.jar

cd /D %START_DIR%

goto:END

:FIND_JAVA_HOME
FOR /F "skip=2 tokens=2*" %%A IN ('REG QUERY "HKLM\Software\JavaSoft\Java Runtime Environment" /v CurrentVersion') DO set CurVer=%%B

FOR /F "skip=2 tokens=2*" %%A IN ('REG QUERY "HKLM\Software\JavaSoft\Java Runtime Environment\%CurVer%" /v JavaHome') DO set JAVA_HOME=%%B

if not "%CurVer%"=="" if not "%JAVA_HOME%"=="" goto:EOF

FOR /F "skip=2 tokens=2*" %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\JavaSoft\Java Runtime Environment" /v CurrentVersion') DO set CurVer=%%B

FOR /F "skip=2 tokens=2*" %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\JavaSoft\Java Runtime Environment\%CurVer%" /v JavaHome') DO set JAVA_HOME=%%B

goto:EOF

:END

@mikehearn
Copy link

FYI although the bundling tool is technically a part of JavaFX, I believe it does not require the usage of the JFX widget toolkit in the app. It should work for Swing apps too.

@jim618
Copy link
Contributor Author

jim618 commented Aug 24, 2013

I am working on bundling a JVM for Windows - it should be in release 0.5.14

@makruz
Copy link

makruz commented Nov 7, 2013

Version 0.5.14 does not find Jave on my Windows 7 64-bit. So I assume it is NOT fixed yet?

@deglavs
Copy link

deglavs commented Nov 28, 2013

Version 0.5.15 also does not find Java on my Windows 8.1 64-bit. Fix it please! :)
The path is C:\Program Files\Java\jdk1.7.0_45\bin

@gary-rowe
Copy link
Contributor

Another thread (#324) has mentioned that running the installer with compatibility mode set as "Windows XP SP3" has given them success:

"Hey guys, I solved this problem on windows 7 64bit I had the same problem. Just change compability settings: "Run this program in compability mode for Windows XP SP3". And also check the box "Run this program as an administrator". It helped me" - @bitcoiner1488

@riclas
Copy link

riclas commented Dec 9, 2013

that workaround does not work for me for the installer.
windows 7 64bit, java 1.7.0_45

@lowenest
Copy link

lowenest commented Jan 1, 2014

multibit-0.5.16-windows-setup.exe,Windows 7 64-bit
C:\Program Files\Java\jdk1.7.0_45
C:\Program Files\Java\jre7

without any JRE or JDK on path"C:\Program Files (x86) " I has the same problem 。@jim618 thanks

I downloaded the multibit-exe.jar executable jar file from release (https://multibit.org/releases) and putting it in my disk C:\ . Then instead of try starting it directly using:"java -jar multibit-exe.jar" ,I double click the jar file and it works.

@gary-rowe
Copy link
Contributor

MultiBit HD addresses this by bundling a JDK via JWrapper so I think this can be closed.

@Bjonnfesk
Copy link

I won't speak to MultiBit or JWrapper, but the exact same issue is present in JSmooth-wrapped applications. It will spit an error along the lines of "Java has not been found on your computer, would you like to download it?", even though the Java bin directory is added to the path variable and works fine with other applications. As with MultiBit, installing 32-bit Java alongside 64-bit works as a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants