{"id":10223,"date":"2023-03-25T11:12:24","date_gmt":"2023-03-25T03:12:24","guid":{"rendered":"http:\/\/123.57.164.21\/?p=10223"},"modified":"2023-10-17T17:10:29","modified_gmt":"2023-10-17T09:10:29","slug":"%e8%af%a6%e8%a7%a3eclipse%e9%a1%b9%e7%9b%ae%e4%b8%ad%e7%9a%84-classpath%e6%96%87%e4%bb%b6%e5%8e%9f%e7%90%86","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=10223","title":{"rendered":"\u8be6\u89e3eclipse\u9879\u76ee\u4e2d\u7684.classpath\u6587\u4ef6\u539f\u7406"},"content":{"rendered":"\n<p><strong>1.\u524d\u8a00<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u5728\u4f7f\u7528eclipse\u6216\u8005myeclipse\u8fdb\u884cjava\u9879\u76ee\u5f00\u53d1\u7684\u65f6\u5019\uff0c\u6bcf\u4e2aproject\uff08\u5de5\u7a0b\uff09\u4e0b\u9762\u90fd\u4f1a\u6709\u4e00\u4e2a.classpath\u6587\u4ef6\uff0c\u90a3\u4e48\u8fd9\u4e2a\u6587\u4ef6\u7a76\u7adf\u6709\u4ec0\u4e48\u4f5c\u7528\uff1f<\/p>\n\n\n\n<p><strong>2.\u4f5c\u7528<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>.classpath\u6587\u4ef6\u7528\u4e8e\u8bb0\u5f55\u9879\u76ee\u7f16\u8bd1\u73af\u5883\u7684\u6240\u6709\u4fe1\u606f\uff0c\u5305\u62ec\uff1a\u6e90\u6587\u4ef6\u8def\u5f84\u3001\u7f16\u8bd1\u540eclass\u6587\u4ef6\u5b58\u653e\u8def\u5f84\u3001\u4f9d\u8d56\u7684jar\u5305\u8def\u5f84\u3001\u8fd0\u884c\u7684\u5bb9\u5668\u4fe1\u606f\u3001\u4f9d\u8d56\u7684\u5916\u90e8project\u7b49\u4fe1\u606f\u3002\u5982\u679c\u628a\u8be5\u6587\u4ef6\u5220\u9664\uff0c\u5219eclipse\u4e0d\u80fd\u8bb2\u8be5\u5de5\u7a0b\u8bc6\u522b\u4e3a\u4e00\u4e2a\u6b63\u5e38\u7684java\u5de5\u7a0b\uff0c\u4ec5\u4ec5\u5f53\u505a\u666e\u901a\u7684\u6587\u4ef6\u5939\u800c\u5bfc\u81f4\u4e0d\u80fd\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n\n\n\n<p><strong>3.classpath\u5185\u5bb9<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>.classpath\u6587\u4ef6\u5176\u5b9e\u4e5f\u662f\u4e00\u4e2axml\u683c\u5f0f\u7684\u5185\u5bb9\u6587\u4ef6\uff0c\u5176\u5177\u4f53\u5185\u5bb9\u5927\u81f4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?>\n&lt;classpath>\n    &lt;classpathentry kind=\"src\" path=\"src\"\/>\n    &lt;classpathentry kind=\"src\" path=\"resource\"\/>\n    &lt;classpathentry kind=\"con\" path=\"org.eclipse.jdt.launching.JRE_CONTAINER\/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\/jdk1.7\">\n        &lt;attributes>\n            &lt;attribute name=\"owner.project.facets\" value=\"java\"\/>\n        &lt;\/attributes>\n    &lt;\/classpathentry>\n    &lt;classpathentry kind=\"con\" path=\"org.eclipse.jst.server.core.container\/org.eclipse.jst.server.tomcat.runtimeTarget\/\u5b66\u4e60 8080\">\n        &lt;attributes>\n            &lt;attribute name=\"owner.project.facets\" value=\"jst.web\"\/>\n        &lt;\/attributes>\n    &lt;\/classpathentry>\n    &lt;classpathentry kind=\"con\" path=\"org.eclipse.jst.j2ee.internal.web.container\"\/>\n    &lt;classpathentry kind=\"con\" path=\"org.eclipse.jst.j2ee.internal.module.container\"\/>\n    &lt;classpathentry kind=\"output\" path=\"WebContent\/WEB-INF\/classes\"\/>\n&lt;\/classpath><\/pre>\n\n\n\n<ul><li>\u2460\u4ee5\u201dclasspath\u201d\u4e3a\u6839\u8282\u70b9\uff0c\u6bcf\u4e2a\u201cclasspathentry\u201d\u8282\u70b9\u4ee3\u8868\u4e00\u4e2a\u8bf4\u660e\u4fe1\u606f\u3002<\/li><li>\u2461\u6bcf\u4e2a\u201cclasspathentry\u201d\u4ee5\u201ckind\u201d\u5c5e\u6027\u6307\u660e\u7c7b\u578b\uff0c\u201cpath\u201d\u6307\u660e\u8def\u5f84\u3002<\/li><li>\u2462\u4ee5\u4e0a\u6587\u4ef6\u7684\u6240\u6709\u5185\u5bb9\uff0c\u90fd\u662f\u4f9d\u8d56\u9879\u76ee\u4e2d\u7684\u201cJava Build Path\u201d\u5185\u5bb9\u6539\u53d8\u800c\u6539\u53d8\u7684\uff0c\u5373\u5bf9\u201cJava Build Path\u201d\u7684\u6240\u6709\u64cd\u4f5c\u90fd\u4f1a\u53cd\u5e94\u5230\u6587\u4ef6\u5185\u5bb9\u4e2d\u3002<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-299-1024x656.png\" alt=\"\" class=\"wp-image-10225\" width=\"469\" height=\"301\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-299-1024x656.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-299-300x192.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-299-768x492.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-299-830x531.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-299-230x147.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-299-350x224.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-299-480x307.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-299.png 1484w\" sizes=\"(max-width: 469px) 100vw, 469px\" \/><\/figure><\/div>\n\n\n\n<p>\u73b0\u5728\u6765\u5177\u4f53\u5206\u6790\u6587\u4ef6\u5185\u5bb9\u7684\u6bcf\u4e2a\u8282\u70b9\u542b\u4e49<\/p>\n\n\n\n<p><strong>3.1 kind=&#8221;src&#8221;<\/strong><\/p>\n\n\n\n<p>src\uff1a\u5373source \u6e90\u6587\u4ef6\uff0c\u4ee3\u8868\u7684\u662f\u4e00\u4e2a\u6e90\u6587\u4ef6\uff0cpath=\u201dsrc\u201d\u662f\u4e00\u4e2a\u76f8\u5bf9\u8def\u5f84\uff0c\u76f8\u5bf9.classpath\u6587\u4ef6\u672c\u8eab\uff0c\u5373path=\u201dsrc\u201d\u8868\u793a\u6587\u4ef6\u5939src\u4e0e.classpath\u5728\u540c\u4e00\u4e2a\u76ee\u5f55\uff0c\u4e14\u4ee3\u8868\u6e90\u6587\u4ef6\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;classpathentry kind=\"src\" path=\"src\"\/>\n&lt;classpathentry kind=\"src\" path=\"resource\"\/><\/pre>\n\n\n\n<p>kind=\u201dsrc\u201d\u7684\u64cd\u4f5c\u5bf9\u5e94\u4e8e\u201cJava Build Path\u201d\u7684\u201cSource\u201dtab\u9875<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-300-1024x877.png\" alt=\"\" class=\"wp-image-10226\" width=\"477\" height=\"408\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-300-1024x877.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-300-300x257.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-300-768x658.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-300-830x711.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-300-230x197.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-300-350x300.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-300-480x411.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-300.png 1144w\" sizes=\"(max-width: 477px) 100vw, 477px\" \/><\/figure><\/div>\n\n\n\n<p>\u5982\u4e0b\u56fe\uff0c\u589e\u52a0\u4e00\u4e2a\u6587\u4ef6\u5939bin\u4f5c\u4e3a\u6e90\u6587\u4ef6\uff0c\u5219.classpath\u6587\u4ef6\u589e\u52a0\u5185\u5bb9<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-301-1024x866.png\" alt=\"\" class=\"wp-image-10227\" width=\"454\" height=\"384\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-301-1024x866.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-301-300x254.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-301-768x649.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-301-830x702.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-301-230x194.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-301-350x296.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-301-480x406.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-301.png 1150w\" sizes=\"(max-width: 454px) 100vw, 454px\" \/><\/figure><\/div>\n\n\n\n<p>\u5185\u5bb9\u589e\u52a0\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;classpathentry kind=\"src\" path=\"src\"\/>\n&lt;classpathentry kind=\"src\" path=\"bin\"\/>\n&lt;classpathentry kind=\"src\" path=\"resource\"\/><\/pre>\n\n\n\n<p>\u5f53\u7136\uff0c\u505a\u76f8\u5e94\u4fee\u6539\u6216\u5220\u9664\uff0c\u540c\u6837.classpath\u6587\u4ef6\u5185\u5bb9\u4f1a\u76f8\u5e94\u6539\u53d8\u3002<\/p>\n\n\n\n<p>\u53e6\u5916\uff0c\u5f53\u6307\u5b9a\u5c5e\u6027combineaccessrules=\u201dfalse\u201d\u662f\u5219\u4ee3\u8868\u5f15\u5165\u5916\u90e8project\uff0c\u5177\u4f53\u5982\u4e0b<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;classpathentry combineaccessrules=\"false\" kind=\"src\" path=\"\/mybatis\"\/><\/pre>\n\n\n\n<p>\u5bf9\u5e94\u9875\u9762tab\uff0c\u5176\u4e2dpath=\u201d\/mybatis\u201d\uff0c\u662f\u76f8\u5bf9\u5e94workspace\u4e0b\u7684<\/p>\n\n\n\n<p>\u7edd\u5bf9\u8def\u5f84\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-302-1024x406.png\" alt=\"\" class=\"wp-image-10228\" width=\"484\" height=\"191\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-302-1024x406.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-302-300x119.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-302-768x304.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-302-830x329.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-302-230x91.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-302-350x139.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-302-480x190.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-302.png 1116w\" sizes=\"(max-width: 484px) 100vw, 484px\" \/><\/figure><\/div>\n\n\n\n<p><strong>3.2 kind=&#8221;output&#8221;<\/strong><\/p>\n\n\n\n<p>output\u7528\u4e8e\u6307\u5b9ajava\u6e90\u6587\u4ef6\u7f16\u8bd1\u540e\u7684class\u6587\u4ef6\u5b58\u653e\u8def\u5f84\uff0c\u683c\u5f0f\u5982\u4e0b<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;classpathentry kind=\"output\" path=\"WebContent\/WEB-INF\/classes\"\/><\/pre>\n\n\n\n<p>path\uff1a\u4ee3\u8868\u5b58\u653eclass\u6587\u4ef6\u8def\u5f84\uff0c\u540c\u6837\u662f\u76f8\u5bf9.classpath\u6587\u4ef6\u7684\u8def\u5f84\uff0c\u627e\u5230\u201cWebContent\/WEB-INF\/classes\u201d\uff0c\u53ef\u4ee5\u770b\u5230class\u6587\u4ef6\u7684\u5b58\u653e<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-303-1024x399.png\" alt=\"\" class=\"wp-image-10229\" width=\"426\" height=\"166\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-303-1024x399.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-303-300x117.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-303-768x299.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-303-830x323.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-303-230x90.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-303-350x136.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-303-480x187.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-303.png 1218w\" sizes=\"(max-width: 426px) 100vw, 426px\" \/><\/figure><\/div>\n\n\n\n<p>\u5047\u8bbe\u4fee\u6539\u8f93\u51fa\u6587\u4ef6\u8def\u5f84\uff0c\u5219\u76f8\u5e94\u5185\u5bb9\u4e5f\u4f1a\u6539\u53d8<\/p>\n\n\n\n<p>\u6539\u4e3a\uff1aspring-mybatis\\WebContent\\WEB-INF\\newclasses<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-304-1024x843.png\" alt=\"\" class=\"wp-image-10230\" width=\"435\" height=\"357\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-304-1024x843.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-304-300x247.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-304-768x632.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-304-830x683.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-304-230x189.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-304-350x288.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-304-480x395.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-304.png 1152w\" sizes=\"(max-width: 435px) 100vw, 435px\" \/><\/figure><\/div>\n\n\n\n<p>\u5219.classpath\u6587\u4ef6\u5185\u5bb9\u4fee\u6539\u4e3a\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;classpathentry kind=\"output\" path=\"WebContent\/WEB-INF\/newclasses\"\/><\/pre>\n\n\n\n<p>\u5b9e\u9645\u5b58\u653eclass\u6587\u4ef6\u7684\u8def\u5f84\u4e5f\u4f1a\u6539\u53d8<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-305-1024x468.png\" alt=\"\" class=\"wp-image-10231\" width=\"447\" height=\"203\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-305-1024x468.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-305-300x137.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-305-768x351.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-305-830x379.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-305-230x105.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-305-350x160.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-305-480x219.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-305.png 1208w\" sizes=\"(max-width: 447px) 100vw, 447px\" \/><\/figure><\/div>\n\n\n\n<p><strong>3.3 kind=&#8221;con&#8221;<\/strong><\/p>\n\n\n\n<p>con\u5373\u662fcontainer,\u5c31\u662f\u7a0b\u5e8f\u8fd0\u884c\u7684\u5bb9\u5668\uff0c\u6216\u8005\u5c31\u8bf4\u662f\u8fd0\u884c\u73af\u5883\u4e5fOK\uff0c\u5b83\u5b9e\u9645\u4e0a\u662f\u5728Myeclipse\u6700\u521d\u7684\u65f6\u5019\u8981\u914d\u7f6einstalled JREs\u4e2d\u6307\u5b9a\uff08\u4e00\u822c\u60c5\u51b5\u4e0b\u6211\u4eec\u6307\u5b9a\u7684\u662fJDK\uff09\uff0c\u4f46\u662f\u8fd9\u91cc\u5b9e\u9645\u4f7f\u7528\u7684\u662fJDK\u4e0b\u7684JRE\u4e2d\u7684jar\u5305\uff0c\u5c31\u662fJDK_HOME\/jre\/lib\u5c31\u662f\u5bf9\u5e94\u7684\u8fd9\u6761\u8bed\u53e5\u3002\u5177\u4f53\u5185\u5bb9\u5982\u4e0b<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;classpathentry kind=\"con\" path=\"org.eclipse.jdt.launching.JRE_CONTAINER\/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\/jdk1.7\">\n        &lt;attributes>\n            &lt;attribute name=\"owner.project.facets\" value=\"java\"\/>\n        &lt;\/attributes>\n    &lt;\/classpathentry>\n    &lt;classpathentry kind=\"con\" path=\"org.eclipse.jst.server.core.container\/org.eclipse.jst.server.tomcat.runtimeTarget\/\u5b66\u4e60 8080\">\n        &lt;attributes>\n            &lt;attribute name=\"owner.project.facets\" value=\"jst.web\"\/>\n        &lt;\/attributes>\n    &lt;\/classpathentry>\n    &lt;classpathentry kind=\"con\" path=\"org.eclipse.jst.j2ee.internal.web.container\"\/>\n    &lt;classpathentry kind=\"con\" path=\"org.eclipse.jst.j2ee.internal.module.container\"\/><\/pre>\n\n\n\n<p>\u5bf9\u5e94\u64cd\u4f5ctab\u5982\u4e0b<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-306-1024x878.png\" alt=\"\" class=\"wp-image-10232\" width=\"434\" height=\"372\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-306-1024x878.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-306-300x257.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-306-768x658.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-306-830x711.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-306-230x197.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-306-350x300.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-306-480x411.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-306.png 1120w\" sizes=\"(max-width: 434px) 100vw, 434px\" \/><\/figure><\/div>\n\n\n\n<p><strong>3.3.1 JRE\u914d\u7f6e<\/strong><\/p>\n\n\n\n<p>path=\u201dXXX\u201d\u7528\u4e8e\u6307\u5b9ajre\u5bb9\u5668\u7684\u4f7f\u7528\u60c5\u51b5\uff0c\u53ef\u9009\u62e9jre\u7684\u4e0d\u540c\u6765\u6e90\uff0c\u4e0d\u540c\u6765\u6e90path\u7684\u5b9e\u9645\u503c\u4f1a\u6709\u4e9b\u53d8\u5316<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-307-1024x394.png\" alt=\"\" class=\"wp-image-10233\" width=\"518\" height=\"199\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-307-1024x394.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-307-300x116.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-307-768x296.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-307-830x320.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-307-230x89.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-307-350x135.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-307-480x185.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-307.png 1080w\" sizes=\"(max-width: 518px) 100vw, 518px\" \/><\/figure><\/div>\n\n\n\n<p>\u2460\u9009\u62e9\u201dWorkspace default JRE(jdk1.7)\u201d,\u5219\u503c\u4e3a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">path=\"org.eclipse.jdt.launching.JRE_CONTAINER\"<\/pre>\n\n\n\n<p>\u2461\u9009\u62e9\u201cAlternate JRE\u201d\uff0c\u5219\u503c\u4e3a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">path=\"org.eclipse.jdt.launching.JRE_CONTAINER\/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\/jdk1.7\"<\/pre>\n\n\n\n<p>\u5176\u4e2d\u6700\u540e\u4e48\u7684jdk1.7\u662f\u6211\u81ea\u5b9a\u4e49\u7684JRE\u540d\u79f0<\/p>\n\n\n\n<p>\u2462\u9009\u62e9\u201dExecution environment\u201d\uff0c\u5373\u9009\u62e9eclipse\u81ea\u5e26\u7684\u5185\u7f6ejre\uff0c\u503c\u4e3a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">path=\"org.eclipse.jdt.launching.JRE_CONTAINER\/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\/JavaSE-1.7\"<\/pre>\n\n\n\n<p>\u5176\u4e2d\u6700\u540e\u4e48\u7684JavaSE-1.7\u662f\u7cfb\u7edf\u5185\u7f6e\u7684JRE\u540d\u79f0<\/p>\n\n\n\n<p>\u53e6\u5916\u5c5e\u6027\u503cname=\u201downer.project.facets\u201d<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;attribute name=\"owner.project.facets\" value=\"java\"\/><\/pre>\n\n\n\n<p>\u5e94\u8be5\u662f\u6307\u5b9aJRE\u5bb9\u5668\u7684\u5177\u4f53\u4f7f\u7528\u7684\u6a21\u677f\uff0c\u9ed8\u8ba4\u4f7f\u7528\u201djava\u201d\uff0c\u5177\u4f53\u7684\u6ca1\u6709\u63a2\u7a76\u3002<\/p>\n\n\n\n<p><strong>3.3.2 Server Runtime\u914d\u7f6e<\/strong><\/p>\n\n\n\n<p>\u540c\u7406\uff0c\u5176\u4ed6\u5bb9\u5668\u914d\u7f6e\u540c\u4e0a\uff0c\u5982\u5bf9Server Runtime \u5bb9\u5668\u7684\u914d\u7f6e\uff0c\u4e0b\u9762\u914d\u7f6e\u4e86tomcat\u5bb9\u5668\u8fd0\u884c\u73af\u5883<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;classpathentry kind=\"con\" path=\"org.eclipse.jst.server.core.container\/org.eclipse.jst.server.tomcat.runtimeTarget\/\u5b66\u4e60 8080\"\/><\/pre>\n\n\n\n<p><strong>3.3.3 Web App Libraries\u914d\u7f6e<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;classpathentry kind=\"con\" path=\"org.eclipse.jst.j2ee.internal.web.container\"\/><\/pre>\n\n\n\n<p><strong>3.3.4 User Library\u914d\u7f6e<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;classpathentry kind=\"con\" path=\"org.eclipse.jdt.USER_LIBRARY\/tomcat7\"\/><\/pre>\n\n\n\n<p><strong>3.4 kind=&#8221;lib&#8221;<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>kind=&#8221;lib&#8221;\u7528\u4e8e\u6307\u5b9aproject\u4f9d\u8d56\u7684Referenced Libraries\uff0c\u5982\u56fe\u589e\u52a0\u4e86\u4e00\u4e2ajar\u5305<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-308.png\" alt=\"\" class=\"wp-image-10234\" width=\"267\" height=\"226\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-308.png 582w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-308-300x254.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-308-230x194.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-308-350x296.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-308-480x406.png 480w\" sizes=\"(max-width: 267px) 100vw, 267px\" \/><\/figure><\/div>\n\n\n\n<p>\u5219\u76f8\u5e94.classpath\u6587\u4ef6\u5185\u5bb9\u589e\u52a0<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;classpathentry kind=\"lib\" path=\"WebContent\/WEB-INF\/lib\/commons-dbcp-1.2.1.jar\"\/><\/pre>\n\n\n\n<p>\u5176\u4e2dpath\u6307\u5b9a\u4e86\u4f9d\u8d56\u7684jar\u7684\u76f8\u5bf9\u8def\u5f84\u3002<\/p>\n\n\n\n<p><strong>3.5 \u987a\u5e8f<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>.classpath\u6587\u4ef6\u4e2d\u5404\u8282\u70b9\u7684\u987a\u5e8f\u662f\u901a\u8fc7tab-Order and Export \u6765\u63a7\u5236\u7684\uff0c\u4e0d\u540c\u7684\u987a\u5e8f\u53ef\u80fd\u4f1a\u5f15\u8d77\u52a0\u8f7dclass\u6587\u4ef6\u95ee\u9898\uff0c\u4e00\u822c\u662f\u6e90\u7801\u653e\u5728\u6700\u524d\u9762\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-309-1024x655.png\" alt=\"\" class=\"wp-image-10235\" width=\"423\" height=\"270\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-309-1024x655.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-309-300x192.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-309-768x491.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-309-830x531.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-309-230x147.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-309-350x224.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-309-480x307.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-309.png 1116w\" sizes=\"(max-width: 423px) 100vw, 423px\" \/><\/figure><\/div>\n\n\n\n<p><strong>4 \u603b\u7ed3<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>1.classpath\u6587\u4ef6\u65f6eclipse\u65b0\u5efaweb\u5de5\u7a0b\u7684\u65f6\u5019\u751f\u6210\u7684\u4e00\u4e2a\u6587\u4ef6(\u5c31\u5728\u5de5\u7a0b\u76ee\u5f55\u4e0b\uff09\uff0c\u6539\u53d8java Build path\u7684\u65f6\u5019\u6216\u8005\u6539\u53d8\u52a0\u8f7d\u7684jar\u5305\u987a\u5e8f\u7684\u65f6\u5019\uff0c\u8fd9\u4e2a\u6587\u4ef6\u4e5f\u4f1a\u6539\u53d8\u3002<\/p>\n\n\n\n<p>2\u3001.classpath\u6587\u4ef6\u4e0d\u80fd\u968f\u610f\u5220\u9664\u3002\u4e2a\u4eba\u5728\u5c06\u5df2\u6709\u7684\u5de5\u7a0bimport\u8fdb\u5165eclipse\u5de5\u4f5c\u533a\u7684\u65f6\u5019\u5c06.classpath\u6587\u4ef6\u5220\u9664\u4e86\uff0c\u7136\u540e\u518d\u91cd\u65b0\u5bfc\u5165jar\u5305\uff0c\u6574\u4e2a\u5de5\u7a0b\u5c31\u4f1a\u91cd\u65b0\u7f16\u8bd1\uff0c\u4e5f\u5c31\u4f1a\u4ea7\u751f.classpath\u6587\u4ef6\uff0c\u4f46\u662f\u8fd9\u4e2a\u91cd\u65b0\u751f\u6210\u7684.classpath\u6587\u4ef6\u7684\u5185\u5bb9\u53ef\u80fd\u5c31\u4f1a\u51fa\u95ee\u9898\uff0c\u4e5f\u5c31\u6709\u53ef\u80fd\u5bfc\u81f4\u5728tomcat\u90e8\u7f72\u7684\u65f6\u5019\u51fa\u73b0\u4e0d\u53ef\u9884\u6599\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff1a<br>\u539f\u59cb\u7684.classpath\u6587\u4ef6\u90e8\u5206\u4e3b\u8981\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;classpathentry kind=\"src\" path=\"src\"\/>\n&lt;classpathentry kind=\"con\" path=\"org.eclipse.jdt.launching.JRE_CONTAINER\"\/>\n&lt;classpathentry kind=\"output\" path=\"WebRoot\/WEB-INF\/classes\"\/><\/pre>\n\n\n\n<p>\u4e2a\u4eba\u5220\u9664\u540e\uff0ceclipse\u91cd\u65b0build\u7684.classpath\u6587\u4ef6\u90e8\u5206\u4e3b\u8981\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;classpathentry kind=\"src\" path=\"\"\/>\n&lt;classpathentry kind=\"con\" path=\"org.eclipse.jdt.launching.JRE_CONTAINER\/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\/jdk1.6.0_11\"\/>\n&lt;classpathentry kind=\"output\" path=\"\/bin\"\/><\/pre>\n\n\n\n<p>\u8bf4\u660e\u4e0b\uff1a \u8868\u793a\u5de5\u7a0b\u6e90\u6587\u4ef6\u7684\u5730\u5740\uff1b<br>\u8868\u793a\u4ea7\u751f\u7684class\u6587\u4ef6\u5730\u5740\uff1b<\/p>\n\n\n\n<p>\u6bd4\u8f83\u524d\u540e\u4e24\u4e2a.classpath\u6587\u4ef6\u53ef\u4ee5\u53d1\u73b0\uff0c\u91cd\u65b0build\u7684.classpath\u6587\u4ef6\u91cc\u9762\u7684\u6e90\u6587\u4ef6\u5730\u5740\u4e3a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;classpathentry kind=\"src\" path=\"\"\/><\/pre>\n\n\n\n<p>\u8fd9\u6837\uff0c\u5728\u6574\u4e2a\u5de5\u7a0b\u91cc\u9762\u5c31\u4f1a\u51fa\u73b0\u6240\u6709package\u9519\u8bef\uff0c\u6b64\u65f6eclipse\u9ed8\u8ba4\u4e3apackage src.com.test, \u800c\u5de5\u7a0b\u91cc\u9762\u6b63\u786e\u7684\u5305\u540d\u5e94\u8be5\u662f package com.test<\/p>\n\n\n\n<p>\u53e6\u5916\uff0c\u5982\u679c\u65b0\u751f\u6210\u7684.classpath\u6587\u4ef6class\u6587\u4ef6\u5730\u5740\u4e3abin\u76ee\u5f55\u4e0b\u7684\uff0c\u5373 \uff0ctomcat\u90e8\u7f72\u5de5\u7a0b\u7684\u65f6\u5019\uff0c\u9ed8\u8ba4\u53bbWebRoot\/WEN-INF\/classes\u8fd9\u4e2a\u76ee\u5f55\u67e5\u627eclass\u6587\u4ef6\uff0c\u800c\u6b64\u65f6class\u6587\u4ef6\u53bb\u4e0d\u5b58\u5728\u4e8ebin\u76ee\u5f55\u4e0b\u9762\uff0c\u6545\u800ctomcat\u4e0b\u9762\u6ca1\u6709class\u6587\u4ef6\uff0c\u5728\u542f\u52a8\u65f6\u4e5f\u5c31\u4f1a\u4ea7\u751fClassNotFoundException\u9519\u8bef\uff01<\/p>\n\n\n\n<p>\u5982\u679c\u78b0\u5230\u4ee5\u4e0a\u95ee\u9898\u7684\u8bdd\uff0c\u5219\u53ef\u4ee5\u53c2\u8003\u539f\u59cb.classpath\u6587\u4ef6\u4fee\u6539\u8fc7\u6765\u5c31\u53ef\u4ee5\u4e86<\/p>\n\n\n\n<p><strong>\u8865\u5145\uff1aEclipse \u5728\u5bfc\u5165\u5de5\u4f5c\u533a\u65f6\u4e0d\u9700\u8981 .project \u548c .classpath \u6587\u4ef6\/Eclipse \u5982\u4f55\u5c06\u9879\u76ee\u8bc6\u522b\u4e3a\u9879\u76ee<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>Eclipse or any other IDE doesn&#8217;t required .classpath or .project files. These files will be auto created during the project import. IDE can capable to pull the artifacts from maven central repo automatically by using build descriptor file such as pom.xml or build.graddle. The files .classpath and .project will store the paths from local machine, if we carry them to another system, the artificats and other dependencies may not be present in the same directory, so it will start complaining build errors. Thats why while committing to GIT always there is .gitignore, so that local configuration will not carry to others while contributing. <\/p>\n\n\n\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/62425247\/why-sometimes-eclipse-doesnt-need-project-and-classpath-file-during-importing\">https:\/\/stackoverflow.com\/questions\/62425247\/why-sometimes-eclipse-doesnt-need-project-and-classpath-file-during-importing<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u524d\u8a00 \u5728\u4f7f\u7528eclipse\u6216\u8005myeclipse\u8fdb\u884cjava\u9879\u76ee\u5f00\u53d1\u7684\u65f6\u5019\uff0c\u6bcf\u4e2aproject\uff08\u5de5\u7a0b\uff09\u4e0b\u9762 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/10223"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10223"}],"version-history":[{"count":6,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/10223\/revisions"}],"predecessor-version":[{"id":12975,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/10223\/revisions\/12975"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}