精华内容
下载资源
问答
  • 3、随后使用鼠标右键单击导入的项目名称,在出现的菜单中点击build path中的Configure Bulid Path选项栏 4、在打开的界面中根据自己的需求来选择以下的选项 5、若是配置JDK,点击Add Library 按钮之后在下图中的...

    eclipse是一款用于编译程序的软件,它也是专为java打造的编译器。这款软件在导入项目的之后总是会出现错误提示,这是由于导出项目的软件和自己电脑中的软件是不一样的,因此想要正常的使用这款软件需要大家重新构建路径。这个操作对于熟悉了eclipse的用户来说是非常简单的,小编的教程只要是为java新手准备的。若是你还不知道如何导入项目之后构建路径,可以使用下面的方法来建立!

    26253c0a71d9d65e5c69fb55003c16d9.png

    方法步骤:

    0d2b16e07d8569bd0ace84f9656b6dc6.png大小:223 MB版本:4.8M2 官方最新版环境:WinXP, Win7, Win8, Win10, WinAll

    1、打开电脑中的eclipse软件,接着依次点击左上角的以下按钮:file→import→next

    02ec34172bd0f369117a04eaf6b54cd0.png

    2、进入到了导入界面之后单击其中的browser按钮找到自己需要导入的项目,然后点击finish按钮即可!

    2e448fa8247ff26b184a2b384b52e378.png

    3、随后使用鼠标右键单击导入的项目名称,在出现的菜单中点击build path中的Configure Bulid Path选项栏

    26253c0a71d9d65e5c69fb55003c16d9.png

    4、在打开的界面中根据自己的需求来选择以下的选项

    739339da3a43903235358c6f1867cc23.png

    5、若是配置JDK,点击Add Library 按钮之后在下图中的点击Jre System Library,最后单击下方的next 按钮即可!

    f9be8e46fc407ea732fe6c98f7313c59.png

    6、这样我们就可以进入选择界面了,根据需求来将Workspace default JRES勾选黑色那个,然后点击其中的finish按钮!

    5fceb78eddbad4cc9938e1485e09eafd.png

    7、最后点击OK按钮我们的路径就构建成功了!

    8、还有一种方法,大家可以配置一下tomcat,在点击了Add Library 按钮之后在下图中找到server Runtime,然后点击next

    d7379389d6f2263e04edb62d951590d5.png

    9、点击之后找到自己的tomcat版本即可!

    a296323970a53f56d533a5b3d09986bb.png

    10、设置成功之后点击OK按钮完成路径的构建!

    52c51386fb3acb2e4a280d66796c2a42.png

    在这个教程中小编一共提到了两种构建路径的方法,你可以根据自己的喜好来选择使用哪一种方法进行构建。希望此教程可以帮助你顺利的导入项目。

    展开全文
  • 背景:在项目开发过程中,很多应用都进行了模块划分,有的时候是jar包依赖,有的时候通过build path进行配置,搞清楚这部分有助于理解项目之间的关系。1 tms项目开发1.1 问题描述项目结构如图:这个项目是用dubbo...

    背景:在项目开发过程中,很多应用都进行了模块划分,有的时候是jar包依赖,有的时候通过build path进行配置,搞清楚这部分有助于理解项目之间的关系。

    1 tms项目开发

    1.1 问题描述

    项目结构如图:

    834a50714672aa4994d0361a797cdbfe.png

    这个项目是用dubbo方式进行通信:

    tms_interface定义接口

    tms_service是服务提供者

    tms_web是服务消费者

    这里tms_service中没有对tms_interface的jar包引用,为了使得service中的类不报错,刚开始我采用如下方式进行关联

    2856df1c11b5c8cd15a30289462ef96a.png

    这个时候eclipse是不会报错的,但是在运行程序的时候就会出现如下错误:

    Caused by: java.lang.NoClassDefFoundError: szfs/tms/interfaces/service/ITrade

    Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [szfs.tms.service.framework.facade.TradeImpl] for bean with name 'trade' defined in class path resource [service.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: szfs/tms/interfaces/service/ITrade

    1.2 发现问题

    以SVN原有文件做说明

    检查tms_service的.project文件发现如下情况

    f6ba8754ba54b300db276841d3d1721b.png

    而我的这些文件目录都是在G:\STSPro\partition-work\下面,所以肯定是这里导致程序在运行时候找不到java文件的

    再观察项目的.classpath 文件,发现如下情况

    e4d157e3d158b1d87b7ad0bb5c510efd.png

    这些文件关联是什么?

    1.3 解决问题

    原来这是程序采用linked folder的方式进行关联,单纯的去修改配置文件治标不治本,这一切都可以在eclipse中配置完成。

    解决思路:先建立关联文件夹,然后在eclipse中添加相关联的文件夹。

    添加关联文件夹:

    ps:我这里添加了tms_interface_src 和tms_public_lib_src两个关联文件夹。和SVN中tms_interface tms_public 命名不同。

    在父文件夹 右键——new folder ——Advance 关联需要关联的文件夹

    165e05716b02c892cf2db531c204d2ca.png

    效果如图:

    2192172a51658578767c6131851a60c1.png

    配置buil path:

    工程 右键 Build Path ——Configure Build Path——Source

    7d28599b612d6c98ed8ffa5a3cb898f2.png

    效果图和前后对比图:

    5240030e940174e55a80a9a635a0c824.png

    8dde52779b079b17dd727c8c400d479a.png

    此时程序运行前和运行后都没有问题。

    1.4 小结

    eclipse中的配置改动 和.project .classpath文件的改动是一致的。

    对于.project文件 当我在tms_service下面建立两个关联文件tms_interface_src 和tms_public_lib_src后,项目的目录结构就体现在.project文件上:

    3ff0e4d836bd8f3941b01b775e12b7d7.png

    对于.project文件,当修改了build path的中的Source foleder配置,该配置就体现在.classpath文件上:

    ba7b7846ffa663e933c2cec9d481eab3.png

    f759a02b2b662ecb8dc44720bbbaa251.png

    这里还发现:

    b8bb1a1cfbf6f47cbd367862e552df26.png

    总结就是:

    工程目录的所有修改内容都和.project文件内容对应

    build path 中内容的修改都和.classpath文件对应

    https://www.cnblogs.com/lixuwu/category/853850.html

    展开全文
  • 简易版:Source标签页,指定本工程的源码目录和输出目录。Projects标签页,指定本工程所依赖的其他工程。Libraries标签页,指定本...官方版:Java Build PathThe options in this page indicate the build path s...

    0818b9ca8b590ca3270a3433284dd417.png

    简易版:

    Source标签页,指定本工程的源码目录和输出目录。

    Projects标签页,指定本工程所依赖的其他工程。

    Libraries标签页,指定本工程所需的jar包和class目录等。

    Order And Export标签页,指定本工程的编译引用顺序和导出内容等。

    官方版:

    Java Build Path

    The options in this page indicate the build path settings for a Java project. You can reach this page through the project properties (Project > Properties > Java Build Path) from the context menu on a created project or the File menu of the workbench.

    The build class path is a list of paths visible to the compiler when building the project.

    Source tab

    Source folders are top-level folders in the project hierarchy. They are the root of packages containing .java files. The compiler will translate the contained files to .class files that will be written to the output folder.

    Source folders allow to structure the project, for example to separate test from the application in two source folders. Within a source folder, a more detailed structuring can be achieved by using packages.

    Each source folder can define an exclusion filter to specify which resources inside the folder should not be visible to the compiler.

    Resources existing in source folders are copied to the output folder unless the setting in the Java > Compiler > Building preference page specifies that the resource is filtered. The output folder is defined per project except if a source folder specifies its own output folder.

    Source folder options:

    Option

    Description

    Add Folder

    Creates a new folder to contain source

    Link Source

    Creates a new folder that links to an location outside of the workspace

    Edit

    Allows to modify the currently selected source folder or source folder attribute.

    Remove

    Removes the selected folders from the class path. This does not delete the folders nor their contents.

    Allow output folder per source folder

    Shows/Hides the 'output folder' attribute of the source folders

    Source folder attributes:

    Attribute

    Description

    Exclusion filter

    Selects which resources are not visible to the compiler. For details seeInclusion and exclusion patterns.

    Output folder

    Only available when Allow output folder per source folder is checked. Defines a source folder specific output location. If not set the project's default output folder is used.

    Native library location

    Defines the folder that contains the native libraries (for example 'dll' or 'o' files) required at runtime by the sources in the source folder.

    At the bottom of this page, the Default output folder field allows you to enter a path to a folder path where the compilation output for this project will reside. The default output is used for source folders that do not specify an own output folder. Use Browse to select an existing location from the current project.

    Projects tab

    In the Required projects on the build path list, you can add project dependencies by selecting other workbench projects to add to the build path for this new project.

    Adding a required project indirectly adds all its classpath entries marked as 'exported'. Setting a classpath entry as exported is done in the Order and Export tab.

    The projects selected here are automatically added to the referenced projects list. The referenced project list is used to determine the build order. A project is always build after all its referenced projects are built.

    Action

    Description

    Add

    Add another project in the workspace to the build path of this project.

    Edit

    Edit the classpath attribute of a required project.

    Remove

    Removes the selected required projects from the list.

    Project entry attributes:

    Attribute

    Description

    Native library location

    Specifies where native library required for the project to operate can be found.

    Access rules

    Specifies access rules for project contained in the library. This allows to hide content of a project.

    Libraries tab

    On this page, you can add libraries to the build path.

    By default, the library list contains an entry representing the Java runtime library. This entry points to the JRE selected as the default JRE. The default JRE is configured in the Java > Debug > Installed JREs preferences page.

    Libraries tab options:

    Option

    Description

    Add JARs

    Allows you to navigate the workbench hierarchy and select JAR files to add to the build path.

    Add External JARs

    Allows you to navigate the file system (outside the workbench) and select JAR files to add to the build path.

    Add Variable

    Allows you to add classpath variables to the build path. Classpath variables are an indirection to JARs with the benefit of avoiding local file system paths in a classpath. This is needed when projects are shared in a team.

    Variables can be created and edited in the Java > Build Path > Classpath Variables preference page.

    Add Library

    Allows to add a predefined libraries like the JRE System Library. Such libraries can stand for an arbitrary number of entries (visible as children node of the library node)

    Add Class Folder

    Allows to navigate the workbench hierarchy and select a class folder for the build path. The selection dialog also allows you to create a new folder.

    Add External Class Folder

    Allows to navigate the file system (outside the workbench) and select a class folder for the build path. The selection dialog also allows you to create a new folder.

    Edit

    Allows you to modify the currently selected library entry or entry attribute

    Remove

    Removes the selected element from the build path. This does not delete the resource.

    Migrate JAR File

    Migrate a JAR on the build path to a newer version. If the newer version contains refactoring scripts the refactoring stored in the script will be executed.

    Libraries have the following attributes (presented as library entry children nodes):

    Library entry attributes:

    Attribute

    Description

    Source attachment

    Specifies where the library's source can be found.

    Javadoc location

    Specifies where the library's Javadoc documentation can be found. If specified you can use Shift+F2 on an element of this library to open its documentation.

    External annotations

    Specifies where external annotations for the library can be found. If specified these annotations will be considered by JDT for its static null analysis.

    Native library location

    Specifies where native library required for the library to operate can be found.

    Access rules

    Specifies access rules for resources contained in the library. This allows to hide content of a library.

    Order and Export tab

    In the Build class path order list, you can click the Up and Down buttons to move the selected path entry up or down in the build path order for this new project.

    Checked list entries are marked as exported. Exported entries are visible to projects that require the project. Use the Select All and Deselect All to change the checked state of all entries. Source folders are always exported, and can not be deselected.

    参考:

    1.http://blog.csdn.net/gaojinshan/article/details/21094145

    2.http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fref-properties-build-path.htm

    展开全文
  • (以上为eclipse的默认设置) * “java build path”中的“source”页签:这个就是用来设置"source folder"与"output folder"的,一般就采用以上eclipse的默认设置; * 右键工程名->"properties"->"java build path...

    转载自:http://blog.163.com/magicc_love/blog/static/185853662201111161580631/

    1.设置"source folder"与"output folder".

    * source folder:存放.java源文件的根目录;

    * output folder:.class编译输出的根目录;

    * 纯“java project”中,一般把"src"设置为source folder,把bin设置为output folder;

    * 在“web project”中,一般把"src"设置为source folder,把WEB-INF/classes设置为output

    folder;(以上为eclipse的默认设置)

    * “java build path”中的“source”页签:这个就是用来设置"source folder"与"output

    folder"的,一般就采用以上eclipse的默认设置;

    * 右键工程名->"properties"->"java build path"->"source"->"output folder",点“browser”

    选定一个文件夹做为根目录,ok!

    * 一般新建一个“java project”时,如果点“next”(而不是直接点“finish”),设置一个

    “source folder”(如"src"。),那么一般会自动默认的“output folder”是“工程名/bin”,采用

    默认的bin做为output folder即可。

    *如果在“java build path”的“source”页签中没有把"src"设置为source folder,则"src"文件

    夹在.java文件的package中要以包名的方式加入;例如:

    "src"未设置为source folder:package src.com.decisiontree;

    "src"设置为了source folder:package com.decisiontree;

    感觉source folder就是定位.java源文件根目录的意思吧,也就是说它与package的含义是有这么一点区

    别的。

    * 如果不设置output folder,默认输出路径为:与.java文件同一个文件夹下。

    * 可以使用“add folder”选项设置“工程名”下的任意文件夹做为“source folder”;

    * 或者可以使用“Link Source”选项导入任意文件夹做为“source folder”;

    2.Projects 是指是否关联到其他项目进行相关搜索。这个类似于path路径的搜索,有个范围的作用。

    3.Libraries是用来管理类库的,包括外部类库的添加与删除。

    4.Order and Export有两个属性。调用优先级的问题,越在上边调用优先级越高。例如,在同包同类名的情况下,将优先从上到下执行搜索调用;打勾与不打勾的区别在于导出jar包时是否将这个库的内容也打包到jar中,勾为包含,不勾为不含。

    展开全文
  • EclipseJavaBuildPath详解1.设置"source folder"与"output folder".* source folder:存放.java源文件的根目录;* output folder:.class编译输出的根目录;* 纯“java project”中,一般把"src"设置为source folder,...
  • 项目右键》Build path》Config build path,如图:1、Source设置"source folder"与"output folder".source folder:存放.java源文件的根目录output folder:.class编译输出的根目录一般新建一个“java project”时,...
  • 什么是Build Path?Build Path是指定Java工程所包含的资源属性集合。在一个成熟的Java工程中,不仅仅有自己编写的源代码,还需要引用系统运行库(JRE)、第三方的功能扩展库、工作空间中的其他工程,甚至外部的类文件,...
  • IntelliJ IDEA中build path

    2021-08-18 11:53:33
    IntelliJ IDEA中build path 从未如此简单 在lib文件中放入所需构建的jar Modules》》Dependencies》》+(加号)》》1JArs 找到lib中所需的jar,点击apply(运行)和ok(完成)
  • (以上为eclipse的默认设置) “java build path”中的“source”页签:这个就是用来设置"source folder"与"output folder"的,一般就采用以上eclipse的默认设置; 右键工程名->"properties"->"java build path"->...
  • 用eclipse重新导入项目时,出现了相同文件夹下却...一个解决方法是,检查build path中的projects,看看有没有不依赖的文件被加入了,因为这样会产生循环依赖问题导致想导入的类找不到,去除不依赖的文件就好了。 ...
  • IntelliJ IDEA的build path

    2021-03-31 16:36:59
    IntelliJ IDEA的build path 1.打开IDEA–>File–>Project Structure–>Modules 2.选中要添加的项目名称 3.可选择已下载好的jar包添加即可
  • (以上为eclipse的默认设置) * “java build path”中的“source”页签:这个就是用来设置"source folder"与"outputfolder"的,一般就采用以上eclipse的默认设置; * 右键工程名->"properties"->"java build path"-...
  • IntelliJ IDEA如何build path

    千次阅读 2021-03-05 17:03:41
    1、eclipse 中build path是什么? 如果你bai只是将jar包复制到Java工程里面去,那么是无法使用到jar包里面zhi的类,因为编程ide无法找到jar包。所以build path其实就是添加jar包的路径, 让ide可以找到这个路径对应...
  • buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt....
  • Eclipse中Android项目Build path详解Build path的构成: 1、SourceSource分为两部分:source folder与outputfolder Source folders onbuild path是编译之前项目源文件目录。一般的Android项目是ProjectName/gen和...
  • 报错信息: Description Resource Path Location Type The superclass “javax.servlet....右键项目Build Path-> Configure Build Path 如果在这个页面中没有tomcat,需要先配置RuntiomEnvironments。选择Win
  • 小编今天需要在IDEA中导入外部jar包 ,由于在eclipse中可以在外部jar包上直接右键 build path 然后点击add to Build Path 就成功导入了 可惜IDEA并不是如此!!有点小苦恼!!! 接下来,小编就带大家操作 IDEA中...
  • 在项目录下找到.project文件,添加 <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures>
  • 3、如果已经是maven项目了还是没有maven依赖导入,右击项目 properties — build path看 libraries 下是否有 maven dependencies ,如果没有:你需要将 这行代码放到你项目里的 .classpath 文件里 再重新加载项目就...
  • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.eurekaClient' defined in class path resource [org/springframework/cloud/netflix/eureka/...
  • jdk什么的试过了,都正确发现没什么用。后来发 现将budild那个选项里面的Build Automatically的钩去 掉就可以build path里。记录一下智商税。
  • (以上为eclipse的默认设置) * “java build path”中的“source”页签:这个就是用来设置"source folder"与"output folder"的,一般就采用以上eclipse的默认设置; * 右键工程名->"properties"->"java build path...
  • classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <attributes> <attribute name="maven.pomderived" value="true"/> </attributes> </...
  • Build path -> Configure Build Path -> Order and Export先描述一下问题问题一:在eclipse maven项目中,可以看到src/main/java这个源包没有显示在第一行,左边目录结构的显示顺序跟Order and Export的显示...
  • 在vscode编译项目,碰到“Build path specifies execution environment There are no JREs installed 。。。。。。”等字样,表示项目默认的jdk版本和vscode设置的版本不一致,解决方法如下: 在pom.xml加入maven ...
  • 将一个项目导入最烦的是遇到各种报错,前段时间搞的一个项目,各个功能模块单独作为一个工程,然后不同工程之间相互调用,这里会报这么一个·错误a cycle was detected in the build path of project,这个错误是...
  • ecilpse导入项目后报错:Open the Java build path property page of project ‘chapter09’ 这是因为要导入的项目的jdk 的版本跟你本地使用的JDK不一致。 解决方案: 1.右击项目,选择bulid path->configure ...
  • 打开Java Build Path:项目右键 ->Build Path ->Configure Build Path 可以看到Java Build Path窗口: Source source中我们可以编辑source folder对应output folder,即我们上面在source folder中说的source folder...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 651,528
精华内容 260,611
关键字:

buildpath