Skip to content

Instantly share code, notes, and snippets.

@wayoda
wayoda / GetSystemPath.java
Last active August 28, 2021 10:12
Get the user.dir and codebase dir for a jar file invoked from the commandline
package org.wayoda.arduino;
import java.util.Properties;
import java.io.File;
public class GetSystemPath {
public GetSystemPath() {
Properties p=System.getProperties();
String userDir=p.getProperty("user.dir");
try {