A compound of formula I: or a pharmaceutically acceptable salt thereof, wherein Ring D is isoxazolyl or oxadiazolyl; Ring A is a 5-6 membered monocyclic aryl or heteroaryl ring, wherein said heteroaryl ring has 1 heteroatom selected from the group consisting of oxygen, nitrogen, and sulfur; J is halo or C 1-6 alkyl, wherein 0-1 methylene units of said C 1-6 alkyl is replaced with -O-. J 1 is halo or - q -Y; X is C 1-10 alkyl wherein 0-2 methylene units of said C 1-6 alkyl are replaced with NR, O, or S; X is optionally substituted with 1-2 occurrences of C 1-3 alkyl or halo; Y is hydrogen, C 1-4 alkyl, or a 3-6 membered saturated or partially unsaturated cycloaliphatic or heterocyclyl, wherein said heterocyclyl has 1-2 heteroatoms selected from the group consisting of oxygen, nitrogen, and sulfur; wherein the heterocyclyl is optionally substituted with 1 occurrence of halo or C 1-3 alkyl; or J and J 1 join together to form a 5-7 heterocyclyl having 1-2 heteroatoms selected from the group consisting of oxygen, nitrogen, and sulfur; wherein the heterocyclyl is optionally substituted with 1 occurrence of halo or C 1-3 alkyl; wherein 0-1 methylene units of said C 1-3 alkyl is replaced with -O-, -NR-, -S-, or -CO-. p and q are each independently 0 or 1; J 2 is H or C 1-6 alkyl; J 3 is H or C 1-6 alkyl; or J 2 and J 3 join together to form a 3-7 membered monocyclic ring having 0-2 heteroatoms selected from the group consisting of oxygen, nitrogen, and sulfur; or a 8-10 membered bicylic or bridged ring having 0-4 heteroatoms selected from the group consisting of oxygen, nitrogen, and sulfur; wherein said monocyclic, bicyclic, or bridged ring is optionally substituted with 1-2 occurrences of halo or C 1-3 alkyl; J 4 is CN, or L-Z; J 5 is H or fluoro; L is C, S 2, or C NR; Z is t -Q or C 1-6 alkyl wherein 0-2 methylene units of said C 1-6 alkyl are replaced with O or NR; U is C 1-2 alkyl; t is 0 or 1; Q is C 3-6 cycloalkyl or 4-6 membered saturated or partially saturated heterocyclyl having 1-2 heteroatoms selected from the group consisting of oxygen, nitrogen, and sulfur; and R is H or C 1-4 alkyl. Ring D is isoxazolyl or oxadiazolyl; Ring A is a 5-6 membered monocyclic aryl or heteroaryl ring, wherein said heteroaryl ring has 1 heteroatom selected from the group consisting of oxygen, nitrogen, and sulfur; J is halo or C 1-6 alkyl, wherein 0-1 methylene units of said C 1-6 alkyl is replaced with -O-. J 1 is halo or - q -Y; X is C 1-10 alkyl wherein 0-2 methylene units of said C 1-6 alkyl are replaced with NR, O, or S; X is optionally substituted with 1-2 occurrences of C 1-3 alkyl or halo; Y is hydrogen, C 1-4 alkyl, or a 3-6 membered saturated or partially unsaturated cycloaliphatic or heterocyclyl, wherein said heterocyclyl has 1-2 heteroatoms selected from the group consisting of oxygen, nitrogen, and sulfur; wherein the heterocyclyl is optionally substituted with 1 occurrence of halo or C 1-3 alkyl; or J and J 1 join together to form a 5-7 heterocyclyl having 1-2 heteroatoms selected from the group consisting of oxygen, nitrogen, and sulfur; wherein the heterocyclyl is optionally substituted with 1 occurrence of halo or C 1-3 alkyl; wherein 0-1 methylene units of said C 1-3 alkyl is replaced with -O-, -NR-, -S-, or -CO-. p and q are each independently 0 or 1; J 2 is H or C 1-6 alkyl; J 3 is H or C 1-6 alkyl; or J 2 and J 3 join together to form a 3-7 membered monocyclic ring having 0-2 heteroatoms selected from the group consisting of oxygen, nitrogen, and sulfur; or a 8-10 membered bicylic or bridged ring having 0-4 heteroatoms selected from the group consisting of oxygen, nitrogen, and sulfur; wherein said monocyclic, bicyclic, or bridged ring is optionally substituted with 1-2 occurrences of halo or C 1-3 alkyl; J 4 is CN, or L-Z; J 5 is H or fluoro; L is C, S 2, or C NR; Z is t -Q or C 1-6 alkyl wherein 0-2 methylene units of said C 1-6 alkyl are replaced with O or NR; U is C 1-2 alkyl; t is 0 or 1; Q is C 3-6 cycloalkyl or 4-6 membered saturated or partially saturated heterocyclyl having 1-2 heteroatoms selected from the group consisting of oxygen, nitrogen, and sulfur; and R is H or C 1-4 alkyl.