| Revision 443,
1.1 KB
checked in by jdalbey, 7 years ago
(diff) |
|
Add unified logger.zip to build.xml.
|
| Line | |
|---|
| 1 | |
|---|
| 2 | package spikes; |
|---|
| 3 | |
|---|
| 4 | import java.io.File; |
|---|
| 5 | import java.io.FileInputStream; |
|---|
| 6 | import java.net.URL; |
|---|
| 7 | import java.net.URLClassLoader; |
|---|
| 8 | import java.util.Properties; |
|---|
| 9 | import java.util.logging.Level; |
|---|
| 10 | import javax.swing.JOptionPane; |
|---|
| 11 | import javax.swing.JWindow; |
|---|
| 12 | import tmcsim.common.SimulationException; |
|---|
| 13 | |
|---|
| 14 | /** |
|---|
| 15 | * Spike to reveal working directory anomaly with Jar files. |
|---|
| 16 | * @author jdalbey |
|---|
| 17 | */ |
|---|
| 18 | public class ShowUserDir |
|---|
| 19 | { |
|---|
| 20 | public ShowUserDir() |
|---|
| 21 | { |
|---|
| 22 | // This shows the path to where the Jar is located |
|---|
| 23 | String currpath = getClass().getProtectionDomain().getCodeSource().getLocation().getPath(); |
|---|
| 24 | JOptionPane.showMessageDialog(new JWindow(), |
|---|
| 25 | currpath, |
|---|
| 26 | "Show Jar Path", JOptionPane.INFORMATION_MESSAGE); |
|---|
| 27 | // This shows the current working directory, which is different |
|---|
| 28 | // if you double-click launch in Nautilus from command line launch. |
|---|
| 29 | JOptionPane.showMessageDialog(new JWindow(), |
|---|
| 30 | "\nUser.Dir=" + System.getProperty("user.dir"), |
|---|
| 31 | "Show User Dir", JOptionPane.INFORMATION_MESSAGE); |
|---|
| 32 | |
|---|
| 33 | } |
|---|
| 34 | public static void main(String[] args) |
|---|
| 35 | { |
|---|
| 36 | new ShowUserDir(); |
|---|
| 37 | } |
|---|
| 38 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.