![JAR search and dependency download from the Maven repository](/logo.png)
redis.embedded.util.JarUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of embedded-redis Show documentation
Show all versions of embedded-redis Show documentation
Redis embedded server for Java integration testing.
Project forked from https://github.com/kstyrc/embedded-redis
The newest version!
package redis.embedded.util;
import com.google.common.io.Files;
import com.google.common.io.Resources;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
public class JarUtil {
public static File extractExecutableFromJar(String executable) throws IOException {
File tmpDir = Files.createTempDir();
tmpDir.deleteOnExit();
File command = new File(tmpDir, executable);
FileUtils.copyURLToFile(Resources.getResource(executable), command);
command.deleteOnExit();
command.setExecutable(true);
return command;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy