Adding external JAR´S to JDK

余生长醉 提交于 2020-01-04 05:08:08

问题


I just started developing online applications using Servlets and JSP. As you may know we need a doPost method which receives HttpServletRequest req,HttpServletResponse res) parameters.

My question is the following. I understand I need to import the javax.servlet and javax.servlet.http.* package in order for this to work. I remember once a this crazy teacher who told me I could modify my jdk/jre/lib folder and add those external jar which I would use a lot in order to forget about changing the class path every time I compile a project. Those anyone know how to do this? I already copy the servlet-api.jar into the lib folder but nothing happens..

Thanks


回答1:


For external JARs put them in the ext folder. For example. If you are using 64bit JDK.

C:\Program Files\Java\jdk1.8.0_25\jre\lib\ext

If you are using 32bit version of JDK the path may look like this.

C:\Program Files (x86)\Java\jdk1.8.0_31\jre\lib\ext



来源:https://stackoverflow.com/questions/32814400/adding-external-jar%c2%b4s-to-jdk

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!