The difference between java application library and java web lib

I remebered that i had writed a java web programming.At that time, i added jar packages by "build path" so that i could import a user library path at firstly.

When the path of jar library had been imported into eclipse,to complise program was right, but it was wrong to run at the Tomcat server.

So i would like to know what leads the condition. Then i found the answer on the web,finally, i summary following contents by different answers some people on the web.

I have known that eclipse project only copys the path of jar library,so it shall not add these jars into the project.Then i can programming rightly in the editor.

But i must run web project on the server that has own class loader. And the server to load jars at the lib that is under WEB-INF.Therefore, we have to add extend jar packages into the lib folder when we editor Web programming.

Finally, it leads to a condition that we can compile programming in Eclipse,but can not run on the server cause of finding not jar packages.

Notice: i have to obye the rulers that special framework, beacuse different frameworks have different running mechanism.

时间: 2024-08-28 02:10:33

The difference between java application library and java web lib的相关文章

在eclipse中运行spring web application时的异常: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener....... tomcat再发布web项目时,并没有将maven的依赖包一起随项目的编译一并进行打包. 解决办法

Java application 性能分析分享

性能分析的主要方式 监视:监视是一种用来查看应用程序运行时行为的一般方法.通常会有多个视图(View)分别实时地显示 CPU 使用情况.内存使用情况.线程状态以及其他一些有用的信息,以便用户能很快地发现问题的关键所在. 转储:性能分析工具从内存中获得当前状态数据并存储到文件用于静态的性能分析.Java 程序是通过在启动 Java 程序时添加适当的条件参数来触发转储操作的.它包括以下三种: 系统转储:JVM 生成的本地系统的转储,又称作核心转储.一般的,系统转储数据量大,需要平台相关的工具去分析,

使用JWPL (Java Wikipedia Library)操作维基百科数据

使用JWPL (Java Wikipedia Library)操作维基百科数据 1. JWPL介绍 JWPL(Java Wikipedia Library)是一个开源的访问wikipeida数据的Java API包,提供了快速访问维基百科中包含的消息,如重定向.类别.文章和链接结构的结构性访问接口.它提供的DataMachine 工具类可快速解析wiki格式文件,生成mysql的数据txt文件,可通过mysqlimport 导入到本地数据库中. JWPL介绍官网:https://dkpro.gi

java 远程调试(java application与web application)

如摘要中所述,在联调时经常性的需要将程序部署到测试机器上,此时要调试显得很不方便.以前的做法都是在程序中打印信息来进行追踪,但是这种方法很有局限性,因为往往无法一次就定位到有问题的地方,需要不断的修改程序打印的语句,不断的重启应用,这需要花费大量的时间和精力.因此,采用远程调试会是一种好的解决方式.下面将会对java application和web application两种入手进行说明. 一.Java Application的远程调试 1.准备要调试的server端环境 首先准备一段小的代码,

win10+eclipse+hadoop2.7.2+maven直接通过Run as Java Application运行wordcount

一.准备工作 (1)Hadoop2.7.2 在linux部署完毕,成功启动dfs和yarn,通过jps查看,进程都存在 (2)安装maven 二.最终效果 在windows系统中,直接通过Run as Java Application运行wordcount,而不需要先打包成jar包,然后在linux终端运行 三,操作步骤 1.启动dfs和yarn 终端:${HADOOP_HOME}/sbin/start-dfs.sh ${HADOOP_HOME}/sbin/start-yarn.sh 通过在na

使用Maven构建javaWeb项目时,启动tomcat出错:严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.conte

在初学使用maven构建javaWeb的项目的时候,启动tomcat加载时,总是提示如下错误,辛苦一番终于找到解决办法. 严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderList

Using properties file in java application

Properties files are a cool place to store your configuration details like database connection properties, error messages and other configurations for your program. You can use properties file in your application using following utility class. This c

remote java application

remote java application remote java application

Ignoring unused library classes...java.io.IOException: You have to specify '-keep' options for the s

执行Maven Install打包的时候,出现以下错误信息: Ignoring unused library classes-java.io.IOException: You have to specify '-keep' options for the shrinking step. [proguard] Ignoring unused library classes...java.io.IOException: You have to specify '-keep' options for