You may have to book a seat after you arrive in Japan. But you worry about the case of sold out. You can find the seat availability of most JR trains at JR Cyber station. This is Japanese website but you can find how to use this in this post.
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed