@Override public void copySplashImage() throws IOException { // The user.dir property on the Mac is /Applications/SQuirreLSQL.app/Contents/Resources/Java String squirrelHome = System.getProperty("user.dir"); String jarFilename = squirrelHome + "/update/downloads/core/squirrel-sql.jar"; String resourceName = "splash.jpg"; String pathToIconsDir = squirrelHome + "/icons"; String destinationFile = pathToIconsDir + "/" + resourceName; File iconsDir = new File(pathToIconsDir); if (!iconsDir.exists()) { logInfo("Icons directory ("+pathToIconsDir+") doesn't exist, so attempting to create it."); boolean result = iconsDir.mkdir(); if (!result) { s_log.error("Failed to create icons directory ("+pathToIconsDir+")"); } } logInfo("Copying splash.jpg from jarfile ("+jarFilename+") to "+destinationFile); ioutils.copyResourceFromJarFile(jarFilename, resourceName, destinationFile); }
@Override public void copySplashImage() throws IOException { // The user.dir property on the Mac is /Applications/SQuirreLSQL.app/Contents/Resources/Java String squirrelHome = System.getProperty("user.dir"); String jarFilename = squirrelHome + "/update/downloads/core/squirrel-sql.jar"; String resourceName = "splash.jpg"; String pathToIconsDir = squirrelHome + "/icons"; String destinationFile = pathToIconsDir + "/" + resourceName; File iconsDir = new File(pathToIconsDir); if (!iconsDir.exists()) { logInfo("Icons directory ("+pathToIconsDir+") doesn't exist, so attempting to create it."); boolean result = iconsDir.mkdir(); if (!result) { s_log.error("Failed to create icons directory ("+pathToIconsDir+")"); } } logInfo("Copying splash.jpg from jarfile ("+jarFilename+") to "+destinationFile); ioutils.copyResourceFromJarFile(jarFilename, resourceName, destinationFile); }