| import java.io.*; |
| |
| if ( !( basedir instanceof File ) ) |
| { |
| System.out.println( "Global script variable not defined: basedir or not a File" ); |
| throw new RuntimeException("Global script variable not defined: basedir or not a File"); |
| } |
| |
| if ( !( context instanceof Map ) ) |
| { |
| System.out.println( "Global script variable not defined: context or not a Map" ); |
| throw new RuntimeException("Global script variable not defined: context or not a Map"); |
| } |
| |
| File file = new File( basedir, "verify.bsh"); |
| if ( !file.exists()) |
| { |
| throw new FileNotFoundException("verify.bsh not found in " + basedir); |
| } |
| |
| String value = context.get( "foo" ); |
| System.out.println("foo="+value); |
| |
| System.out.print("Test"); |
| return true; |