I've got a small program in Java. It's a pretty simple wrapper to run Matlab. It creates temorary file startup.m in current directory with all the matlab commands and then runs matlab. At the end of the program this files supposed to be deleted with deleteOnExit(). It runs perfectly fine on Mac and Unix with java 1.5.x. But on Windows (I tested it with java 1.6, so it may be some version issue) the file is generated and deleted before running matlab. I show some part of the code below.
The code will run on server and supposed to be platform independent. Please explain what wrong with it either on Windows or with newer java. Can you suggest the best way to delete this temporary file at the end of the program without altering the whole program a lot? I'm not an expert in Java.
Read full article from deleteOnExit issue
No comments:
Post a Comment