Giter VIP home page Giter VIP logo

Comments (9)

jvalkeal avatar jvalkeal commented on May 30, 2024 1

I think simply caused because we check if physical file is there and use java as file name. However in windows its java.exe thought in command line you can just type java.

File javaExecutable = new File(javaHome, "bin/" + javaExecutablePath);
Assert.isTrue(javaExecutable.canExecute(), "Java executable discovered via 'java.home' system property '"
		+ javaHome + "' is not executable or does not exist.");

from spring-cloud-deployer-local.

sabbyanandan avatar sabbyanandan commented on May 30, 2024 1

This seems like a similar problem described in #49. @manueljordan: Please override SPRING_CLOUD_DEPLOYER_LOCAL_JAVA_CMD property as described here and share your findings.

from spring-cloud-deployer-local.

jvalkeal avatar jvalkeal commented on May 30, 2024 1

@sabbyanandan There is no workaround other than creating java file on windows as that Assert happens on a class construction level.

from spring-cloud-deployer-local.

manueljordan avatar manueljordan commented on May 30, 2024

Thanks by the explanation @jvalkeal

Hi @sabbyanandan I did the following combinations in the same console:

For JDK

  • SET SPRING_CLOUD_DEPLOYER_LOCAL_JAVA_CMD=C:\whiteroom\java\jdk1.8.0_131\bin
  • SET SPRING_CLOUD_DEPLOYER_LOCAL_JAVA_CMD=C:\whiteroom\java\jdk1.8.0_131\bin;%PATH%

For JRE

  • SET SPRING_CLOUD_DEPLOYER_LOCAL_JAVA_CMD=C:\whiteroom\java\jre1.8.0_131\bin
  • SET SPRING_CLOUD_DEPLOYER_LOCAL_JAVA_CMD=C:\whiteroom\java\jre1.8.0_131\bin;%PATH%

For any of these possible 4 options, I got the same issue yet.

Not sure if I am doing something wrong

from spring-cloud-deployer-local.

manueljordan avatar manueljordan commented on May 30, 2024

I see, anyway I will do my experiments through Mac.

Thanks by the support.

from spring-cloud-deployer-local.

lanegoolsby avatar lanegoolsby commented on May 30, 2024

I tried copying java.exe to java. Same error. Let me know if you intended for something to be done.

c:\Home>echo %JAVA_HOME%
"C:\Program Files\Java\jre1.8.0_131"

c:\Users\lgoolsby\Documents\Java\Projects>cd %JAVA_HOME%

C:\Program Files\Java\jre1.8.0_131>cd bin

C:\Program Files\Java\jre1.8.0_131\bin>copy java.exe java
        1 file(s) copied.

from spring-cloud-deployer-local.

jvalkeal avatar jvalkeal commented on May 30, 2024

@lanegoolsby either java points to wrong jvm or forward slash causes issues.

new File(javaHome, "bin/" + javaExecutablePath)

What windows version you have?

from spring-cloud-deployer-local.

lanegoolsby avatar lanegoolsby commented on May 30, 2024

Win2012 server. It appears your hypothesis that the slash is the problem appears correct. I ran the JAR from a PoSh shell instead of CMD and it appears to be working.

from spring-cloud-deployer-local.

jvalkeal avatar jvalkeal commented on May 30, 2024

Oh, ok thanks for pointing it out. Assuming that's the case I need to fix the PR not to use slash on win.

from spring-cloud-deployer-local.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.