Dim jo, desktop, action As JavaObject
jo.InitializeNewInstance("java.io.File", Array(File.DirApp & "/dummy.txt"))
action.InitializeStatic("java.awt.Desktop.Action")
desktop = desktop.InitializeStatic("java.awt.Desktop").RunMethodJO("getDesktop",Null)
If desktop.RunMethod("isSupported",Array(action.GetField("MOVE_TO_TRASH"))) Then
Log("moving " & $"${jo.RunMethod("getCanonicalPath",Null)}"$ &" to recycle bin")
desktop.RunMethod("moveToTrash",Array(jo))
Else
Log("deleting " & $"${jo.RunMethod("getCanonicalPath",Null)}"$ &"(No recycle bin)")
File.Delete(File.DirApp,"/dummy.txt")
End If