Code Monkey home page Code Monkey logo

Comments (6)

Bill-Stewart avatar Bill-Stewart commented on September 27, 2024

Interesting...are you running JavaInfoTest.exe from that same console window?

from javainfo.

kaikramer avatar kaikramer commented on September 27, 2024

Nvm, my mistake...

from javainfo.

Bill-Stewart avatar Bill-Stewart commented on September 27, 2024

My guess is the Path environment variable hadn't propagated to the process from which you ran the test program.

It might be a good idea to read the environment variables and the Path directly from the registry as an additional check. That should "fix" the issue you experienced here.

from javainfo.

kaikramer avatar kaikramer commented on September 27, 2024

Yep, that was indeed the problem. I am using Total Commander which recognizes changes of JAVA_HOME instantly, but changes of Path only after a restart.

I don't think this is a real issue as this does not happen with Windows Explorer. No need to do something about it.

from javainfo.

Bill-Stewart avatar Bill-Stewart commented on September 27, 2024

I could attempt to read the environment variable values and path directly from the registry if they aren't in the environment of the current process. This would fix the edge case where someone installs a Java instance, updates the environment or path, but JavaInfo.dll doesn't detect it because the change doesn't exist in the environment inherited by the process JavaInfo.dll is running in.

from javainfo.

Bill-Stewart avatar Bill-Stewart commented on September 27, 2024

I have thought about doing this (reading the environment variables from the registry directly) and it may have some unintended consequences (it may cause more confusion and cause more problems than it solves). Never mind...

from javainfo.

Related Issues (1)

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.