equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
89 |
89 |
90 public void log(String s) { |
90 public void log(String s) { |
91 log.println(s); |
91 log.println(s); |
92 } |
92 } |
93 |
93 |
94 |
|
95 /* |
94 /* |
96 * Help for loading localized messages. |
95 * Help for loading localized messages. |
97 */ |
96 */ |
98 private ResourceBundle m; |
97 private ResourceBundle m; |
99 |
98 |
112 return MessageFormat.format(m.getString(key), args); |
111 return MessageFormat.format(m.getString(key), args); |
113 } catch (MissingResourceException e) { |
112 } catch (MissingResourceException e) { |
114 fatal("Key " + key + " not found in resources.", e); |
113 fatal("Key " + key + " not found in resources.", e); |
115 } |
114 } |
116 return null; /* dead code */ |
115 return null; /* dead code */ |
117 } |
|
118 |
|
119 /* |
|
120 * Usage message. |
|
121 */ |
|
122 public void usage() throws Exit { |
|
123 log.println(getText("usage")); |
|
124 } |
|
125 |
|
126 public void version() throws Exit { |
|
127 log.println(getText("javah.version", |
|
128 System.getProperty("java.version"), null)); |
|
129 } |
116 } |
130 |
117 |
131 /* |
118 /* |
132 * Failure modes. |
119 * Failure modes. |
133 */ |
120 */ |