Execute java code in cmd prompt.

+1 Gaurav Dwivedi · February 7, 2016
how to run java files in one package using files in other package in cmd prompt

Post a Reply


Oldest  Newest  Rating
0 Tomb Raider(fake) · February 11, 2016
i think its better to use eclipse or any other IDE but if you wanna go by cmd you can go through the tutorial video
0 Kaleb Haslam · February 14, 2016
Run the command
javac yourjavafile.java

to compile your code. It will generate a .class file; to run it, type

java yourjavafile
0 Nicholas Eason · February 14, 2016
Make sure you have your path's set. To test this, type


in cmd and if it says that it doesn't recognize the command then you need to set your paths.
  • 1

Java / Android Development


Very popular language used to create desktop applications, website applets, and Android apps.

Bucky Roberts Administrator