当前位置:网站首页>Is the jar package for the project or the project for the jar package
Is the jar package for the project or the project for the jar package
2022-06-30 09:53:00 【weixin_ fifty-one million eight hundred and thirty-four thousan】
yes jar Package find item , Or the project jar package
title , Is relative , Their roles are interchangeable .
The project we wrote , Program and resource files in the project , If they want to interact , You need to be able to see each other , Or the program should see the resource file , When designing the directory structure , Make sure that the resource file can be sniffed by the program .
jar A package is a package , Project package
ext In the catalog jar package Can't see us in workspace Of the project written in , however jvm When compiling programs , Can find ext Under the jar package , As a resource , Compile the project we wrote , When we execute our projects , The project will call ext Under the jar The program in the package performs some operations , For example, looking for configuration files , To configure .
however ,ext Under the jar package , You can only see ext File resources under , Can't see the resource file in our project . That's the problem
Lead to strange phenomena , For example, the configuration is unsuccessful , Unable to find configuration file .
The first point , To find out who threw the exception .( Program )
Second point , Observe the whole process from the perspective of the exception thrower , Find the problem .
The following is a demonstration of how to ext In the catalog jar package Become something that can be found by our project .( apply IDEA, It can't be solved jar How to find a project , If you want to let jar Package found resource file , The resource file must be the same as jar The package is in the same directory , Also note some catalog standards )
stay File -> Project Structure -> Libraries Click on the + Number , Click on java
Find out what needs to be introduced jar package , Click on ok
Find the corresponding item Click on OK
It's a connection
边栏推荐
- Notes on masking and padding in tensorflow keras
- 云技能提升好伙伴,亚马逊云师兄今天正式营业
- utlis 内存池 对象池
- How do databases go to the enterprise cloud? Click to view the answer
- 1. Basic configuration
- Demo of guavacache
- The present situation and challenge of the infrastructure of Yiwen parsing database
- 八大排序(二)
- MySQL index optimization miscellaneous
- Techtarget: Interpretation of the basic concept of super fusion cloud
猜你喜欢

MySQL explain

【新书推荐】Deno Web Development

P. Summary of NP, NPC, NP hard and other issues

八大排序(二)

Framework program of browser self-service terminal based on IE kernel

GPT (improving language understanding generative pre training) paper notes

Notes on masking and padding in tensorflow keras

AutoUpdater. Net client custom update file

Principle and implementation of small program hand-held bullet screen (uni APP)

About the smart platform solution for business hall Terminal Desktop System
随机推荐
Enum demo
【Ubuntu-MySQL8安装与主从复制】
Golang magic code
Create thread pool demo
Utils collaboration
【新书推荐】Deno Web Development
Work notes: SendTo failed errno 22
prometheus 监控之 ntp_exporter
近期学习遇到的比较问题
Initialize static resource demo
thrift简单使用
训练一个图像分类器demo in PyTorch【学习笔记】
Bluetooth BT RF test (forwarding)
11.自定义hooks
Flutter 中的 ValueNotifier 和 ValueListenableBuilder
[new book recommendation] DeNO web development
Object detection yolov5 open source project debugging
小程序开发踩坑之旅
[Ubuntu redis installation]
Numpy (time date and time increment)