Changeset 365 in tmcsimulator for trunk/src/spikes
- Timestamp:
- 04/11/2019 07:01:03 PM (7 years ago)
- File:
-
- 1 edited
-
trunk/src/spikes/ShowUserDir.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/spikes/ShowUserDir.java
r360 r365 2 2 package spikes; 3 3 4 import java.io.File; 4 5 import java.io.FileInputStream; 6 import java.net.URL; 7 import java.net.URLClassLoader; 5 8 import java.util.Properties; 6 9 import java.util.logging.Level; … … 17 20 public ShowUserDir() 18 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. 19 29 JOptionPane.showMessageDialog(new JWindow(), 20 30 "\nUser.Dir=" + System.getProperty("user.dir"), 21 "Show User Dir", JOptionPane.INFORMATION_MESSAGE); 31 "Show User Dir", JOptionPane.INFORMATION_MESSAGE); 32 22 33 } 23 34 public static void main(String[] args)
Note: See TracChangeset
for help on using the changeset viewer.
