I assume there were potentially hundreds of German advisers, etc. in Japan at the time of the German surrender. Is there evidence that they tried to reach Allied troops to surrender to them? Did some fight directly for Japan? What happened to these Germans after Japan itself surrendered?
The fate of the German ambassador to Japan, Heinrich Georg Stahmer indicates what probably happened to most of the Germans in Japan.
On May 5, 1945, as the German surrender was approaching, Stahmer was handed an official protest by Japanese Foreign Minister Shigenori Togo, accusing the German government of betraying its Japanese ally. Following the surrender of the German government, the Japanese government broke off diplomatic relations with the German Reich on May 15, 1945, and Stahmer was interned and kept under arrest in a hotel near Tokyo until the Japanese surrender in August 1945.
On September 10, 1945, following the Japanese surrender, he was placed under arrest by U.S. authorities in Sugamo Prison in Tokyo, and in September 1947 was returned to Germany, where he was interned until September 1948.
The references on the Wikipedia page will assist with further research.
I found an interesting quote (section 1943 in Kobe mit CW-Virus infiziert) of a contemporary witness (translation below).
The last sentence contains a short hint what happened to Germans in Japan after the war (with a gap of two years).
Wer hätte das gedacht, als ich mit meinen Eltern 1937 auf einer Schiffreise mit dem Turbinenschnelldampfer "Gneisenau" für einen Tag in Kobe anlegte, daß ich sehr bald einen längeren Aufenthalt in Kobe vom 13.07.41 bis 11.02.47 einplanen mußte. Schuld daran war der Ausbruch des Krieges. Meinen Vater hatten die Holländer 1940 in Niederländisch Indien (heute Indonesien ) interniert und der Rest der Familie sollte über Japan, Wladiwostok mit der Transsibirischen Eisenbahn nach Deutschland abgeschoben werden. Soweit kam es aber nicht, denn unsere Reise mit der "Asama Maru" endete wegen des Rußlandfeldzuges (22.06.41) in Kobe.[....]
Ich besuchte während des Krieges die Zaiden Hojin Kobe Doitsu Gakuin (Stiftung Deutsche Schule Kobe der Reichsdeutschen Gemeinschaft Kobe-Oseka mit ca. 170 Schülern). Vielen ist sicher nicht bekannt, daß Kobe während des Krieges von vielen deutschen Marineeinheiten ( einschließlich U-Bote) der Kriegsmarine angelaufen wurde. Alle Einheiten aufzuführen würde hier zu weit führen. [....]
Nach Kriegsende folgte bald durch die Amerikaner Anfang 1947 die Ausweisung fast aller Deutschen aus Japan. [...]
Translation with the help of google translate:
Who would have thought, as my parents and I docked for a day in Kobe during a 1937 cruise on the turbine-driven steamboat "Gneisenau", that I would soon have to reckon for a longer stay in Kobe, from 13.07.41 to 11.02.47. It was due to the outbreak of the war. My father had been interned by the Dutch in 1940 in the Dutch Indies (now Indonesia) and the rest of the family was to be deported to Germany via Japan, then Vladivostok and the Transsiberian railway. But this plan was aborted, as our journey with the "Asama Maru" ended in Kobe because of the Russian campaign [22.06.41] [...]
During the war I visited the Zaiden Hojin Kobe Doitsu Gakuin (Kobe German School Foundation of the German Association Kobe-Oseka, with about 170 pupils). Many are certainly unaware that Kobe was occupied during the war by many German naval units (including submarines) of the Kriegsmarine. To list all units here would lead us too far off-topic. [...]
Soon after the end of the war, in early 1947, the Americans expelled almost all Germans from Japan. [...]
Consider these submarines:
- U-219 reached Japanese territory in December 44, was seized and used by the IJN after the German surrender.
- U-234 was at sea during the German surrender and decided to surrender itself. The Japanese passengers committed suicide. There are plenty of conspiracy theories.
See here for surface blockade runners.