jjg@66: /* ohair@798: * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. jjg@66: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jjg@66: * jjg@66: * This code is free software; you can redistribute it and/or modify it jjg@66: * under the terms of the GNU General Public License version 2 only, as jjg@66: * published by the Free Software Foundation. jjg@66: * jjg@66: * This code is distributed in the hope that it will be useful, but WITHOUT jjg@66: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jjg@66: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jjg@66: * version 2 for more details (a copy is included in the LICENSE file that jjg@66: * accompanied this code). jjg@66: * jjg@66: * You should have received a copy of the GNU General Public License version jjg@66: * 2 along with this work; if not, write to the Free Software Foundation, jjg@66: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jjg@66: * ohair@554: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@554: * or visit www.oracle.com if you need additional information or have any ohair@554: * questions. jjg@66: */ jjg@66: jjg@66: import java.io.*; jjg@66: jjg@66: /* jjg@66: * @test jjg@66: * @bug 6715753 jjg@66: * @summary Use javap to inquire about a specific inner class jjg@66: */ jjg@66: jjg@66: public class T6715753 { jjg@66: public static void main(String... args) throws Exception { jjg@66: new T6715753().run(); jjg@66: } jjg@66: jjg@66: void run() throws Exception { jjg@66: StringWriter sw = new StringWriter(); jjg@66: PrintWriter pw = new PrintWriter(sw); jjg@66: String[] args = { "-notAnOption" }; jjg@66: int rc = com.sun.tools.javap.Main.run(args, pw); jjg@66: String log = sw.toString(); jjg@66: if (rc == 0 jjg@66: || log.indexOf("-notAnOption") == -1 jjg@66: || log.indexOf("javap") == -1) { // locale-independent indication of usage message jjg@66: System.err.println("rc: " + rc + ", log=\n" + log); jjg@66: throw new Exception("test failed"); jjg@66: } jjg@66: } jjg@525: }