#1 2018-03-29 22:08:05

elsie
Member
Registered: 2018-03-29
Posts: 8

Windows Java

I have Java v10 64-bit installed.

I tried to install the Windows version of GeneralSync (GeneralSync_0.1.3.7b.exe) but it said I did not have java - presumably wanting the 32-bit version. So I downloaded jre-8u161-windows-i586.exe and installed 32-bit Java 8.161. General Sync still gave the no compatible Java Runtime error and failed to install.

So I downloaded the GeneralSync_0.1.3.7b.zip and put the contents in a Program(x86) folder. The .EXE would still not run and gave a java missing or not properly installed error.

#2 2018-03-29 23:58:08

ds
Founder / Developer
From: Freiburg, Germany
Registered: 2016-06-15
Posts: 263

Re: Windows Java

elsie wrote:

I have Java v10 64-bit installed.

Thanks for the feedback. Java 10 seems to have changed the way version numbers are assigned, which causes the code checking the Java version to consider installations of Java 10 to be damaged.

Workaround: you can start GeneralSync by double-clicking on generalsync.jar in the zip file. All pairings and synced data continue to be available after you install a fixed version, so you can safely start using GeneralSync and later install a fixed version. However, you need to manually start GeneralSync whenever you log in (or add it to Autostart).

Regarding 32 bit vs 64 bit: while GeneralSync uses the 32bit-Program Folder, it will always use the default JVM for your machine. If your default Java installation is 64 bit (which it is in most cases), any 32 bit version of Java is ignored.

Sorry for the confusion, a fixed version will be available soon.

#3 2018-03-30 00:23:05

ds
Founder / Developer
From: Freiburg, Germany
Registered: 2016-06-15
Posts: 263

Re: Windows Java

Short update: I only looked at the installer; the launcher (generalsync.exe) works for me. Note that Java 10 might require a restart of the PC after installation.

An updated installer will be available soon.

#4 2018-03-30 03:28:25

ds
Founder / Developer
From: Freiburg, Germany
Registered: 2016-06-15
Posts: 263

Re: Windows Java

The update has been released on the "beta" update channel.

To download the fixed installer, open the download page and look below the download button. There you can find the update channel you're currently on. Click "change..." and select the beta channel. Once you return to the download page, you can then download the new version 0.1.3.8b.

Does that version work as expected?

#5 2018-03-30 09:25:59

elsie
Member
Registered: 2018-03-29
Posts: 8

Re: Windows Java

I have run one other significant java program, jAlbum, without any problems. The installers include Java for both the 32- and 64-bit versions and java is installed in an application sub-directory

This PC has had many reboots since Java 10 was installed.

I ran GeneralSync from the .jar without any problems. After quitting GeneralSync,

I downloaded GeneralSync_0.1.3.8b.exe and tried to install it. It stopped at the same point with the no compatible Java Runtime error message.

I then tried the .jar again and that asked me to update it to the latest version. I did the update but the .jar failed with a Java missing error. But when I ran it  a second time it started the Sync Dashboard. The timestamp for all the files in the directory were updated to the new install time.

There is no uninstall program for the application and it does not show up in the Windows Control Panel(Or other uninstall programs)

#6 2018-03-30 15:45:09

ds
Founder / Developer
From: Freiburg, Germany
Registered: 2016-06-15
Posts: 263

Re: Windows Java

elsie wrote:

I have run one other significant java program, jAlbum, without any problems. The installers include Java for both the 32- and 64-bit versions and java is installed in an application sub-directory

I haven't been able to find a version of jAlbum containing Java 10. I found a copy installing Java 9 in a sub-directory, but in this case Java is not made available for other applications.

Where did you download Java / with what Application was it bundled?

elsie wrote:

I then tried the .jar again and that asked me to update it to the latest version. I did the update but the .jar failed with a Java missing error. But when I ran it  a second time it started the Sync Dashboard. The timestamp for all the files in the directory were updated to the new install time.

It seems as if Windows knows of a Java installation (double-click on jar files work), but this version of Java has not been registered as default. GeneralSync thus cannot start Java (such as when restarting after the update), but it can run without issues.

Either you installed a version of Java that is not intended to be used from other programs, or the installation failed. Either way, re-installing Java should fix the issue. Standalone installers for Java 10 are available from Oracle.

If you're not bound to Java 10, you can alternatively simply install the latest recommended version from the Java homepage (at the time of writing, this will install Java 8. Oracle doesn't yet recommend end-users to use later versions).

In both cases, use the 64 bit version.

elsie wrote:

There is no uninstall program for the application and it does not show up in the Windows Control Panel(Or other uninstall programs)

Windows only shows installed Programs. If you complete the installer, GeneralSync will be listed there.

Simply unpacking a zip archive will not lead to an entry in the "uninstall programs" section, as Windows has no metadata about the installation. To uninstall, you can just delete the GeneralSync folder you created.

#7 2018-03-30 17:54:44

elsie
Member
Registered: 2018-03-29
Posts: 8

Re: Windows Java

I've just checked and the 64-bit jAlbum installation I have and it has installed the 64-bit Java v9 in the sub-directory.

I have the 64-bit J v10 as it was a recommended by FileHippo as an upgrade from 64-bit J 1.8

I am not sure which the 32-bit version of jAlbum installs, but presumably Java v8 as Oracle are not going to update the 32-bit version to Java v9 or later. I know that might be a problem as there are differences between Java 8 and Java 9/10 which I encountered on another program on my home PC (possibly Yawcam or jSunnyReports); I'm on holiday at present.

When I ran the Java Control Panel it shows the 64-bit J 1.8 and J 10 and the 32-bit J 1.8 versions as web-enabled.

As I indicated, when the program did not work I downloaded 32-bit J 1.8.

I have now uninstalled all three versions of Java, deleted GeneralSync, rebooted, downloaded and reinstalled 64-bit J 1.8, rebooted and tried to install GeneralSync_0.1.3.7b.exe. The install failed with the Java missing error. I tried to install GeneralSync_0.1.3.8b.exe and that failed with the Java missing error.

I then installed the 32-bit J 1.8, rebooted, and tried both versions of the GeneralSync install; they both failed  with the Java missing error.

#8 2018-03-30 22:09:49

ds
Founder / Developer
From: Freiburg, Germany
Registered: 2016-06-15
Posts: 263

Re: Windows Java

elsie wrote:

I have now uninstalled all three versions of Java, deleted GeneralSync, rebooted, downloaded and reinstalled 64-bit J 1.8, rebooted and tried to install GeneralSync_0.1.3.7b.exe. The install failed with the Java missing error. I tried to install GeneralSync_0.1.3.8b.exe and that failed with the Java missing error.

I'm still unable to reproduce the issue. It is likely that something messed up your Java installation in a way preserving across reinstallations.

To check which part of the installation is damaged, open a Terminal window (open the start menu, type "cmd" and press enter). A black window with white text appears, where you can enter commands.

Type the following commands, each followed by enter:

echo %PATH%
dir C:\ProgramData\Oracle\Java\javapath
C:\ProgramData\Oracle\Java\javapath\java.exe -version
java -version

and post the output. You can copy and paste in the window using the context menu (right mouse key).

#9 2018-03-31 08:50:19

elsie
Member
Registered: 2018-03-29
Posts: 8

Re: Windows Java

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\elsie>echo %PATH%
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\Window
sPowerShell\v1.0\;C:\Program Files (x86)\Intel\UCRT\;C:\Program Files\Intel\UCRT
\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Prog
ram Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)
\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R)
Management Engine Components\IPT;C:\Users\elsie\AppData\Local\Programs\Python\P
ython36-32\Scripts\;C:\Users\elsie\AppData\Local\Programs\Python\Python36-32\

C:\Users\elsie>dir C:\ProgramData\Oracle\Java\javapath
Volume in drive C has no label.
Volume Serial Number is 72DB-6BBD

Directory of C:\ProgramData\Oracle\Java\javapath

23/03/2018  11:00    <DIR>          .
23/03/2018  11:00    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  104,751,022,080 bytes free

C:\Users\elsie>C:\ProgramData\Oracle\Java\javapath\java.exe -version
'C:\ProgramData\Oracle\Java\javapath\java.exe' is not recognized as an internal
or external command,
operable program or batch file.

C:\Users\elsie>java -version
'java' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\elsie>

#10 2018-03-31 08:57:26

elsie
Member
Registered: 2018-03-29
Posts: 8

Re: Windows Java

The Java Console shows:
Java Runtime Environment Settings
User
Platform    Product        Location    Path    Runtime Parameters    Enabled    Architecture
1.8        1.8.0_161    http://java.sun.com/products/autodl/j2se    C:\Program Files\Java\jre1.8.0_161\bin\javaw.exe    true    x86_64
1.8        1.8.0_161    http://java.sun.com/products/autodl/j2se    C:\Program Files (x86)\Java\jre1.8.0_161\bin\javaw.exe    true    x86

System
1.8    1.8.0_161    http://java.sun.com/products/autodl/j2se    C:\Program Files\Java\jre1.8.0_161\bin\javaw.exe    true    x86_64

#11 2018-03-31 18:47:33

ds
Founder / Developer
From: Freiburg, Germany
Registered: 2016-06-15
Posts: 263

Re: Windows Java

Thanks for the reply.

I don't know why, but your Java installation is not properly registered. To fix that, open the start menu, type "cmd" and hold both the control and the shift key while hitting enter. You'll be prompted to confirm that you want to indeed permit changes on your computer.

The black window with white font will open again. Type the following commands:

setx /M PATH "C:\ProgramData\Oracle\Java\javapath;%PATH%"
mkdir C:\ProgramData\Oracle\Java\javapath_target_736921
copy "C:\Program Files\Java\jre1.8.0_161\bin\java*.exe" C:\ProgramData\Oracle\Java\javapath_target_736921
rmdir C:\ProgramData\Oracle\Java\javapath
mklink /D C:\ProgramData\Oracle\Java\javapath C:\ProgramData\Oracle\Java\javapath_target_736921

If you are prompted whether to overwrite files in the "copy" step, you can safely choose "No".

Afterwards, try installing GeneralSync again. If it does not yet work, it might be necessary to restart your computer first.

#12 2018-03-31 19:29:14

elsie
Member
Registered: 2018-03-29
Posts: 8

Re: Windows Java

After running those commands:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\elsie>setx /M PATH "C:\ProgramData\Oracle\Java\javapath;%PATH%"

SUCCESS: Specified value was saved.

C:\Users\elsie>mkdir C:\ProgramData\Oracle\Java\javapath_target_736921

C:\Users\elsie>copy "C:\Program Files\Java\jre1.8.0_161\bin\java*.exe" C:\Progra
mData\Oracle\Java\javapath_target_736921
C:\Program Files\Java\jre1.8.0_161\bin\java-rmi.exe
C:\Program Files\Java\jre1.8.0_161\bin\java.exe
C:\Program Files\Java\jre1.8.0_161\bin\javacpl.exe
C:\Program Files\Java\jre1.8.0_161\bin\javaw.exe
C:\Program Files\Java\jre1.8.0_161\bin\javaws.exe
        5 file(s) copied.

C:\Users\elsie>rmdir C:\ProgramData\Oracle\Java\javapath

C:\Users\elsie>mklink /D C:\ProgramData\Oracle\Java\javapath C:\ProgramData\Orac
le\Java\javapath_target_736921
symbolic link created for C:\ProgramData\Oracle\Java\javapath <<===>> C:\Program
Data\Oracle\Java\javapath_target_736921

the install (GeneralSync_0.1.3.7b.exe) worked but running GeneralSync gave:

Windows Firewall has blocked some features of this program
Java Platform SE binary
path C:\ProgramData\Oracle\Java\javapath_target_736921
Allow Java Platform SE binary to communicate on these networks
(true) Private networks, such as my home or work network
(false) Public networks

I was then given the option to install GeneralSync_0.1.3.7b.exe which ran but GeneralSync did not open automatically after the install.

The Java installs I have run have all been the standard install programs with default options selected, if requested. The default install directory includes the version number e.g. C:\Program Files\Java\jre1.8.0_161
I'm sure your other potential users will come across similar problems;and some might give up if they get a Java error.
Perhaps these sort of problems are why jAlbum installs java in a sub-directory?

#13 2018-03-31 20:56:25

ds
Founder / Developer
From: Freiburg, Germany
Registered: 2016-06-15
Posts: 263

Re: Windows Java

elsie wrote:

the install (GeneralSync_0.1.3.7b.exe) worked but running GeneralSync gave:

Windows Firewall has blocked some features of this program
Java Platform SE binary
path C:\ProgramData\Oracle\Java\javapath_target_736921
Allow Java Platform SE binary to communicate on these networks
(true) Private networks, such as my home or work network
(false) Public networks

This is intended. Windows asks you in which contexts other devices are permitted to sync with your device. In the setup you described, GeneralSync will work in your home and work networks, but is blocked in public networks. You can edit your choice at any time in the Windows Firewall settings.

elsie wrote:

I was then given the option to install GeneralSync_0.1.3.7b.exe which ran but GeneralSync did not open automatically after the install.

I'm not sure I understood you correctly. The installation will start GeneralSync if the corresponding checkbox is checked. If you disabled the checkbox, GeneralSync won't start.

The same is true for the automatic start of GeneralSync whenever you log in: if you disabled the corresponding checkbox, GeneralSync won't be started automatically. However, I highly recommend to permit GeneralSync to start automatically.

elsie wrote:

The Java installs I have run have all been the standard install programs with default options selected, if requested. The default install directory includes the version number e.g. C:\Program Files\Java\jre1.8.0_161
I'm sure your other potential users will come across similar problems;and some might give up if they get a Java error.

While I agree that this issue would be fatal for many users, it is not the default behaviour of the Java installation. Again, I don't know what caused the issue in your case. By default and in all tests I did, however, Java properly installs a version-independent redirect to the "default" installation. This redirect is updated whenever you update to a new version of Java. GeneralSync relies on this redirect to identify the version of Java to use.

Bundling Java has multiple disadvantages. The two major issues are:

  • The GeneralSync installer would gain about 200 MB (as I'd need to bundle both a 32 bit and a 64 bit version of Java), and each installation of GeneralSync would require ~100MB more disk space. Especially for people with a slow internet connection, this would be a massive problem. Updates are likely to take a lot longer, too.

  • Whenever there is a security update of Java, GeneralSync users would need to wait for me to update GeneralSync before they are protected. Many Java applications with bundled versions of Java do not receive security updates at all, as building and testing these updates is expensive and time-consuming.

So while I agree that Java caused a terrible user experience in your case, I don't think that bundling Java would be worth it. There are other options to consider instead (for example, GeneralSync could try to guess where Java is installed using common file paths for the default installation, even if Java is not properly installed).

However, you are the first Windows user reporting a failed Java installation; it is thus likely that the issue is specific to your system.

#14 2018-03-31 22:20:41

elsie
Member
Registered: 2018-03-29
Posts: 8

Re: Windows Java

I found this https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html

Setting the JAVA_HOME Variable in Windows

After you've installed Java in Windows, you must set the  JAVA_HOME  environment variable to point to the Java installation directory.

This information is only relevant if you're installing Confluence manually on a Windows server. If you're using the installer, you don't need to do this.

If you installed the Java Development Kit (JDK) you'll be setting the JAVA_HOME environment variable. If you installed the Java Runtime Environment (JRE) you will follow the same steps but set the JRE_HOME environment variable instead.

Set the JAVA_HOME Variable
To set the JAVA_HOME variable:

Locate your Java installation directory

If you didn't change the path during installation, it'll be something like C:\Program Files\Java\jdk1.8.0_65

I do not have a JAVA_HOME in my Environment Variables

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\elsie>echo %JAVA_HOME%
%JAVA_HOME%

This is the install dialogue for Java 1.8 if you click change default directory. It shows the default and gives the option to change  the directory   https://ibb.co/fV50N7

#15 2018-03-31 23:58:35

ds
Founder / Developer
From: Freiburg, Germany
Registered: 2016-06-15
Posts: 263

Re: Windows Java

elsie wrote:

I do not have a JAVA_HOME in my Environment Variables

GeneralSync does not require JAVA_HOME or JRE_HOME variable to be explicitly set; a regular installation is sufficient.

Doesn't GeneralSync work for you now? In your last post you sounded as if the installation succeeded and everything is working as expected.

#16 2018-04-01 11:49:56

elsie
Member
Registered: 2018-03-29
Posts: 8

Re: Windows Java

I thought it was OK but when I came to run the exe install again it could not find Java? And trying to run the .jar I got a message saying Windows did not know how to open the file. I looked at Tools | Options | Advanced in LibreOffice and it had lost the Java Runtime Connection and could not find it automatically. So there was still a problem.

I then tried a GeneralSync install on my partner's new PC which had never had Java installed. The installation ran, asked to install Java, which I did, and then completed without problems.

So I uninstalled Java on my computer, deleted the GeneralSync, \ProgramData\Oracle and \Program Files\Java directories, etc. ran the CCleaner and Glary Utilities registry cleaners, deleted the GeneralSync install files, rebooted, and downloaded the laatest GeneralSync install file. The installation ran, requested the Java download, and then completed without problems except there was no first-time run message (presumably a registry entry). And LibreOffice found the Java Runtime Connection automatically.

So now I can have a look at the program to see whether I can synchronise the web-based version of Google Contacts (which I use as a master as it has full formatting) and Thunderbird or whether I am going to have to synchronise Google Contacts to an Android device first?

When I get back home to the Vosges, I will be back to the 1440 KB/s down, 768 KB/s upload speed which I have had since 2004 (hopefully that might improve soon as they are just installing fibre to the village cabinet. But then there is still a 1km copper wire to the house so I might get 8MB/s). The speed hasn't really been too much of a problem until recent years when web page content size has grown significantly. But I don't have problems downloading the regular 700MB+ LibreOffice updates - I just know they are going to take time. What is more important is a reliable connection.

#17 2018-04-01 15:20:33

ds
Founder / Developer
From: Freiburg, Germany
Registered: 2016-06-15
Posts: 263

Re: Windows Java

elsie wrote:

So now I can have a look at the program to see whether I can synchronise the web-based version of Google Contacts (which I use as a master as it has full formatting) and Thunderbird or whether I am going to have to synchronise Google Contacts to an Android device first?

GeneralSync works without Google Contacts or any other Google service. You can directly sync PCs with Thunderbird and Smartphones/Tablets with Android, without Google accessing your personal data at all. In addition, GeneralSync is decentralized: there is no "master" device, you can perform any change from any device.

For contacts, the easiest way to import data from Google is using a smartphone with access to your Google account: after creating a new address book in the GeneralSync app, tap on it and select "Import..." from the menu in the action bar. You can then select the Google account to import from. Afterwards, add a new sync relation to the PC (pairing if necessary) and confirm the Baloon-Popup there (if you missed it: double-click on the GeneralSync icon in the system tray's notification area to be asked again). Then open the address books window in Thunderbird (for example using the toolbar button), select "File | New | GeneralSync Address Book..." from the menu and select the address book transferred from the smartphone.

Board footer