I do know that you need the "javac -d " command from the console to generate the .class file but I am having trouble writing the path correctly. I have a source code file in javaprojects\src directory, I wish to compile it and have its .class file be created and stored in a separate folder named javaprojects\bin
when using the command:
C:\Users\userNAME\javaprojects\src> javac -d bin HelloWorld.java
When I compile the .java file the .class file is created along with a new duplicate "bin" folder:
I do not know what is the proper way to just create the .class file in the folder I need it to be create it at. I have searched
but I am not finding anything on the matter. Any help would be greatly appreciated, thank you.
I'd like to thank you all for the helpful replies. For some reason or another I am unable to post any replies!
Tried both methods that were advised and they work, thank you again. Now though my issues is that whatever named package
I write in my source code file, e.g: "package mypackage;" , is created within the "bin" folder after I compile the HelloWorld.java file: