I am using the following code in order to try to clear the Java cache:
Dim TheFolderPath As String = "C:\Users\%username%\AppData\LocalLow\Sun\Java\Deployment\cache"
'check if the folder exists
If IO.Directory.Exists(TheFolderPath) Then
'delete the folder and all its contents
My.Computer.FileSystem.DeleteDirectory(TheFolderPath, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
However, when I run the tool to test its functionality the tool does not delete the folder. Can you please assist?