1
vote
2answers
14 views

Running bat file with java processbuilder

I am trying to execute .bat file using java process builder but it does not starts the process. Please tell me what i am doing wrong here. This code works fine with linux envoirnment when I replace ...
0
votes
2answers
22 views

java runs the batch file. - cant insert command

I am creating a Process in java which opens my batch file and runs perfectly fine. Process p = Runtime.getRuntime().exec("cmd /c start c:\\blah\\example.bat"); OutputStream out = p.getOutputStream(); ...
0
votes
1answer
32 views

return exit code from ant to a batch file

I have several ant tasks in my .bat file to execute. My .bat file is like below: call ant -buildfile task.xml target1 call ant -buildfile task.xml target2 For each ant task, it will execute a ...
0
votes
1answer
22 views

Java: Running cmd commands (multiple commands with multiple arguments at once)

I run cmd (command line) and running my batch file from Java this way: final String cmd = "cmd /c C: && dir && cd C:\MyApp\Maxi && dir && C:\MayApp\Maxi\deploy.bat"; ...
0
votes
0answers
39 views

passing in a path to a directory (with spaces) to a jar file not working

I have a batch file that does simple string replacement. It takes in 3 arguments: the string I want to replace, the string I am replacing it with, and the path to the file. The file ultimately passes ...
0
votes
1answer
28 views

Invoke jar file via bat and get the output to same console

I have test.jar which just contain a single class and it has a main method. That just prints out some string to std out. I need to run this jar using .bat file. So I used @echo off start java -jar ...
0
votes
1answer
21 views

Reference directories correctly when launching a .jar from a batch file [duplicate]

How to reference directories correctly when launching a .jar from a batch file? I am trying to launch a jar file from a .bat . One of the first things my code does is open and read from a file. I ...
-8
votes
0answers
54 views

Is it possible to write windows batch script through java program? [closed]

I just wanted to know whether it is possible to write windows batch script through java code. Basically I need to configure certain parameters for automatically run the script at specified time. The ...
-1
votes
0answers
21 views

Java uninstallation from a bat file [closed]

I can automatically install java JDK using the <exe> /s /INSTALLDIR=PATH silent mode. But, once installed how can I uninstall it from just knowing its installation path. The installed java ...
1
vote
0answers
35 views

Solved - Batch file running jar cannot access jarfile when passing argument [closed]

I've poked around a bit and haven't found anything quite resembling my issue here. I have a batch file that should accept a file being dropped on it, and pass the file path to a runnable jar file. ...
0
votes
1answer
47 views

How to get my .bat file to run a java command

I want to run a simple batch file that navigates to a folder location and runs a java command. What I have now won't run the command. @echo on set /p DIR="C:\Application\dir_to_run_from" dir %DIR% ...
0
votes
1answer
52 views

Java jumping between blocks of code

Is there a way to jump between Fields of code? At the moment I am making a calculator and I want the code to be able to jump between fields similar to the GOTO command in the .Batch, for example. ...
1
vote
1answer
32 views

Why the .bat file skips lines and jumps to the end?

My .bat file is as follows: @echo on cd %1\%2 copy D:\source\Meep\bat\ant.properties .\ android update project -p .\ ant clean ant release When I start the bat file, it ran correctly up to the ...
0
votes
0answers
31 views

Chroma key and smooth edges using java

I am making an application which would take pictures (with well lit green background) from a tethered camera and then remove background from it. The object of interest would be placed on a disk which ...
-1
votes
1answer
21 views

Run .bat with JUnit4 [duplicate]

I need to test my java application with JUnit4 but my application runs with a .bat file. I would need to run this .bat file in the @Before method but I don't know how can I do it. Can you help me? ...

1 2 3 4 5 29
15 30 50 per page