当前位置:网站首页>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
边栏推荐
- MySQL explain
- prometheus 监控之 ntp_exporter
- 八大排序(一)
- Numpy (time date and time increment)
- MySQL index and data storage structure foundation
- [ubuntu-mysql 8 installation and master-slave replication]
- How do databases go to the enterprise cloud? Click to view the answer
- MySQL-- Entity Framework Code First(EF Code First)
- Redis + MySQL implements the like function
- NTP of Prometheus monitoring_ exporter
猜你喜欢

(zero) most complete JVM knowledge points

Design of mfc+mysql document data management system based on VS2010

Dart 开发技巧

Terminal -- Zsh of terminal three swordsmen

Cb/s Architecture - Implementation Based on cef3+mfc

Valuenotifier and valuelistenablebuilder in fluent

【AGC】构建服务3-认证服务示例

Plan the IT technology route for the new year? Let's learn about Gartner infrastructure hype cycle

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

云技能提升好伙伴,亚马逊云师兄今天正式营业
随机推荐
Principle and implementation of small program hand-held bullet screen (uni APP)
Task summary in NLP
Numpy (data type)
Idea setting automatic package Guide
11. customize hooks
Demo of guavacache
Shenhe thermomagnetic: Super fusion dual active cluster solution for MES system
Machine learning note 9: prediction model optimization (to prevent under fitting and over fitting problems)
Returnjson, which allows more custom data or class names to be returned
Critical applications and hyper converged infrastructure: the time has come
MCU firmware packaging Script Software
Clickhouse installation (quick start)
【AGC】构建服务3-认证服务示例
Framework program of browser self-service terminal based on IE kernel
Tablet PC based ink handwriting recognition input method
Utlis memory pool object pool
What makes flutter special
11.自定义hooks
MySQL explain
Properties of string