当前位置:网站首页>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
边栏推荐
- QR code generation and analysis
- Redis docker 主从模式与哨兵sentinel
- MySQL优化
- Xlnet (generalized autorefressive trainingfor language understanding) paper notes
- MySQL index and data storage structure foundation
- 云技能提升好伙伴,亚马逊云师兄今天正式营业
- 1. Basic configuration
- Pass anonymous function to simplification principle
- DDD interview
- Clickhouse installation (quick start)
猜你喜欢

How to reduce the delay in live broadcast in the development of live broadcast source code with goods?

Comparison problems encountered in recent study

Idea shortcut key settings
![[new book recommendation] DeNO web development](/img/86/27906ae378e597cf64bb2d760a9dff.png)
[new book recommendation] DeNO web development

单片机 MCU 固件打包脚本软件

Abstract classes and interfaces

Microsoft. Bcl. Async usage summary -- in Net framework 4.5 project Net framework version 4.5 and above can use async/await asynchronous feature in C 5

Eight sorts (I)

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

Flutter 中的 ValueNotifier 和 ValueListenableBuilder
随机推荐
Abstract classes and interfaces
Why won't gold depreciate???
Datatabletomodellist entity class
Follow the wechat oauth2.0 access scheme
云技能提升好伙伴,亚马逊云师兄今天正式营业
布隆过滤器
qmlplugindump executable not found. It is required to generate the qmltypes file for VTK Qml
How to build an all-in-one database cloud machine that meets the needs of information innovation?
Task summary in NLP
Notes on masking and padding in tensorflow keras
八大排序(一)
八大排序(二)
GPT (improving language understanding generative pre training) paper notes
[new book recommendation] DeNO web development
Principle and implementation of small program hand-held bullet screen (uni APP)
[new book recommendation] mongodb performance tuning
Plan the IT technology route for the new year? Let's learn about Gartner infrastructure hype cycle
QR code generation and analysis
MySQL优化
ACM intensive training graph theory exercise 3 in the summer vacation of 2020 [problem solving]