javacloud-foundrypcfdev

JAVA_HOME not found in Cloud Foundry deployment


I am trying to use the PCF Dev from Pivotal for Cloud Foundry Development.

I want to setup my simple standalone jar file which only stdout hello every secound. I pushed it and everything seems to work fine except the start.

On start I get the following log error:

2016-05-10T13:09:45.28+0200 [APP/0]      ERR bash: JAVA_HOME: No such file or directory

My manifest.yml

applications:
  - name:    cf-test
    no-route: true
    memory:  128M
    instances: 1
    path: /bin/test.jar
    build: https://github.com/cloudfoundry/java-buildpack.git

For me it seems like Java isn't installed properly in the CF-Environment. But how to debugg that?

I really hope someone knows a answer :) Thank you!

Edit: I found out that i have to set the Environment-Variable of JAVA_HOME but to what? How to find out the Java Path?


Solution

  • See the docs on the health-check-type attribute

    Use the health-check-type attribute to set the health_check_type flag to either port or none. If you do not provide a health-check-type attibute, it defaults to port.

    ---
      ...
      health-check-type: none
    

    The command line option that overrides this attribute is -u.

    Use none if your process is not like a web application that binds to a port, and instead is just a background worker that prints some logs.