Anyone know how I can get around recompiling a class that is inside a package and uses classes that aren't in a package?

The code

global.java
Code:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Admin
 */
public class Global {
        example.Main main;
        public Global(example.Main m)
        {
                main = m;
        }
}
main.java
Code:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package example;

/**
 *
 * @author Admin
 */
public class Main {

        /**
        * @param args the command line arguments
        */
        public static void main(String[] args) {
                Global g = new Global(new Main());
                //It is trying to use example.Global as the symbol.
        // TODO code application logic here
        }

}