Hi all, I'm wondering (and I know this can be done, I just don't have the file) if anyone knows how to make a batch file to run my java/class file in cmd. I know that my friend when he was writing one used code that looked roughly like this:
Obviously this doesn't work, but does anyone know code that looks similar to this to execute the file? By the way, before I get any really condescending replies, yes, my file has the extension .bat lol.
mine works with just
maybe you need the Class Path?
java -cp ProgDir ProgName
Edit: Oh, nvm. You can't have the .class
Thanks, I finally got it to work with
java -cp . progName
It was easier just to stick the batch file in the same directory then make it so the classpath was in the same directory of the batch. Then I just made a shortcut and stuck it on the desktop. Thanks anyway!