1 /* |
1 /* |
2 * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2008, 2013, 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. |
7 * published by the Free Software Foundation. |
68 return sb.toString(); |
70 return sb.toString(); |
69 } |
71 } |
70 |
72 |
71 public static void main(String[] args) throws IOException { |
73 public static void main(String[] args) throws IOException { |
72 File javaHomeDir = new File(System.getProperty("java.home")); |
74 File javaHomeDir = new File(System.getProperty("java.home")); |
73 File tmpDir = new File(System.getProperty("java.io.tmpdir")); |
75 File outputDir = new File("outputDir" + new Random().nextInt(65536)); |
74 File outputDir = new File(tmpDir, "outputDir" + new Random().nextInt(65536)); |
|
75 outputDir.mkdir(); |
76 outputDir.mkdir(); |
76 outputDir.deleteOnExit(); |
77 outputDir.deleteOnExit(); |
77 |
78 |
78 File dnsjarfile = new File(javaHomeDir, "lib" + File.separator + "ext" + File.separator + "dnsns.jar"); |
79 File dnsjarfile = new File(javaHomeDir, "lib" + File.separator + "ext" + File.separator + "dnsns.jar"); |
79 File tmpJar = copyFileTo(dnsjarfile, outputDir); |
80 File tmpJar = copyFileTo(dnsjarfile, outputDir); |