ChemAxon's naming toolkit generates names from chemical structures (structure to name, s2n) and converts IUPAC, trivial, drug, CAS names to chemical structures (name to structure, n2s).
Using the API for generating the name of a molecule:
Molecule m = ...; String name = m.toFormat("name"); String traditionalName = m.toFormat("name:t");See user's documentation of s2n here.
Using the API to convert a name to a structure:
String input = "2,3-dimethylbenzoic acid"; Molecule m = MolImporter.importMol(input, "name");It is possible to register your own plugins to extend name to structure, for instance to lookup compound IDs in a database. This is documented in the NameConverters class.
See user's documentation of n2s here.