I have a Java command line application that reads and writes files on a Windows 7 x64 platform. Currently, the application works with the supplied IBM Java SE 6. The structure is as follows:
APP_ROOT some_folder jre bin lib myjarfile.jar appl_start.bat
Now I replaced the jre folder with the unpacked JRE 8 package. And the application started complaining that it could not βaccessβ (in fact, this is a write operation) in some_folder. If I manually create new some_folder_1 under APP_ROOT and reconfigure the application to use it, the application works fine. If I delete the recently created some_folder_1 and rename some_folder to some_folder_1, an application complaining that it cannot access it (even in read mode).
If I replaced the jre folder with JRE 6 files, the application will start working normally.
I tried to compare effective permissions through properties - everything looks the same, nothing suspicious. UAC is turned on, I work and do a folder replacement under the normal user.
UPDATE . After I disabled UAC in Windows 7 and rebooted, the application started working with JRE 8. But I need to get it to work with enabled UAC. When you restart UAC to power on and reboot, the application with JRE 8 again failed. I also noticed that JRE 8 does not create the appropriate files in "C: \ Users \ username \ AppData \ Local \ VirtualStore \ Program Files (x86) \", where it is usually created when a program tries to write inside Program Files.
UPDATE 2 . There were more problems finding and troubleshooting:
- An application with JRE 8 crashes only when writing to "C: \ Program Files \ APP_ROOT \ some_folder"
- According to the design of Windows 7, in this case the file should be created in C: \ User .. \ VirtualStore, but JRE 8 cannot do this ( which is incorrect and the root of the problem ).
- JRE 6 can create files in VirtualStore.
- VirtualStore content was cleared before restarting with JRE 8
- A successful launch with a combination of "some_folder_1" and JRE 8 was that JRE 8 actually wrote inside C: \ Program Files / APP_ROOT / some_folder_1, which is a violation of IMHO. Thus, this is another problem: why did the JRE 8 not redirect the write to the file system in VirtualStore and did not insert the C: \ Program Files subdirectory.
- If I define% localusrdir% in some directory C: \ temp, JRE 8 shows the same problem, so this is not only the specific problem of the VirtualStore folder, IMHO.
So, I conclude - for some reason, JRE 8 cannot redirect the output record to C: \ Program Files ... to C: \ Users ... \ VirtualStore
How can this be fixed, so JRE 8 will start writing to VirtualStore in order than JRE 6?
UPDATE 3 : unsuccessful version of JRE:
C:\Program Files (x86)\APP\jre\bin>java.exe -version java version "1.8.0" Java(TM) SE Runtime Environment (build pwi3280-20150129_02) IBM J9 VM (build 2.8, JRE 1.8.0 Windows 7 x86-32 20150116_231420 (JIT enabled, AOT enabled) J9VM - R28_Java8_GA_20150116_2030_B231420 JIT - tr.r14.java_20150109_82886.02 GC - R28_Java8_GA_20150116_2030_B231420 J9CL - 20150116_231420) JCL - 20150123_01 based on Oracle jdk8u31-b12