Reputation: 39
I have problem with access to java.exe from not parent directory.
Windows Vista Home Premium, JDK 7.
I need to execute java.exe from any directory, but when I try to run it from Command Promt, I get message "Access is denied". I configured all related environment variables. Access rights to this file allow me to run it. All folders have read permissions.
If I run it from parent directory, everything is OK.
Does anybody know what's the problem?
Upvotes: 1
Views: 5339
Reputation: 30474
(2019) Necromancing...
Today I was happily doing some %JAVA_HOME%\BIN\KeyTool.exe, when suddenly a blue band over my screen appeared where it said that Access denied and that the program wasn't created for this platform. I had used KeyTool on this virtual machine over a 100 times?
This is how I stumbled upon this question.
Since internet didn't help my, I just uninstalled java, and re-installed it again, and Wham Bam Alakazam: it works again. So instead of searching what's wrong: just reinstall and within 4 minutes you're airborn again.
Upvotes: 0
Reputation: 719281
I cannot think of any explanation apart from the obvious one; i.e. that in reality you have NOT configured the environment variables correctly for the command prompt.
You might have set the PATH variable incorrectly.
You might not have restarted the command shell after changing the environment variables.
(I don't think this can be a permissions issue if you can execute java.exe
using the full pathname but not java
.)
Upvotes: 1