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.