A compound of formula I: or a pharmaceutically acceptable salt thereof, wherein X is -CH 2 -; -O-; -S n -; or -NR c -; wherein n is from 0 to 2 and R c is hydrogen or alkyl; D is an optional oxygen; one or two of A, E, G, J, Y and Z are N while the others are CR a; or A, E, G, J, Y and Z are CR a; R 1 is alkyl; alkenyl; alkynyl; cycloalkyl; cycloalkenyl; halo; haloalkyl; or hydroxyalkyl; each R a is independently hydrogen; alkyl; alkenyl; amino; aminosulfonyl; halo; amido; haloalkyl; alkoxy; hydroxy; haloalkoxy; nitro; amino; hydroxyalkyl; alkoxyalkyl; hydroxyalkoxy; alkynylalkoxy; alkylsulfonyl; arylsulfonyl; cyano; aryl; heteroaryl; heterocyclyl; heterocyclylalkoxy; aryloxy; heteroaryloxy; aralkyloxy; heteroaralkyloxy; optionally substituted phenoxy; -C≡C-R b -; -(CH 2) m - n - -R c; -(CH 2) m - n -SO 2 -(NR d) n -R c; wherein m and n each independently is 0 or 1, Z is O or NR d, R b is hydrogen; alkyl; aryl; aralkyl; heteroaryl; heteroaralkyl; hydroxyalkyl; alkoxyalkyl; alkylsulfonylalkyl; aminoalkyl; cyanoalkyl; alkylsilyl, cycloalkyl, cycloalkylalkyl; heterocycl; and heterocyclylalkyl; R c is hydrogen, alkyl, hydroxy, alkoxy, amino, hydroxyalkyl or alkoxyalkyl, and each R d is independently hydrogen or alkyl; R 6 is hydrogen; alkyl; halo; haloalkyl; amino; or alkoxy; R 7 and R 8 each independently is hydrogen; alkyl; cycloalkyl; cycloalkylalkyl; haloalkyl; haloalkoxy; hydroxyalky; alkoxyalkyl; alkylsulfonyl; alkylsulfonylalkyl; aminocarbonyloxy-alkyl; hydroxycarbonylalkyl; hydroxyalkyloxycarbonylalkyl; aryl; aralkyl; arylsulfonyl; heteroaryl; heteroarylalkyl; heteroarylsulfonyl; heterocyclyl;heterocyclylalkyl; or -(C=O)-R e; wherein R e is alkyl, alkoxy, cycloalkyl, cycloalkoxy, cycloalkylalkyl, cycloalkylalkoxy, aryl, aryloxy, heteroaryl, heteroaryloxy, aralykyl, aralkoxy, heteroaralkyl, heteroaralkoxy, - p -C(=O)-R f, -(CH=CH)-C(=O)-R f, or -CH(NH 2)-R g, wherein R f is hydrogen, hydroxy, alkyl, alkoxy, cycloalkyl, cycloalkoxy, cycloalkylalkyl, cycloalkylalkoxy, aryl, aryloxy, heteroaryl, heteroaryloxy, aralykyl, aralkoxy, heteroaralkyl, heteroaralkoxy, or amino; p is 2 or 3; R g is hydrogen, alkyl, hydroxyalkyl, aminoalkyl, optionally substituted phenyl, benzyl, guanidinylalkyl, carboxyalkyl, amidoalkyl, thioalkyl or imidazolalkyl. X is -CH 2 -; -O-; -S n -; or -NR c -; wherein n is from 0 to 2 and R c is hydrogen or alkyl; D is an optional oxygen; one or two of A, E, G, J, Y and Z are N while the others are CR a; or A, E, G, J, Y and Z are CR a; R 1 is alkyl; alkenyl; alkynyl; cycloalkyl; cycloalkenyl; halo; haloalkyl; or hydroxyalkyl; each R a is independently hydrogen; alkyl; alkenyl; amino; aminosulfonyl; halo; amido; haloalkyl; alkoxy; hydroxy; haloalkoxy; nitro; amino; hydroxyalkyl; alkoxyalkyl; hydroxyalkoxy; alkynylalkoxy; alkylsulfonyl; arylsulfonyl; cyano; aryl; heteroaryl; heterocyclyl; heterocyclylalkoxy; aryloxy; heteroaryloxy; aralkyloxy; heteroaralkyloxy; optionally substituted phenoxy; -C≡C-R b -; -(CH 2) m - n - -R c; -(CH 2) m - n -SO 2 -(NR d) n -R c; wherein m and n each independently is 0 or 1, Z is O or NR d, R b is hydrogen; alkyl; aryl; aralkyl; heteroaryl; heteroaralkyl; hydroxyalkyl; alkoxyalkyl; alkylsulfonylalkyl; aminoalkyl; cyanoalkyl; alkylsilyl, cycloalkyl, cycloalkylalkyl; heterocycl; and heterocyclylalkyl; R c is hydrogen, alkyl, hydroxy, alkoxy, amino, hydroxyalkyl or alkoxyalkyl, and each R d is independently hydrogen or alkyl; R 6 is hydrogen; alkyl; halo; haloalkyl; amino; or alkoxy; R 7 and R 8 each independently is hydrogen; alkyl; cycloalkyl; cycloalkylalkyl; haloalkyl; haloalkoxy; hydroxyalky; alkoxyalkyl; alkylsulfonyl; alkylsulfonylalkyl; aminocarbonyloxy-alkyl; hydroxycarbonylalkyl; hydroxyalkyloxycarbonylalkyl; aryl; aralkyl; arylsulfonyl; heteroaryl; heteroarylalkyl; heteroarylsulfonyl; heterocyclyl;heterocyclylalkyl; or -(C=O)-R e; wherein R e is alkyl, alkoxy, cycloalkyl, cycloalkoxy, cycloalkylalkyl, cycloalkylalkoxy, aryl, aryloxy, heteroaryl, heteroaryloxy, aralykyl, aralkoxy, heteroaralkyl, heteroaralkoxy, - p -C(=O)-R f, -(CH=CH)-C(=O)-R f, or -CH(NH 2)-R g, wherein R f is hydrogen, hydroxy, alkyl, alkoxy, cycloalkyl, cycloalkoxy, cycloalkylalkyl, cycloalkylalkoxy, aryl, aryloxy, heteroaryl, heteroaryloxy, aralykyl, aralkoxy, heteroaralkyl, heteroaralkoxy, or amino; p is 2 or 3; R g is hydrogen, alkyl, hydroxyalkyl, aminoalkyl, optionally substituted phenyl, benzyl, guanidinylalkyl, carboxyalkyl, amidoalkyl, thioalkyl or imidazolalkyl.