Skip to content

Tag: cmd

How to use the command “Jar x “?

I’ve just started studying Java. I know I can extract a jar file with command jar xf jarname.jar But I’m confused about this [command jar x and useless new lines]jar x and new lines Enter jar x,press the Enter key. Enter TicTacToe.jar(what i want to extract sth from),press the Enter key. Nothing e…

Can I execute multiple programs from JAR in cmd?

My task is to create two simple programs with output, put them both into one jar-archive and execute programs one by one. I can do it with one program using this commands: creating jar – jar cfe <name-of-the-archieve>.jar <main-class-name> *.class *.java, executing program – java -jar …

Why compile command failed in Maven?

I’m new on Maven and I am trying to run through command prompt. Command mvn build successfully clean command. but it failed to build compile and test command. this is my cmd screen Please suggest me what should I do? Answer Add two properties to specify the version of Java you want to target. Currently,…

Problem with run DOS command in Java

Dear all I want to execute a EXE file in Java, but I was not able to do it correctly. Originally, in DOS command prompt, my command is like this: Note: the input file name must be place in the brackets <>. It always gave me good results when run it in DOS window. When I want my java program