nimm eine MANIFEST.MF etwa so
Manifest-Version: 1.0
Main-Class: MeineMain
Classpath: Andere.jar NocheineBib.jar
InputStream in = getClass().getResourceAsStream("dll");
String strFile = System.getProperty("user.dir"); //holt sich das aktuelle Verz
strFile = strFile.endsWith(File.separator) ? strFile : strFile + File.separator;
try{
OutputStream out = new FileOutputStream(new File(strFile + "dll"));
int x = -2;
while ( (x = in.read()) != -1)
out.write(x);
in.close();
out.close();
}
catch(Exception ex)
{
ex.printStackTrace();
}
String strDir = System.getProperty("user.dir");
strDir = strDir.endsWith(File.separator) ? strDir : strDir + File.separator;
try{
JarFile jar = new JarFile(strDir + "thE_Configurator.jar");
InputStream in = jar.getInputStream(jar.getEntry("README"));
OutputStream out = new FileOutputStream(new File(strDir + "README.TXT"));
byte[] buffer = new byte[1024];
for (int n; (n = in.read(buffer)) != -1; out.write(buffer, 0, n))
;
}
catch(Exception ex)
{
ex.printStackTrace();
}
java.util.zip.ZipException: Das System kann die angegebene Datei nicht finden
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:112)
at java.util.jar.JarFile.<init>(JarFile.java:117)
at java.util.jar.JarFile.<init>(JarFile.java:55)
at CopyDLL.<init>(CopyDLL.java:33)
at Main.main(Main.java:24)
java.lang.UnsatisfiedLinkError: F:\Coding\eclipseWorkspace\EierUhr\swt-win32-3062.dll: %1 ist keine zulässige Win32-Anwendung
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1473)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:832)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:100)
at org.eclipse.swt.internal.win32.OS.<clinit>(OS.java:18)
at org.eclipse.swt.graphics.Device.init(Device.java:564)
at org.eclipse.swt.widgets.Display.init(Display.java:1780)
at org.eclipse.swt.graphics.Device.<init>(Device.java:100)
at org.eclipse.swt.widgets.Display.<init>(Display.java:355)
at org.eclipse.swt.widgets.Display.<init>(Display.java:351)
at Gui.<init>(Gui.java:45)
at Main.main(Main.java:26)
Exception in thread "main"