Could not find or load main class, parent folder?
<p>I have a problem to run my projects in NetBeans.</p>

<p>I think this is some path problems, I fixed it with other project before, but I still confuse with this.</p>

<p>This is the code what I have</p>

<pre><code>public class TestStack
{
    public static void main(String[] args)
    {
        double[] dblElements = {1.1, 2.2, 3.3, 4.4, 5.5};
        int[] intElements = {1,2,3,4,5,6,7,8,9,10};

        // Create a staqck of doubles &amp; a stack of ints

        Stack&lt;Double&gt; dStack = new Stack&lt;Double&gt;(5);
        Stack&lt;Integer&gt; iStack = new Stack&lt;Integer&gt;();

        // push elements onto the stack
        PushDouble(dStack, dblElements);
        PopDouble(dStack);

    }

        private static void PushInteger(Stack&lt;Integer&gt; stack, int[] values)
    {
        System.out.println("\nPushing elements onto stack of integers");
        for (int i : values)
        {
            System.out.printf("%.1f ", i);
            stack.push(i);
        }
    }
    private static void PopInteger(Stack&lt;Integer&gt; stack)
    {
        try
        {
            System.out.println("\nPopping elements from stack of integers");
            double value;
            // Remove all elements from stack &amp; display them
            while(true)
            {
                value = stack.pop();
                System.out.printf("%.1f ",value);
            }
        } // end of try block
        catch(EmptyStackException E)
        {
            System.err.println();
            E.printStackTrace();
        } // end of catch block
    }

    private static void PushDouble(Stack&lt;Double&gt; stack, double[] values)
    {
        System.out.println("\nPushing elements onto stack of doubles");
        for (double d : values)
        {
            System.out.printf("%.1f ", d);
            stack.push(d);
        }
    }
    private static void PopDouble(Stack&lt;Double&gt; stack)
    {
        try
        {
            System.out.println("\nPopping elements from stack of doubles");
            double value;
            // Remove all elements from stack &amp; display them
            while(true)
            {
                value = stack.pop();
                System.out.printf("%.1f ",value);
            }
        } // end of try block
        catch(EmptyStackException E)
        {
            System.err.println();
            E.printStackTrace();
        } // end of catch block
    }
}
</code></pre>

<p>And my error is...</p>

<pre><code>Error: Could not find or load main class teststack.TestStack
</code></pre>

<p>What should I do?</p>
