answersLogoWhite

0

How java runs in command prompt?

Updated: 8/11/2023
User Avatar

Wiki User

13y ago

Best Answer

The Java executable comes with a showversion flag, so typing:

java -showversion

Will display something like:

java version "1.6.0_16"

Java(TM) SE Runtime Environment (build 1.6.0_16-b01)

Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)

Note: This seems to be bugged on my machine. After printing out the above information, it also prints out the rest of the command line switches. If this happens to you, you may have to scroll up to see the important information.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

You can run java with the help of "java" command. To see the option associated with this, run "java /?" command.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How java runs in command prompt?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How can i see all the classes and interfaces present in a predefined package in java in command prompt?

use the jar command like this: jar tvf mypackage.jar


Please someone explain you command line argument in C?

Command Line Arguments---- I am trying to explain each word one by oneCommand ------perform specific taskex. When CMD is typed in run window and then press ok button then open a black screen that is called command prompt.Command Line ------on command prompt where command is supplied that is called command line.using command prompt dos commands are executed and java program is also executed using command prompt.for executing java program command is supplied with given syntaxjava java_class_name argument1 argument2.........Java--- is a commandjava_class_name ---name of java file which you want to executeargument1 argument2 --- are the values passing to java application from out sidethese argument1 argument2 are stored in string array argument of main method


Why can't you open the java development tool?

The Java Development Kit (JDK) is a command-line based application. That means it is run through the command prompt. The usage of this is similar with all platforms, however for each operating system it is different. For Windows, go to Start -> Programs (All programs on XP) -> Accessories -> Command Prompt. It will show a black screen in which you type commands in. For Macs, go to Applications -> Utilities -> Terminal In the prompt, type 'java' or 'javac'. As the compiler is 'javac', you may need to add an enviornmental variable to point to the location of Java (javafolder/bin/javac.exe)


Command use on how to run a java program?

You execute it the same way you would on any other OS. As long as you have the Java Runtime Environment installed and the "java" executable is in your path, from the command line you would simply run: java -cp /path/to/file/here com.some.class.to.run.Here


What is command to compiler java program?

The command is "javac".

Related questions

How do you run a java program form the command prompt?

The command is "java", followed by the class name. For example, if your compiled class is called myclass.class, you give the command: java myclass


How do you compile source code from the command prompt in java?

compile:javac filename.javarun:java filename


How do you compile your java code?

save it into a .java file. then open command prompt and navigate to your java bin directory. then type CD then your java bin directory. then type this . javac ProgName.java


How can i see all the classes and interfaces present in a predefined package in java in command prompt?

use the jar command like this: jar tvf mypackage.jar


Please someone explain you command line argument in C?

Command Line Arguments---- I am trying to explain each word one by oneCommand ------perform specific taskex. When CMD is typed in run window and then press ok button then open a black screen that is called command prompt.Command Line ------on command prompt where command is supplied that is called command line.using command prompt dos commands are executed and java program is also executed using command prompt.for executing java program command is supplied with given syntaxjava java_class_name argument1 argument2.........Java--- is a commandjava_class_name ---name of java file which you want to executeargument1 argument2 --- are the values passing to java application from out sidethese argument1 argument2 are stored in string array argument of main method


What is the default program to open a jar file to execute a program?

You can open jar files with command prompt, Winrar or java.


Can you use Java commands in the Command Prompt e.g. java and javac if you aren't logged in as an admin?

Yes. Just make sure you have the path to the programs in your PATH environment variable.


Why can't you open the java development tool?

The Java Development Kit (JDK) is a command-line based application. That means it is run through the command prompt. The usage of this is similar with all platforms, however for each operating system it is different. For Windows, go to Start -> Programs (All programs on XP) -> Accessories -> Command Prompt. It will show a black screen in which you type commands in. For Macs, go to Applications -> Utilities -> Terminal In the prompt, type 'java' or 'javac'. As the compiler is 'javac', you may need to add an enviornmental variable to point to the location of Java (javafolder/bin/javac.exe)


What is javaw?

javaw.exe is the java runtime environment process. If you run a java application(usually a .jar file .class file) there are 2 main ways of doing this. 1 is by using the command 'java' which will show a command prompt window. The other is using the 'javaw' command which wont show a command promps windows. It will, however, show error windows when a appication is damaged.


How do you exit a prompt command?

Use "prompt $p$g" command.


Command prompt doesn't show if my PC is running in safe mode with command prompt?

Safe mode with command prompt option is totally depends on DOS shell, hence there is no need for separate command prompt..


How do you do next line in command prompt?

when using command prompt, after you give it a command, press the enter button. Command prompt will then carry out the task and will automatically go to the next line.