84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
如图:
我想要在ZXingCode类中,加载下面的image文件夹下的图片,路径怎么写?File file = new File(filePath);试着放了几个地方都不知道怎么写,不要本地绝对路径,要项目路径
认证高级PHP讲师
public static void main(String[] args){ URL url = ClassLoader.getSystemResource("config/image/***.jpg"); File file = new File(url.getPath()); System.out.println(file.exists()); }
More references here
Why do you have to ask questions when you can get the answer from any search engine?
More references here
Why do you have to ask questions when you can get the answer from any search engine?