Xx3mpireGamerxX
New member
Xx3mpireGamerxX
Xx3mpireGamerxX
I know this is off-topic, but there was nowhere else to put it. I know that the server owners could probably figure it out.
OK, so I want to run a class file I programmed with java through a bat file. I have the first bat file,
WordGame.bat
@echo off
java WordGame
That works.
The second one runs the first one
Interview.bat
WordGame
That works.
This is my folder setup:
-Interview
----Bin (folder)
-------Scripts (folder)
----------WordGame.java
----------WordGame.class
-------WordGame.class
-------WordGame.bat
-------Interview.bat
----StartInterview.bat
I want the "StartInterview" to run "Interview", but I also want it to work when I send the files to my friend. So I can't do "cd C:\...\Interview\bin" then "Interview", I have to find a way so the bat file reads the file in the separate folder, but doesn't require like a specific path. (If my friend uses it, then it will be in a different path) The reason I don't need a path for the others is because they are all in the same folder.
Thanks!
[SOLVED] I used "pushd" to go from my current dir up.
Screenshots:
OK, so I want to run a class file I programmed with java through a bat file. I have the first bat file,
WordGame.bat
@echo off
java WordGame
That works.
The second one runs the first one
Interview.bat
WordGame
That works.
This is my folder setup:
-Interview
----Bin (folder)
-------Scripts (folder)
----------WordGame.java
----------WordGame.class
-------WordGame.class
-------WordGame.bat
-------Interview.bat
----StartInterview.bat
I want the "StartInterview" to run "Interview", but I also want it to work when I send the files to my friend. So I can't do "cd C:\...\Interview\bin" then "Interview", I have to find a way so the bat file reads the file in the separate folder, but doesn't require like a specific path. (If my friend uses it, then it will be in a different path) The reason I don't need a path for the others is because they are all in the same folder.
Thanks!
[SOLVED] I used "pushd" to go from my current dir up.
Screenshots:
Last edited: