I am using NetBeans 8.0.2 editor. How do I find the classpath of a specific project? And how do I setup a new classpath for a specific project?
Asked
Active
Viewed 866 times
0
-
The classpath is kind of setup dynamically by netbeans. Depending on the type of project you've created, you can add libraries (both class files and jar files), projects and/or other sources. What are you trying to do? – MadProgrammer Dec 03 '15 at 00:51
-
I have error `classnotfoundexception` and want to fix it... so want to specify the correct path. – MHM Dec 03 '15 at 01:12
-
You need to identify the source the class and either add it through the "library" node or as an additional `src` (if it's source code not in another Netbeans project) via the project properties – MadProgrammer Dec 03 '15 at 01:14
-
sorry not understand, please tell me what to do exactly ? what steps should i make in netbeans ?? – MHM Dec 03 '15 at 01:17
-
It depends, is the class you're trying to resolve a `.java` file, `.class` file or contained within a `.jar` file or a within another netbeans project? – MadProgrammer Dec 03 '15 at 01:19
-
Maybe [this](http://stackoverflow.com/questions/7598623/how-to-setup-classpath-in-netbeans) or [this](http://stackoverflow.com/questions/9139714/how-to-add-java-classpath-in-netbeans) or [this](https://netbeans.org/kb/74/java/project-setup.html) will help – MadProgrammer Dec 03 '15 at 01:20
-
Still not understand, so let me clarify more.... i have some classes in a specific package ... ok ... when i run my project it throws the error ... but when i move these classes to the default package it works good ... can you help me please in this ?? @MadProgrammer – MHM Dec 03 '15 at 01:41
-
That sounds like you did put the appropriate `package` declarations within you class/source files – MadProgrammer Dec 03 '15 at 01:50
-
@MadProgrammer you mean that classes in the package are not related to each other ..... no i don't think that .... all my classes in the same package have association relationship between each other. – MHM Dec 03 '15 at 02:53
-
No, I mean that they should 1- be in a directory which is named exactly like the `package` name and 2- the first lines should have a `package` declaration stating the package that they are in – MadProgrammer Dec 03 '15 at 02:55
-
Ok i understand you, all you talking about is satisfied. and same problem exists – MHM Dec 03 '15 at 03:03