Osaka Castle is easily accessible from the JR Osakajokoen Station. Use your Japan Rail Pass to access the station. For example, you can travel from Namba to Osakajokoen Station on the JR West Osaka Loop Line. Exit the station to the west and cross into the Osaka Castle Park.