I have only been coding for a few days and I have one question that i just can't seem to find any information on. I was wondering what I would have to do to create an executable application out of my java code. I know that I can run my compiled code from the terminal by typing java helloworld
for example when I'm in the right directory, but then I always have to navigate to the file manually and run it. I was hoping there would be a way to create a file that I could just click on and that would automatically run the program in the computer's terminal.
Any explanation would be much appreciated! I'm currently working on MacOS if it makes a difference. Thanks in advance.
edit: I'm using visual studio code to write my code
edit 2: I now understand that what I'm trying to accomplish is essentially to create a .jar file out of my .class file. Does anyone happen to know if there is a built in function in visual studio code to create a .Jar file? Some people are suggesting maven but I'm hesitant to download anything if im not sure it's necessary.