The Japanese Ministry of Justice opened the University of Tokyo Faculty of Law in 1877 (changed to Imperial University in 1886). To matriculate to the University of Tokyo, students had to finish ten to fifteen years of compulsory education; acceptance was therefore available to only a small elite. The law program produced politically-dependable graduates to fill fast-track administrative positions in government, also known as high civil servants (koto bunkan), and to serve as judges and prosecutors.Private law schools opened around 1880. These lacked the government funding given to the University of Tokyo, so the quality of education there lagged behind. Students only had to pass an examination to matriculate to private law schools, so many of them had not completed middle school. The private law schools produced a large portion of private attorneys because their graduates were often ineligible to apply for government positions.The Imperial University Faculty of Law was given supervisory authority over many private law schools in 1887; by the 1920s, it promulgated a legal curriculum comprising six basic codes: Constitutional Law, Civil Law, Commercial Law, Civil Procedure, Criminal Law, and Criminal Procedure. The same basic structure survived in Japanese legal education to the end of the twentieth century.Prior to the implementation of the "law school system" in 2004, the legal education system was driven more by examinations than by formal schooling. The passage rate for the bar exam was historically around three percent, and nearly all those who sat for the exam took it several times. A number of specialized "cram schools" trained prospective lawyers for the exam, and these schools remain prevalent today. After passing the bar exam, prospective barristers were required to train for 16 months at the Legal Research and Training Institute of the Supreme Court of Japan. The training period has traditionally been devoted to litigation practice and virtually no training is given for other aspects of legal practice, e.g., contract drafting, legal research. During this period, the most "capable trainees" are "selected out" to become career judges; others may become prosecutors or private practitioners.In 2004, the Japanese Diet passed a law allowing for the creation of graduate level law school law schools（法科大学院hōka daigakuin） that offer a J.D., or Hōmu Hakushi (法務博士). The 2006 bar examination was first in Japanese history to require a law school degree as a prerequisite. In the past, although there has been no educational requirement, most of those who passed the examination had earned undergraduate degrees from "elite" Japanese universities such as the University of Tokyo, Kyoto University or Hitotsubashi University. With this new law school system came a new bar exam, with a 40–50% passage rate which is capped by a numerical quota. Applicants are now limited to taking the exam three times in a five year period. Despite the much higher bar passage rate with the new exam, due to the quotas, approximately half of Japanese law school graduates will never be admitted to practice. The new system also reduced the apprenticeship period at the Legal Research and Training Institute to one year.A number of other law-related professions exist in Japan, such as patent agents (benrishi), tax accountants (zeirishi), scriveners, etc., entry to each of which is governed by a separate examination. It should be noted that attorneys ("bengoshi"), being qualified to practice any law, can automatically be qualified as patent agents and tax accountants with no additional examination, but not vice versa.