1 package edu.berkeley.qfat;
6 public static void main(String[] ss) throws Exception {
7 String tmpdir = System.getProperty("java.io.tmpdir");
8 File jogldir = new File(tmpdir + File.separatorChar + "jogl");
10 for(String s : new String[] {
15 "libgluegen-rt.jnilib",
21 InputStream is = Main.class.getClassLoader().getResourceAsStream(s);
22 System.out.println(jogldir.toString() + File.separatorChar + s);
23 OutputStream os = new FileOutputStream(jogldir.toString() + File.separatorChar + s);
24 byte[] buf = new byte[1024];
26 int num = is.read(buf, 0, buf.length);
28 os.write(buf, 0, num);
32 } catch (Exception e) {
37 System.setProperty("java.library.path",
38 System.getProperty("java.library.path")+
41 System.out.println(System.getProperty("java.library.path"));
44 Runtime.getRuntime().exec("java -Djava.library.path="+jogldir.toString()+" -cp space-sculptor.jar edu.berkeley.qfat.Main").waitFor();
49 Runtime.getRuntime().load(jogldir.toString() + File.separatorChar + System.mapLibraryName("gluegen-rt"));
50 Runtime.getRuntime().load(jogldir.toString() + File.separatorChar + System.mapLibraryName("jogl"));
51 Runtime.getRuntime().load(jogldir.toString() + File.separatorChar + System.mapLibraryName("jogl_cg"));
52 Runtime.getRuntime().load(jogldir.toString() + File.separatorChar + System.mapLibraryName("jogl_awt"));