If you just want that, you could just run scalac. For a single file, that’s quite ok.
Mind you, I don’t recommend that when you go beyond a single file, or maybe two. People use build tools to make life simpler for them. Just using javac breaks quickly is more difficult than the simplicity is worth. If that’s your preference however, nothing is stopping you from doing that.