SSJS - delete statement problem with java.io.File

I came across a bug in the DDE compiler for SSJS.When trying to use the Java class “java.io.File” to access files on disk

and delete them the code can’t compile:

var file:java.io.File = new java.io.File(filePath);

file.delete();

The “delete” keyword is not recognized:

Expected " “delete” “delete”" at line

Was expecting:

<IDENTIFIER>....

My question:

  1. Is there another way to delete files on disk with XPages? I probably don’t

know the class… or is there a workaround?

My current solution:

  1. Writing an agent (LS,JAVA) and calling it from SSJS.

Subject: Java Reflection

Hi Janko,

Try this:

file.getClass().getMethod(“delete”, null).invoke(file, null);

Hope it helps.

Subject: thanks to me too!

Simple and nice solution

Subject: THANKS Roger!

Your solution works!

Subject: Lotus notes 8.0.1 Basic Supported on windows server 2008 terminal server

To install lotus notes on windows server 2008 terminal server folllow these steps

  1. Do not install terminal services before theinstallation of lotus notes.

  2. Install lotus notes client , it will work .

3.After completion of installation of the lotus notes now install the terminal services on that windows 2008 terminal server.

4.it will work normally .