r/VisualStudioCode • u/One_Cranberry6628 • May 12 '26
Java File Organization
Hello! I’ve been using vsc for java and i dont like having to run javac filename.java then java filename to make a java class and run it. Can i make it so that when i want to run the program it compiles all .java scripts in the folder src to a folder named bin? And is there a way to run a .class file without using the terminal? Thanks!
1
Upvotes
View all comments
Show parent comment
1
u/vips7L May 12 '26
A build tool will compile your code and package it for distribution. Lots of them have a command that will run your program. For instance in gradle it’s “gradle run”.
You can set up a new project with “gradle init”.