--- /dev/null
+package edu.berkeley.qfat;
+import java.io.*;
+
+public class Boot {
+
+ public static void main(String[] ss) throws Exception {
+ String tmpdir = System.getProperty("java.io.tmpdir");
+ File jogldir = new File(tmpdir + File.separatorChar + "jogl");
+ jogldir.mkdirs();
+ for(String s : new String[] {
+ "gluegen-rt.dll",
+ "jogl.dll",
+ "jogl_awt.dll",
+ "jogl_cg.dll",
+ "libgluegen-rt.jnilib",
+ "libjogl_awt.jnilib",
+ "libjogl.jnilib",
+ "libjogl_cg.jnilib"
+ }) {
+ try {
+ InputStream is = Main.class.getClassLoader().getResourceAsStream(s);
+ System.out.println(jogldir.toString() + File.separatorChar + s);
+ OutputStream os = new FileOutputStream(jogldir.toString() + File.separatorChar + s);
+ byte[] buf = new byte[1024];
+ while(true) {
+ int num = is.read(buf, 0, buf.length);
+ if (num==-1) break;
+ os.write(buf, 0, num);
+ }
+ os.flush();
+ os.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ System.setProperty("java.library.path",
+ System.getProperty("java.library.path")+
+ File.pathSeparator+
+ jogldir.toString());
+ System.out.println(System.getProperty("java.library.path"));
+
+ try {
+ Runtime.getRuntime().exec("java -Djava.library.path="+jogldir.toString()+" -cp space-sculptor.jar edu.berkeley.qfat.Main").waitFor();
+ } finally {
+ System.exit(0);
+ }
+ /*
+ Runtime.getRuntime().load(jogldir.toString() + File.separatorChar + System.mapLibraryName("gluegen-rt"));
+ Runtime.getRuntime().load(jogldir.toString() + File.separatorChar + System.mapLibraryName("jogl"));
+ Runtime.getRuntime().load(jogldir.toString() + File.separatorChar + System.mapLibraryName("jogl_cg"));
+ Runtime.getRuntime().load(jogldir.toString() + File.separatorChar + System.mapLibraryName("jogl_awt"));
+ */
+ //Main.main(ss);
+ }
+
+}
\ No newline at end of file