Parent Folder

获取运行的jar包的路径。

自古美人都是妖i 提交于 2020-10-12 02:51:46
在运行中的jar中,用用代码获取jar包的位置。 1、在普通的jar包中使用 String path = MyClass.class.getProtectionDomain().getCodeSource().getLocation().getPath(); 可以获取到这个 file:/Users/xxx/xxx-0.0.1.jar!/BOOT-INF/classes!/ 路径。 2、springboot中使用下面的方法: ApplicationHome home = new ApplicationHome(MyApplication.class); //返回jar包所在的目录 /Users/xxx/ home.getDir(); //返回java包文件位置 /Users/xxx/xxx-0.0.1.jar home.getSource(); // returns the jar absolute path. 参考文档: https://stackoverflow.com/questions/320542/how-to-get-the-path-of-a-running-jar-file https://stackoverflow.com/questions/46657181/how-to-get-spring-boot-application-jar-parent-folder

全新内存布局Android5 for one x

拜拜、爱过 提交于 2019-12-06 06:25:18
众所周知Android5.0默认ART模式,运行速度加倍,软件占用内存也加倍,我们one x这种元老机采用旧的内存布局,data空间2g ART模式下安装几个软件也就不够用了。最近逛国外的xda论坛,发现有大神通过recovery重新给one x分区,使得data空间和原sd空间合并,妈妈再也不用担心内存不足的烦恼了,加上全新的Android 5.0.2使我们的元老晚茶重获新生! 教程如下: 英文原文 Requirements: HTC One X International. 50%+ battery. You know how to flash a recovery. You know how to flash ROM and boot.img.To upgrade, follow these simple steps or use the detailed guides below:Make sure your adb/fastboot is up to date and working. Make sure you can transfer files with MTP (test before you start the transformation). 1.Backup everything in your phone that you want to keep.