Warning: Can't use blame annotator:
svn blame failed on trunk/src/spikes/ShowUserDir.java: ("Can't find a temporary directory: Internal error", 20014)

source: tmcsimulator/trunk/src/spikes/ShowUserDir.java @ 443

Revision 443, 1.1 KB checked in by jdalbey, 7 years ago (diff)

Add unified logger.zip to build.xml.

RevLine 
1
2package spikes;
3
4import java.io.File;
5import java.io.FileInputStream;
6import java.net.URL;
7import java.net.URLClassLoader;
8import java.util.Properties;
9import java.util.logging.Level;
10import javax.swing.JOptionPane;
11import javax.swing.JWindow;
12import tmcsim.common.SimulationException;
13
14/**
15 * Spike to reveal working directory anomaly with Jar files.
16 * @author jdalbey
17 */
18public 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.