What's new
  • Welcome to PHCorner Forums. Take a moment to Sign up and gain unlimited access and extra privileges that guests are not entitled to, such as: All that and more! Registration is quick, simple and absolutely free. Join our community today!

Java can't run program using cmd

boszken

Honorary Poster
Established
Joined
Mar 16, 2016
Messages
740
Reaction score
82
guys anong version ung magandang java para sa win8.1 64bit nag download kase ako kanina ng 1.8.0.221 kaso laging "is not recognized as an internal or external command,operable pogram or batch file". hindi ko narurun ung cinode kong program. Inayos ko na din ung system PATH kaso waley parin, sana may maka tulong tnx po. ganito ko nirun "javac FILENAME.java"
 

aa1012

Addict
download java jdk then configure the path. Configure the path : Right click from the Computer(This PC) -> Properties -> Advanced -> Environment Variables then add this line (;C:\Program Files\Java\jdk1.8.0_221\bin;C:\Program Files\Java\jre1.8.0_221\bin) you need to change the drive letter to what is configure to your own machin. mine is drive C. Click OK.

To run your program, go to command prompt, change the directory to where your .java file resides then run the command javac file_name.java if succeeded, run java file_name.

Let me know if it works. If not, comment down the screenshot of the error you'll encounter.
 

Kuya Zack

Honorary Poster
download java jdk then configure the path. Configure the path : Right click from the Computer(This PC) -> Properties -> Advanced -> Environment Variables then add this line (;C:\Program Files\Java\jdk1.8.0_221\bin;C:\Program Files\Java\jre1.8.0_221\bin) you need to change the drive letter to what is configure to your own machin. mine is drive C. Click OK.

To run your program, go to command prompt, change the directory to where your .java file resides then run the command javac file_name.java if succeeded, run java file_name.

Let me know if it works. If not, comment down the screenshot of the error you'll encounter.
oo tama c sir..kelangan mo muna ipath sa cmd bago mo mapa run yung file mo..JCreator ba gamit mo??
 

boszken

Honorary Poster
Mali ata ung na download kong java. Kulang ung files na nasa folder. Pero ung na download ko 70mb+ tapos tiningnan ko folder ng java 1.30mb lang
 

homer_simpson

Eternal Poster
Palagay ko issue ito ng java(c) exe not being appended sa PATH environment variable. Di ko alam kung paano i-edit yan sa Windows, google mo nalang.
 

boszken

Honorary Poster
Help napagana ko na gamit ko java jdk13 tapos walang jde. Narun ko na ung javac kaso ung pag sa FILENAME.java na, notepad ung nag oopen hindi dumidiretso sa program.
 
Top