Compact linacs, consisted of a Radio-FrequencyQuadrupole (RFQ) linac and Interdigital H-mode DriftTube-Linac (IH-DTL) having the same operating frequency of 200 MHz, were designed for an injector of heavy-ion medical accelerators. For beam focusing of IH-DTL, the method of Alternating-Phase-Focusing (APF) was applied. The total length of the RFQ linac and APF IH-DTL is approximately 6 m. With the two linacs, carbon ions produced by an ECR Ion-Source (ECRIS) could be accelerated up to 4.0 MeV/u. The compact linacs were constructed and installed in NIRS. We have succeeded to accelerate carbon ions with the APF linac for the first time. The present status of the compact linacs as well as results of acceleration tests was presented.