Open a .bat file

Solved
ellsamig Posted messages 64 Status Membre -  
 simonboss -
Hello,

I can't open a .bat file
when I click on it, the command prompt opens and closes very very quickly
how can I open it and what will I find in this type of file
thank you in advance

8 réponses

chossette9 Posted messages 6855 Registration date   Status Contributeur Last intervention   1 313
 
Hello,

to open a batch file, right-click on it, then click on 'open with', and choose notepad.

Best regards.
--
That guy wasn't too bright, because he was stupid.
0
ellsamig Posted messages 64 Status Membre 1
 
I right-clicked on it, but the context menu does not contain "open with"; it only has the open option.
0
Profile blocked
 
Hi, you need to right-click > Edit :) There you go, I hope I helped you.
0
ellsamig Posted messages 64 Status Membre 1
 
Thank you, I can open the file with Notepad
but I want to execute it since the execution instructions indicate that the .bat file should be executed
also, I cannot understand the code it contains
here is the code:

@echo off REM Should update the java path below
java -Xmx256M -cp JInsect.jar;lib/openjgraph.jar gr.demokritos.iit.jinsect.gui.AutoSummENGGui

thanks again
0
telliak Posted messages 3652 Registration date   Status Membre Last intervention   885
 
or you can open Notepad and open the .bat file with it.
If you want to see the execution result, add a line with the word pause at the end of the file.
0
ellsamig Posted messages 64 Status Membre 1
 
how to add the password (what should I write?)?????
0
irmeche Posted messages 76 Status Membre 17
 
Once you have properly configured your environment variable, the content of the .bat file is used to compile the AutoSummENGGui.java class

your file allocates 256MB of memory to the JVM and then loads the two jars JInsect.jar;lib/openjgraph.jar and compiles your AutoSummENGGui class

@echo off REM Should update the java path below
java -Xmx256M -cp JInsect.jar;lib/openjgraph.jar gr.demokritos.iit.jinsect.gui.AutoSummENGGui

see the link:
https://forums.commentcamarche.net/forum/affich-2143404-variable-d-environnement-java
0
ellsamig Posted messages 64 Status Membre 1
 
Thank you very much :) I solved my problem thanks to you.
0
irmeche Posted messages 76 Status Membre 17
 
You're welcome.
0
simonboss
 
I didn't understand what you said

answer quickly
0
ellsamig Posted messages 64 Status Membre 1
 
how to add the password (what should I write?)?????
-1
Profile blocked
 
The password for what?
0
ellsamig Posted messages 64 Status Membre 1
 
It's for the response to "telliak".
0
irmeche Posted messages 76 Status Membre 17
 
No, it's not a password but PAUSE

it's to prevent the command prompt from closing once the commands in this bat file have been executed, and it allows seeing what it has done.
0
ellsamig Posted messages 64 Status Membre 1
 
I can open the file with Notepad as described by "nathom"
but I don't understand the code it contains
here is the code:

@echo off
REM Should update the java path below
java -Xmx256M -cp JInsect.jar;lib/openjgraph.jar gr.demokritos.iit.jinsect.gui.AutoSummENGGui
-1
Pitu Posted messages 1460 Status Contributeur 125
 
Hello,

This .bat is intended to execute the "program" or rather the Java project contained in the JInsect.jar archive.

To run it and see any messages related to its execution in the console, you need to go to Start / Run
There, type cmd in the text box, then press [enter].
A command window (pseudo DOS) opens, and you need to navigate to the directory where your .bat is stored on your PC.
For example, if the command prompt displays C:\Documents and Settings\ellsamig>
And the .bat is located under C:\Documents and Settings\ellsamig\Project\
=> You should type CD Project [Enter]
Then, once you are in the right directory, simply type the name of your .bat file (without ".bat"), followed by the [enter] key.

--

  (:*Þ   Pitù
No way, not even close
-1
ellsamig Posted messages 64 Status Membre 1
 
I did everything you said
but the following message is displayed "offREM Should update the java path below
offREM Should update the java path below
java -Xmx256M -cp JInsect.jar;lib/openjgraph.jar gr.demokritos.iit.jinsect.gui.AutoSummENGGui
'java' is not recognized as an internal or external command, operable program or batch file
what's the problem???
I have the JDK, JRE and JAVA virtual machine installed on my PC
0
irmeche Posted messages 76 Status Membre 17
 
The problem in this case is that you haven't set the HAVA_HOME variable in the environment variables to point to the JDK (e.g., C:\Program Files\Java\jdk1.6.0_30).

That's why when you type a -java command, it is not recognized by your system.

Test in a command prompt >> java -version
If you don't see something that looks like the text below, then your variable is not set:

java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode)
0
telliak Posted messages 3652 Registration date   Status Membre Last intervention   885
 
you didn’t define in the variables envenomation: this envenomation of the environment delights me :-)))!
0
wanted6 Posted messages 694 Status Membre 48
 
wow
0
irmeche Posted messages 76 Status Membre 17
 
thank you for the remark
0