1. An image forming apparatus including a processor that executes a job by using a job history, the image forming apparatus comprising: a buffering unit that buffers an operation code specific to the image forming apparatus and an operating condition corresponding to the operation code; an interpreter unit that encodes an operation code, which has been buffered in the buffering unit, to a text code and decodes original operation code from the text code; a shared-history creating unit that creates a shared job history that describes encoded text code and an operating condition corresponding to the encoded text code in association with a sequence of operation codes and registers hardware environment and software environment of the image forming apparatus in the shared job history; a re-executing unit that reads a shared job history created by other image forming apparatus and re-executes operation codes in read shared job history in order of being decoded a determining unit that acquires hardware environment and software environment from read shared job history and determines whether the read shared job history can be processed in current mounting environment of the image forming apparatus, and starts a job using the read shared job history when it is determined that the read shared job history can be processed; and a correcting unit that corrects the current mounting environment when the determining unit determines that the read shared job history cannot be processed in the current mounting environment.