Friday, May 15, 2020

Gradle: error running Eureka server Returning 404 error

I am trying to run eureka server project via eclipse. It's one of the simplest , but trickiest ..

What i did.

1. Create Spring boot Eireka server with spring http://start.spring.io/
2. Added annotations and property files as needed

@EnableEurekaServer  for main class

and for application.yml

eureka:
   instance:
      hostname: localhost
   client: # Not a client, don't register with yourself
      registerWithEureka: false
      fetchRegistry: false
server:
   port: 1111 # HTTP (Tomcat) port

3. Run main class as Java aplication. Eclipse --> Run As --> Java Application
4. No errors in the console
5. hence i used port=1111
try with http://localhost:1111/

6. Getting 404 error



Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.
Fri May 15 21:22:02 IST 2020
There was an unexpected error (type=Not Found, status=404).
No message available

7. Below attached the output in Eclipse console. Eclispe console output-1

8. Eureka server is up and running in port 1111. But in browser localhost:1111 --> Navigates to 404 error page

9. Let's try with gradle command line manually. Stop eclipse run.
10.  build the project and run

gradle buiild  --> Build succesful
gradle bootRun

11. Eureka server start up and running in port 1111
12. attached log in output-2








7. Eclipse console output-1
---------------------------------------

2020-05-15 21:24:45.865  INFO 19320 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.2.7.RELEASE)

2020-05-15 21:24:46.973  INFO 19320 --- [  restartedMain] c.e.r.RegisterServerApplication          : No active profile set, falling back to default profiles: default
2020-05-15 21:24:48.782  WARN 19320 --- [  restartedMain] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format.
2020-05-15 21:24:49.075  INFO 19320 --- [  restartedMain] o.s.cloud.context.scope.GenericScope     : BeanFactory id=6b8184a9-51b7-31fa-8e18-4982d979a052
2020-05-15 21:24:50.717  INFO 19320 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 1111 (http)
2020-05-15 21:24:50.739  INFO 19320 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-05-15 21:24:50.740  INFO 19320 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.34]
2020-05-15 21:24:51.090  INFO 19320 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2020-05-15 21:24:51.091  INFO 19320 --- [  restartedMain] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 4092 ms
2020-05-15 21:24:51.215  WARN 19320 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2020-05-15 21:24:51.215  INFO 19320 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2020-05-15 21:24:51.245  INFO 19320 --- [  restartedMain] c.netflix.config.DynamicPropertyFactory  : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@379c1d6
2020-05-15 21:24:52.708  INFO 19320 --- [  restartedMain] c.s.j.s.i.a.WebApplicationImpl           : Initiating Jersey application, version 'Jersey: 1.19.1 03/11/2016 02:08 PM'
2020-05-15 21:24:52.826  INFO 19320 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2020-05-15 21:24:52.828  INFO 19320 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2020-05-15 21:24:53.403  INFO 19320 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2020-05-15 21:24:53.404  INFO 19320 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2020-05-15 21:24:54.445  WARN 19320 --- [  restartedMain] o.s.c.n.a.ArchaiusAutoConfiguration      : No spring.application.name found, defaulting to 'application'
2020-05-15 21:24:54.447  WARN 19320 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2020-05-15 21:24:54.448  INFO 19320 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2020-05-15 21:24:55.235  INFO 19320 --- [  restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2020-05-15 21:24:55.865  INFO 19320 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2020-05-15 21:24:56.516  WARN 19320 --- [  restartedMain] ockingLoadBalancerClientRibbonWarnLogger : You already have RibbonLoadBalancerClient on your classpath. It will be used by default. As Spring Cloud Ribbon is in maintenance mode. We recommend switching to BlockingLoadBalancerClient instead. In order to use it, set the value of `spring.cloud.loadbalancer.ribbon.enabled` to `false` or remove spring-cloud-starter-netflix-ribbon from your project.
2020-05-15 21:24:56.593  INFO 19320 --- [  restartedMain] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2020-05-15 21:24:56.658  INFO 19320 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2020-05-15 21:24:56.658  INFO 19320 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Client configured to neither register nor query for data.
2020-05-15 21:24:56.680  INFO 19320 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1589558096678 with initial instances count: 0
2020-05-15 21:24:56.800  INFO 19320 --- [  restartedMain] c.n.eureka.DefaultEurekaServerContext    : Initializing ...
2020-05-15 21:24:56.804  WARN 19320 --- [  restartedMain] c.n.eureka.cluster.PeerEurekaNodes       : The replica size seems to be empty. Check the route 53 DNS Registry
2020-05-15 21:24:56.912  INFO 19320 --- [  restartedMain] c.n.e.registry.AbstractInstanceRegistry  : Finished initializing remote region registries. All known remote regions: []
2020-05-15 21:24:56.913  INFO 19320 --- [  restartedMain] c.n.eureka.DefaultEurekaServerContext    : Initialized
2020-05-15 21:24:56.934  INFO 19320 --- [  restartedMain] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
2020-05-15 21:24:56.985  INFO 19320 --- [  restartedMain] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application UNKNOWN with eureka with status UP
2020-05-15 21:24:57.022  INFO 19320 --- [      Thread-17] o.s.c.n.e.server.EurekaServerBootstrap   : Setting the eureka configuration..
2020-05-15 21:24:57.025  INFO 19320 --- [      Thread-17] o.s.c.n.e.server.EurekaServerBootstrap   : Eureka data center value eureka.datacenter is not set, defaulting to default
2020-05-15 21:24:57.026  INFO 19320 --- [      Thread-17] o.s.c.n.e.server.EurekaServerBootstrap   : Eureka environment value eureka.environment is not set, defaulting to test
2020-05-15 21:24:57.074  INFO 19320 --- [      Thread-17] o.s.c.n.e.server.EurekaServerBootstrap   : isAws returned false
2020-05-15 21:24:57.077  INFO 19320 --- [      Thread-17] o.s.c.n.e.server.EurekaServerBootstrap   : Initialized server context
2020-05-15 21:24:57.080  INFO 19320 --- [      Thread-17] c.n.e.r.PeerAwareInstanceRegistryImpl    : Got 1 instances from neighboring DS node
2020-05-15 21:24:57.081  INFO 19320 --- [      Thread-17] c.n.e.r.PeerAwareInstanceRegistryImpl    : Renew threshold is: 1
2020-05-15 21:24:57.081  INFO 19320 --- [      Thread-17] c.n.e.r.PeerAwareInstanceRegistryImpl    : Changing status to UP
2020-05-15 21:24:57.119  INFO 19320 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 1111 (http) with context path ''
2020-05-15 21:24:57.119  INFO 19320 --- [  restartedMain] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 1111
2020-05-15 21:24:57.137  INFO 19320 --- [      Thread-17] e.s.EurekaServerInitializerConfiguration : Started Eureka Server
2020-05-15 21:24:57.857  INFO 19320 --- [  restartedMain] c.e.r.RegisterServerApplication          : Started RegisterServerApplication in 13.609 seconds (JVM running for 14.866)
2020-05-15 21:25:57.104  INFO 19320 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry  : Running the evict task with compensationTime 0ms
2020-05-15 21:26:57.118  INFO 19320 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry  : Running the evict task with compensationTime 13ms
2020-05-15 21:27:57.118  INFO 19320 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry  : Running the evict task with compensationTime 0ms
2020-05-15 21:28:57.118  INFO 19320 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry  : Running the evict task with compensationTime 0ms
2020-05-15 21:29:57.119  INFO 19320 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry  : Running the evict task with compensationTime 0ms




12. output-2    gradle bootRun output
----------------------------------------------------------------


> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE

> Task :bootRun
2020-05-15 21:38:16.878  INFO 17600 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.2.7.RELEASE)

2020-05-15 21:38:18.083  INFO 17600 --- [  restartedMain] c.e.r.RegisterServerApplication          : No active profile set, falling back to default profiles: default
2020-05-15 21:38:19.459  WARN 17600 --- [  restartedMain] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format.
2020-05-15 21:38:19.646  INFO 17600 --- [  restartedMain] o.s.cloud.context.scope.GenericScope     : BeanFactory id=d20a0ae6-0dc1-3853-b713-090cd5293043
2020-05-15 21:38:21.304  INFO 17600 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 1111 (http)
2020-05-15 21:38:21.326  INFO 17600 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-05-15 21:38:21.326  INFO 17600 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.34]
2020-05-15 21:38:21.687  INFO 17600 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2020-05-15 21:38:21.687  INFO 17600 --- [  restartedMain] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 3571 ms
2020-05-15 21:38:21.822  WARN 17600 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2020-05-15 21:38:21.822  INFO 17600 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2020-05-15 21:38:21.841  INFO 17600 --- [  restartedMain] c.netflix.config.DynamicPropertyFactory  : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@689add69
2020-05-15 21:38:23.534  INFO 17600 --- [  restartedMain] c.s.j.s.i.a.WebApplicationImpl           : Initiating Jersey application, version 'Jersey: 1.19.1 03/11/2016 02:08 PM'
2020-05-15 21:38:23.785  INFO 17600 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2020-05-15 21:38:23.788  INFO 17600 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2020-05-15 21:38:24.206  INFO 17600 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2020-05-15 21:38:24.206  INFO 17600 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2020-05-15 21:38:24.848  WARN 17600 --- [  restartedMain] o.s.c.n.a.ArchaiusAutoConfiguration      : No spring.application.name found, defaulting to 'application'
2020-05-15 21:38:24.849  WARN 17600 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2020-05-15 21:38:24.850  INFO 17600 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2020-05-15 21:38:25.108  INFO 17600 --- [  restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2020-05-15 21:38:25.698  INFO 17600 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2020-05-15 21:38:26.601  WARN 17600 --- [  restartedMain] ockingLoadBalancerClientRibbonWarnLogger : You already have RibbonLoadBalancerClient on your classpath. It will be used by default. As Spring Cloud Ribbon is in maintenance mode. We recommend switching to BlockingLoadBalancerClient instead. In order to use it, set the value of `spring.cloud.loadbalancer.ribbon.enabled` to `false` or remove spring-cloud-starter-netflix-ribbon from your project.
2020-05-15 21:38:26.709  INFO 17600 --- [  restartedMain] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2020-05-15 21:38:26.773  INFO 17600 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2020-05-15 21:38:26.774  INFO 17600 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Client configured to neither register nor query for data.
2020-05-15 21:38:26.788  INFO 17600 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1589558906785 with initial instances count: 0
2020-05-15 21:38:26.873  INFO 17600 --- [  restartedMain] c.n.eureka.DefaultEurekaServerContext    : Initializing ...
2020-05-15 21:38:26.879  WARN 17600 --- [  restartedMain] c.n.eureka.cluster.PeerEurekaNodes       : The replica size seems to be empty. Check the route 53 DNS Registry
2020-05-15 21:38:26.985  INFO 17600 --- [  restartedMain] c.n.e.registry.AbstractInstanceRegistry  : Finished initializing remote region registries. All known remote regions: []
2020-05-15 21:38:26.987  INFO 17600 --- [  restartedMain] c.n.eureka.DefaultEurekaServerContext    : Initialized
2020-05-15 21:38:27.012  INFO 17600 --- [  restartedMain] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
2020-05-15 21:38:27.053  INFO 17600 --- [  restartedMain] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application UNKNOWN with eureka with status UP
2020-05-15 21:38:27.058  INFO 17600 --- [      Thread-17] o.s.c.n.e.server.EurekaServerBootstrap   : Setting the eureka configuration..
2020-05-15 21:38:27.058  INFO 17600 --- [      Thread-17] o.s.c.n.e.server.EurekaServerBootstrap   : Eureka data center value eureka.datacenter is not set, defaulting to default
2020-05-15 21:38:27.060  INFO 17600 --- [      Thread-17] o.s.c.n.e.server.EurekaServerBootstrap   : Eureka environment value eureka.environment is not set, defaulting to test
2020-05-15 21:38:27.094  INFO 17600 --- [      Thread-17] o.s.c.n.e.server.EurekaServerBootstrap   : isAws returned false
2020-05-15 21:38:27.095  INFO 17600 --- [      Thread-17] o.s.c.n.e.server.EurekaServerBootstrap   : Initialized server context
2020-05-15 21:38:27.095  INFO 17600 --- [      Thread-17] c.n.e.r.PeerAwareInstanceRegistryImpl    : Got 1 instances from neighboring DS node
2020-05-15 21:38:27.096  INFO 17600 --- [      Thread-17] c.n.e.r.PeerAwareInstanceRegistryImpl    : Renew threshold is: 1
2020-05-15 21:38:27.096  INFO 17600 --- [      Thread-17] c.n.e.r.PeerAwareInstanceRegistryImpl    : Changing status to UP
2020-05-15 21:38:27.121  INFO 17600 --- [      Thread-17] e.s.EurekaServerInitializerConfiguration : Started Eureka Server
2020-05-15 21:38:27.140  INFO 17600 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 1111 (http) with context path ''
2020-05-15 21:38:27.141  INFO 17600 --- [  restartedMain] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 1111
2020-05-15 21:38:27.913  INFO 17600 --- [  restartedMain] c.e.r.RegisterServerApplication          : Started RegisterServerApplication in 12.488 seconds (JVM running for 13.927)

Gradle: Finding all gradle tasks

Gradle is very convenient build tool and if you  need to know the commands need to run you can get a brief description running  "gradle tasks" in the command prompt.
From all these few will used frequently

clean , build , bootRun

Below is the sample you may get

---------------------------------------------------------------------------------------------------------

C:\register-server>gradle tasks

> Task :tasks

------------------------------------------------------------
Tasks runnable from root project
------------------------------------------------------------

Application tasks
-----------------
bootRun - Runs this project as a Spring Boot application.

Build tasks
-----------
assemble - Assembles the outputs of this project.
bootJar - Assembles an executable jar archive containing the main classes and their dependencies.
build - Assembles and tests this project.
buildDependents - Assembles and tests this project and all projects that depend on it.
buildNeeded - Assembles and tests this project and all projects it depends on.
classes - Assembles main classes.
clean - Deletes the build directory.
jar - Assembles a jar archive containing the main classes.
testClasses - Assembles test classes.

Build Setup tasks
-----------------
init - Initializes a new Gradle build.
wrapper - Generates Gradle wrapper files.

Documentation tasks
-------------------
javadoc - Generates Javadoc API documentation for the main source code.

Help tasks
----------
buildEnvironment - Displays all buildscript dependencies declared in root project 'register-server'.
components - Displays the components produced by root project 'register-server'. [incubating]
dependencies - Displays all dependencies declared in root project 'register-server'.
dependencyInsight - Displays the insight into a specific dependency in root project 'register-server'.
dependencyManagement - Displays the dependency management declared in root project 'register-server'.
dependentComponents - Displays the dependent components of components in root project 'register-server'. [incubating]
help - Displays a help message.
model - Displays the configuration model of root project 'register-server'. [incubating]
outgoingVariants - Displays the outgoing variants of root project 'register-server'.
projects - Displays the sub-projects of root project 'register-server'.
properties - Displays the properties of root project 'register-server'.
tasks - Displays the tasks runnable from root project 'register-server'.

Verification tasks
------------------
check - Runs all checks.
test - Runs the unit tests.

Rules
-----
Pattern: clean: Cleans the output files of a task.
Pattern: build: Assembles the artifacts of a configuration.
Pattern: upload: Assembles and uploads the artifacts belonging to a configuration.

To see all tasks and more detail, run gradle tasks --all

To see more detail about a task, run gradle help --task

BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed

Important Maven Commands

  • mvn -version: Finds the Maven version
  • mvn compile: Compiles source files
  • mvn test-compile: Compiles test files as well as source files
  • mvn clean: Deletes target directory
  • mvn test:  Runs unit tests
  • mvn package: Creates a JAR for the project
  • help:effective-settings: Debugs Maven settings
  • help:effective-pom: Look at the complete pom after all inheritances from parent poms are resolved
  • dependency:tree: Look sat all the dependencies and transitive dependencies
  • dependency:sources: Downloads source code for all dependencies
  • -debug: Debug flag; can be used with all the above commands

Gradle error : compileJava FAILED

If you have seen above error , reason may be you have not set JAVA_HOME properly.
you can check with simply running "echo %JAVA_HOME%" in windows. If output is "%JAVA_HOME%" that means JAVA_HOME is not set properly.

Below is a sample scenario
1. Run "gradle build"  --> fail with compileJava FAILED
2. We set JAVA_HOME
3. Check whether JAVA_HOME is set
4. Re run "gradle build"

---------------------------------------------------------------------------------------------------

Microsoft Windows [Version 10.0.17134.1425]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\register-server>gradle build
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_171 contains a valid JDK installation.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 22s
1 actionable task: 1 executed

C:\register-server>echo %JAVA_HOME%
%JAVA_HOME%

C:\register-server>set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161

C:\register-server>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_161