You could marry here and then apply for her to switch from student to a spouse settlement visa after the wedding on form FLR(M).
Or you could marry in Japan and apply for a spouse settlement visa from there but the visa fee would be higher.
This is assuming that as the sponsor you are earning a minimum of £18,600 per annum. If you apply for the spouse visa from within the UK you can include your girlfriend's income. Savings over £16,000 could be used to make up any shortfall in earnings as long as they have been held in an accessible account for at least 6 months.
The visa fee will be £649 if she submits a postal FLR(M) application from within the UK, or £1049 if applied for in person. In addition she will have to pay £500 NHS Surcharge online before submitting the application.
https://www.gov.uk/remain-in-uk-family/overview
You will only be able to give notification of your marriage at a Home Office designated Registry Office. The Registrar is required by law to notify the Home Office of the intention to marry and the notification period can be extended from 28 days to 70 to enable the Home Office to interview you both if they choose to do so before the marriage takes place.