Skip to main content

File.createTempFile() throws exception on Win7

2 replies [Last post]
Joined: 2010-09-10

When i call File.createTempFile() on a Win7 system it throws the following exception. This happens when i run my application as a windows service. If i run the application just as a simple java application then it works fine. The system cannot find the path specified
at ve Method)
at Source)
at Source)
at Source)
at etImageData(
at com.ultravisual.pcm.routing.RoutingService.runIter ation(
at com.ultravisual.pcm.routing.RoutingServiceWindowsR
at Source)

Both System environment (TEMP, TMP) variables are set to C:\Windows\Temp.
Both User environment (TEMP, TMP) variables are set to %USERPROFILE%\AppData\Local\Temp.

Also i confirmed that both these directories exist on the workstation.

I would really appreciate if somebody could help me out with this problem

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-09-18

Hey.maybe you should upgrade your jdk/jse to latest version.

The latest java 6 dosen't contains this

Joined: 2007-04-17

It does as a private method called by createTempFile.

@OP, what is the value of system property Make sure it's a folder your service was write permission on.