I am using Netbeans 7.1.2, I am trying to run my Java application, in which the Main class tries to call another Main class from different project,
public class Main {
public static void main(String[] args) {
com.XXXX.XXXX.main.Main.main(new String [] {
When I tried to set the classpath in netbeans, I couldn't find libraries option in project properties.

There is also no library folder in my project. So now how can I set classpath to access the main class of the other project.
Thanks in advance,
The way you are trying to call main method from different class is not correct and I guess that is the reason it is not working. Other thing is that your question is not very clear and from your code it looks as if you are trying to call the same class's main method.
But as far as i understand you have two projects and you are trying to call second project's main method from first projects main method.
First step is to build your second project as
jarfile. Then close this project and forget about it.Second step is to develop your first project and add your second project's jar as library to this project. once this is done it's just simple coding.
Below are the code snippets to achieve the functionality.
Main method of Second project (The one that is going to be library)
Main method of the first project (the one which will call the library's main method)
Below is what my project structure looks like after adding the library project