Java examples for Reflection:Class Loader
get Class Execute Path
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { System.out.println(getExecutePath()); }//from ww w . j a v a 2s . com public static String getExecutePath() { return ClassLoader.getSystemResource("").getPath(); } }