1
/*************************************************************************
3
* The Contents of this file are made available subject to the terms of
4
* the Sun Industry Standards Source License Version 1.2
6
* Sun Microsystems Inc., March, 2001
9
* Sun Industry Standards Source License Version 1.2
10
* =================================================
11
* The contents of this file are subject to the Sun Industry Standards
12
* Source License Version 1.2 (the "License"); You may not use this file
13
* except in compliance with the License. You may obtain a copy of the
14
* License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
16
* Software provided under this License is provided on an "AS IS" basis,
17
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
18
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
19
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
20
* See the License for the specific provisions governing your rights and
21
* obligations concerning the Software.
23
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
25
* Copyright: 2001 by Sun Microsystems, Inc.
27
* All Rights Reserved.
29
************************************************************************/
30
/*___INFO__MARK_END__*/
31
package com.sun.grid.drmaa.howto;
33
import org.ggf.drmaa.DrmaaException;
34
import org.ggf.drmaa.Session;
35
import org.ggf.drmaa.SessionFactory;
36
import org.ggf.drmaa.Version;
39
public static void main(String[] args) {
40
SessionFactory factory = SessionFactory.getFactory();
41
Session session = factory.getSession();
44
System.out.println("Supported contact strings: \"" +
45
session.getContact() + "\"");
46
System.out.println("Supported DRM systems: \"" +
47
session.getDrmSystem() + "\"");
48
System.out.println("Supported DRMAA implementations: \"" +
49
session.getDrmaaImplementation() + "\"");
53
System.out.println("Using contact strings: \"" +
54
session.getContact() + "\"");
55
System.out.println("Using DRM systems: \"" +
56
session.getDrmSystem() + "\"");
57
System.out.println("Using DRMAA implementations: \"" +
58
session.getDrmaaImplementation() + "\"");
60
Version version = session.getVersion();
62
System.out.println("Using DRMAA version " + version.toString());
65
} catch (DrmaaException e) {
66
System.out.println("Error: " + e.getMessage());