diff --git a/platform/bootstrap/src/com/intellij/idea/Main.java b/platform/bootstrap/src/com/intellij/idea/Main.java index ce8a2d0f14e9..4b805923cb6b 100644 --- a/platform/bootstrap/src/com/intellij/idea/Main.java +++ b/platform/bootstrap/src/com/intellij/idea/Main.java @@ -129,16 +129,28 @@ public class Main { // always delete previous patch copy File patchCopy = new File(tempDir, patchFileName + "_copy"); File log4jCopy = new File(tempDir, "log4j.jar." + platform + "_copy"); - if (!FileUtilRt.delete(patchCopy) || !FileUtilRt.delete(log4jCopy)) { + File jnaUtilsCopy = new File(tempDir, "jna-utils.jar." + platform + "_copy"); + File jnaCopy = new File(tempDir, "jna.jar." + platform + "_copy"); + if (!FileUtilRt.delete(patchCopy) || !FileUtilRt.delete(log4jCopy) || !FileUtilRt.delete(jnaUtilsCopy) || !FileUtilRt.delete(jnaCopy)) { throw new IOException("Cannot delete temporary files in " + tempDir); } File patch = new File(tempDir, patchFileName); if (!patch.exists()) return; + File log4j = new File(PathManager.getLibPath(), "log4j.jar"); - if (!log4j.exists()) throw new IOException("Log4J missing: " + log4j); + if (!log4j.exists()) throw new IOException("Log4J is missing: " + log4j); + + File jnaUtils = new File(PathManager.getLibPath(), "jna-utils.jar"); + if (!jnaUtils.exists()) throw new IOException("jna-utils.jar is missing: " + jnaUtils); + + File jna = new File(PathManager.getLibPath(), "jna.jar"); + if (!jna.exists()) throw new IOException("jna is missing: " + jna); + copyFile(patch, patchCopy, true); copyFile(log4j, log4jCopy, false); + copyFile(jna, jnaCopy, false); + copyFile(jnaUtils, jnaUtilsCopy, false); int status = 0; if (Restarter.isSupported()) { @@ -154,7 +166,7 @@ public class Main { System.getProperty("java.home") + "/bin/java", "-Xmx500m", "-classpath", - patchCopy.getPath() + File.pathSeparator + log4jCopy.getPath(), + patchCopy.getPath() + File.pathSeparator + log4jCopy.getPath() + File.pathSeparator + jnaCopy.getPath() + File.pathSeparator + jnaUtilsCopy.getPath(), "-Djava.io.tmpdir=" + tempDir, "-Didea.updater.log=" + PathManager.getLogPath(), "-Dswing.defaultlaf=" + UIManager.getSystemLookAndFeelClassName(),