Cubeb mostly grown in Java and Sumatra, hence sometimes called Java pepper. The fruits are gathered before they are ripe, and carefully dried. Cubeb used to treat a certain parasitic infection in the intestines called amoebic dysentery. Other uses include treatment of intestinal gas, gonorrhea, and cancer. Some people take it for loosening mucus.