public void reconnect() throws MathLinkException { kernelLink.removePacketListener(this); kernelLink.close(); kernelLink = MathLinkFactory.createKernelLink(mlargs); kernelLink.addPacketListener(this); kernelLink.discardAnswer(); }
public void close() { // Close the kernel link kernelLink.close(); // Release all allocated resources release(); // Delete the cache folder (it should be empty now) File cacheFp = getSessionFolder(); if (cacheFp.exists()) cacheFp.delete(); }