BioStar 2.6 uses Java version 1.8.0_161. 

If the version of Java has been updated or has been deleted from the control panel, the service will not start.
(once you press start in BioStar Setting, service will stop immediately)


Checking the Issue

If the service issue is related to Java, you will see the lines of error in the log file in C:\Program Files\BioStar 2(x64)\nginx\logs 

or C:\Program Files\BioStar 2(x64)\logs\nginx-service.log

It will be something like below:


2018/05/09 09:10:22 => RunApp execute : C:\Program Files\BioStar 2(x64)\ngrok\ngrok.exe, arg : ngrok\ngrok.exe -config="C:\Program Files\BioStar 2(x64)\ngrok\ngrok.yml" -log="C:\Program Files\BioStar 2(x64)\logs\ngrok.log" start ac ta video

2018/05/09 09:10:23 => JAVA_PATH: C:\Program Files\Java\jre1.8.0_161\bin\java.exe
2018/05/09 09:10:23 => RunApp execute error : 3
2018/05/09 09:10:23 => Failed to start webApp!


The log is saying that the application fails to execute because the java executable cannot be found in the path. 


If you're using an offline license, you will run into the

Cause

Issue will occur in the following cases: 


Case 1: Java 1.8.0_161 (installed with BioStar 2) has been deleted

- If you don't see it in the Control Panel > Programs and Features it means that it has been deleted. 


Case 2: Java 1.8.0_161 has been upgraded and cannot be accessed. 

- check your java version with the attached script. 



Scripted Solution

Case 1: Java 1.8.0_161 (installed with BioStar 2) has been deleted 

- Install latest java 161 and change the java path with the attached script 


Download link for 1.8.0_161: 

http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html


Direct download link: http://gofile.me/471Oh/WgDW15zHj  

* Java SE Runtime Environment 8u161 64bit exe file 

* Filename: jre-8u161-windows-x64.exe


You can also search this by searching 'java archive downloads' on google



Case 2: Java 1.8.0_161 has been upgraded and cannot be accessed. 

- Change the java path with the attached script


If you still have the issue after configuring the environment path with the script, delete all java versions, install the latest version, and configure the path again.


Manual Solution

If you want to manually change the Java path in a 32bit Windows go to
View Advanced System Settings > Advanced > Environment Variables > Edit JAVA_HOME to your current java version path


Copy the variable value of JAVA_HOME and try to access the folder to make sure the patch.



If you can not access to the folder, go to C:\Program Files\Java\ and check the valid folder name and update JAVA_HOME again.