Changeset 365 in tmcsimulator for trunk/src/spikes


Ignore:
Timestamp:
04/11/2019 07:01:03 PM (7 years ago)
Author:
jdalbey
Message:

RevisionNumber?.java, SimulationManagerView?.java : Fix defect #119

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/spikes/ShowUserDir.java

    r360 r365  
    22package spikes; 
    33 
     4import java.io.File; 
    45import java.io.FileInputStream; 
     6import java.net.URL; 
     7import java.net.URLClassLoader; 
    58import java.util.Properties; 
    69import java.util.logging.Level; 
     
    1720    public ShowUserDir() 
    1821    { 
     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. 
    1929        JOptionPane.showMessageDialog(new JWindow(),  
    2030                "\nUser.Dir=" + System.getProperty("user.dir"), 
    21                 "Show User Dir", JOptionPane.INFORMATION_MESSAGE);                         
     31                "Show User Dir", JOptionPane.INFORMATION_MESSAGE);  
     32         
    2233    }    
    2334    public static void main(String[] args) 
Note: See TracChangeset for help on using the changeset viewer.