20 lines
459 B
Java
20 lines
459 B
Java
package net.risesoft.demo;
|
||
|
||
public class Example {
|
||
|
||
public static void main(String[] args) {
|
||
Car car = new Car();
|
||
|
||
System.out.println("当前车辆品牌: ");
|
||
System.out.println(car.getName());
|
||
|
||
System.out.println("当前车辆版本: ");
|
||
System.out.println(car.getVersion());
|
||
|
||
System.out.println("当前 jar 包路径 : ");
|
||
System.out.println(car.getClass().getProtectionDomain().getCodeSource().getLocation().getPath());
|
||
|
||
}
|
||
|
||
}
|