This article mainly introduces the relevant information about the Java Resource path. Friends who need it can refer to the Java Resource path. First of all, it is very important. There is no standard relative path in Java. There are various ways to obtain resources through relative paths. It is converted into absolute path strength based on certain rules, and it is also very important. Never use absolute paths directly, otherwise it will be ugly. Based on the above two points, the Resource path problem can be summed up in one point: find the base point, that is, in a certain way. Environment (web, j2ee or jar package, etc.) find a stable base point through a suitable method, and then use this base point to find the resource you want. What are the base points in Java? To roughly summarize, there are the following: 1) classpath If the resource you are looking for is under the classpath, then it is more appropriate to use the base point of classpath. The main way to obtain this base point is through ClassLoader. The specific method is ClassLoader.getResource(String name), and obtain Cla
1. Detailed explanation of Java Resource path arrangement
##Introduction: This article mainly introduces the relevant information about Java Resource path compilation and summary. Friends in need can refer to
[Related Q&A recommendations]:
The above is the detailed content of 10 recommended articles about path organization. For more information, please follow other related articles on the PHP Chinese website!