Hello!

Here and example that we can add manually a path on windows:

http://1.bp.blogspot.com/_NtoTtHZadHE/S0SLPiJo-2I/AAAAAAAAAIg/GyoW0pPEW-g/s400/qt-mobility-windows-env-path.png

I need to add new path on the system (or user (it does not matter) ) from my Java program (no problem if my java program must start with administrator privilages).

Thank you!

Recommended Answers

All 3 Replies

I don't know if a java program can change a system environment variable. You'll probably need to use native code.

you can use registery to add new path in windows ... by using java

@Vaspar Do you have code that can change the Window OS's environment variables?
Would you share it with us?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.