aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjada <jada@28c7f869-5b4e-e670-f602-82bfaf57f300>2006-02-14 21:49:14 +0000
committerjada <jada@28c7f869-5b4e-e670-f602-82bfaf57f300>2006-02-14 21:49:14 +0000
commit825c6befcfc363fc14ab406f300686caa623b59a (patch)
tree2f4db346111343842d31d47debadbad256d1edad
parent971762138bef7ad540026e9fb77e1018f9d23828 (diff)
1) Moved the copying of resources and shader files from the target "jar" to "compile".
2) Removed default lws file arguement option in commandline execution.
-rw-r--r--build.xml17
-rw-r--r--src/classes/org/jdesktop/j3d/examples/lightwave/Viewer.java17
2 files changed, 19 insertions, 15 deletions
diff --git a/build.xml b/build.xml
index fd37a03..9bcdb2c 100644
--- a/build.xml
+++ b/build.xml
@@ -68,11 +68,6 @@
debug="true"
deprecation="off">
</javac>
- </target>
-
- <target name="jar" depends="init,compile">
- <!-- Create the dist directory -->
- <mkdir dir="${dist}"/>
<!-- Copy resources to build in preparation for jarring -->
<copy todir="${build}/classes/org/jdesktop/j3d/examples/resources">
@@ -87,6 +82,12 @@
<fileset dir="${src}/classes/org/jdesktop/j3d/examples/glsl_shader" includes ="*.vert, *.frag"/>
</copy>
+ </target>
+
+ <target name="jar" depends="init,compile">
+ <!-- Create the dist directory -->
+ <mkdir dir="${dist}"/>
+
<!-- Create the jar file -->
<jar jarfile="${output.jar}"
manifest="manifest.mf"
@@ -224,4 +225,10 @@
</java>
</target>
+ <target name="run.Viewer" depends="init-run">
+ <java fork="true"
+ classname="org.jdesktop.j3d.examples.lightwave.Viewer">
+ <classpath refid="run.classpath"/>
+ </java>
+ </target>
</project>
diff --git a/src/classes/org/jdesktop/j3d/examples/lightwave/Viewer.java b/src/classes/org/jdesktop/j3d/examples/lightwave/Viewer.java
index 8959d4d..9b99466 100644
--- a/src/classes/org/jdesktop/j3d/examples/lightwave/Viewer.java
+++ b/src/classes/org/jdesktop/j3d/examples/lightwave/Viewer.java
@@ -160,7 +160,12 @@ public class Viewer extends Applet {
public void destroy() {
u.cleanup();
}
-
+
+ private static void usage() {
+ System.out.println("Usage: java Viewer <.lws>") ;
+ System.exit(0) ;
+ }
+
/**
* The main method of the application takes one argument in the
* args array; the filname that you want to load. Note that the
@@ -190,15 +195,7 @@ public class Viewer extends Applet {
}
}
else {
- // the path to the image for an application
- try {
- url = new java.net.URL("file:./ballcone.lws");
- }
- catch (java.net.MalformedURLException ex) {
- System.err.println(ex.getMessage());
- ex.printStackTrace();
- System.exit(1);
- }
+ usage();
}
new MainFrame(new Viewer(url), 500, 500);
}