Results 1 to 16 of 16
Thread: .bat flashes problem
- 10-03-2010, 05:46 PM #1
Member
- Join Date
- Oct 2010
- Posts
- 7
- Rep Power
- 0
.bat flashes problem
I am a total newb regarding java, but I have downloaded this .bat file.
which contains this piece of code:
"java -jar FingerPlayServer.jar %1 %2"
But whenever I open it it just flashes a dos window quickly and goes away doing nothing.
Can anyone help me out with this?
I am running a windows 7 ultimate machine (64bit).
Thanks in advance,
Peter
- 10-03-2010, 06:21 PM #2
Member
- Join Date
- Jan 2010
- Posts
- 14
- Rep Power
- 0
Probably the program in the JAR ended very fast en closed the console.
Try to open you're bat in a commandpromt. This way you're prompt will not close instantly and you can view the messages printed by the program.
- 10-03-2010, 06:35 PM #3
Member
- Join Date
- Oct 2010
- Posts
- 7
- Rep Power
- 0
Now it says something like this:
(Ill try to translate it from dutch)
Java is not recognized as an internal or external command, program or batchfile.
So I dont know what to do at all now, the program should work...
-
Are you passing any command line parameters into the batch file? In other words, how specifically are you calling the batch file?
- 10-03-2010, 06:37 PM #5
Member
- Join Date
- Oct 2010
- Posts
- 7
- Rep Power
- 0
I dont know, I didnt make it.
The program should tell me which port I have to connect to on my phone in order to use a program which sends midi messages.
all the code I can find in the bat is:
java -jar FingerPlayServer.jar %1 %2
-
Ah, do you have Java installed on this computer? And if you do, you'll have to make sure that Java's bin directory is on your system's path. For instance on my wife's computer, the Java bin directory is here:
C:\Program Files (x86)\Java\jre1.6.0_07\bin
And my system's path contains this line within it.
- 10-03-2010, 06:39 PM #7
Member
- Join Date
- Oct 2010
- Posts
- 7
- Rep Power
- 0
Yeah I got java installed, I knew I had to have java (I already had it) in order to run the jar file.
And yep it is there,
-
I'm not asking how it's made or what the batch file contains but rather how you call it. Is this on Windows (I thought you said it was), and are you calling the batch file from a Window's short-cut? If so, the short cut needs to have at least two parameters after the batch file name.
-
- 10-03-2010, 06:41 PM #10
Member
- Join Date
- Oct 2010
- Posts
- 7
- Rep Power
- 0
Yep the path is correct,
I got the files in this directory:
C:\fingerplay
Just for the easy of entering this line in prompts.
-
So are you saying that you're no longer getting this error message:
Java is not recognized as an internal or external command, program or batchfile.
?
Because if the path is in fact correct and contains a reference to Java's bin directory, you will have solved this. If not, then please show us where your bin file is, and also show us your system's path string.
- 10-03-2010, 06:58 PM #12
Member
- Join Date
- Oct 2010
- Posts
- 7
- Rep Power
- 0
The path to my java bin is:
C:\Program Files (x86)\Java\jre6\bin
The path to the program is:
C:\fingerplay
-
Last edited by Fubarable; 10-03-2010 at 07:05 PM.
- 10-03-2010, 07:55 PM #14
Member
- Join Date
- Oct 2010
- Posts
- 7
- Rep Power
- 0
Do you mean the environment variables?
The environment variable is:
C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip
And that file is there.
Or do you mean something else, in that case I dont know...
-
No, I mean your system path for your Windows OS. I'm not familiar with Windows 7, but with Vista, you would go into the control panel, click on System and Maintenance, click on System, and then click on Advanced System Settings. Then you'd see a button called Environment Variables, and if you click the button, you'd be able to see and change the system's path String. For example on my computer, the path is:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;C:\Program Files (x86)\CyberLink\Power2Go;C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin;%DERBY_HOME%\bin;C:\Program Files (x86)\Java\jdk1.6.0_13\bin;C:\Program Files (x86)\QuickTime\QTSystem\
and you can see that C:\Program Files (x86)\Java\jdk1.6.0_13\bin; is one of the strings buried in this path. You may need to find the path string by a different method, and your Windows help system should show you how. Either search on path or on environment variables for info on how to do it on your system. The key is once you find the path String, you want to add the java bin directory to it. Note that all strings in the path need to be separated by a semicolon.
Luck!
- 10-03-2010, 09:32 PM #16


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks