Add emacs and vim editing settings to the bottom of *.py files.
[scons.git] / test / Java / Java-1.6.py
index f2b629aff76a89b8565f96789306fdd07f73a725..d107e321862b368a7724edba7b78b3dcb88edc8b 100644 (file)
@@ -29,24 +29,15 @@ Test Java compilation with a live Java 1.6 "javac" compiler.
 """
 
 import os
-import os.path
-import string
 import sys
+
 import TestSCons
 
 _python_ = TestSCons._python_
 
 test = TestSCons.TestSCons()
 
-ENV = test.java_ENV()
-ENV['PATH'] = '/usr/lib/jvm/java-6-sun-1.6.0.00/bin' + os.pathsep + os.environ['PATH']
-
-if test.detect_tool('javac', ENV=ENV):
-    where_javac = test.detect('JAVAC', 'javac', ENV=ENV)
-else:
-    where_javac = test.where_is('javac')
-if not where_javac:
-    test.skip_test("Could not find Java javac, skipping test(s).\n")
+where_javac, java_version = test.java_where_javac('1.6')
 
 
 
@@ -235,10 +226,10 @@ public class NestedExample
 {
         public NestedExample()
         {
-                Thread t = new Thread() {
+                new Thread() {
                         public void start()
                         {
-                                Thread t = new Thread() {
+                                new Thread() {
                                         public void start()
                                         {
                                                 try {Thread.sleep(200);}
@@ -257,7 +248,7 @@ public class NestedExample
 
         public static void main(String argv[])
         {
-                NestedExample e = new NestedExample();
+                new NestedExample();
         }
 }
 """)
@@ -401,3 +392,9 @@ classes_must_not_exist('class5', expect_5)
 test.fail_test(failed)
 
 test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4: