[nbusers] Running an application from the windows command prompt.

  • From: "tkellerer" < >
  • To:
  • Subject: [nbusers] Running an application from the windows command prompt.
  • Date: Mon, 30 Apr 2012 08:48:47 +0000

Note: your question is not a NetBeans related question and should be asked in 
a beginners forum for Java. This forum/mailing list is for questions 
regarding the usage of the NetBeans IDE. Not for general Java questions.

Anyway: you have mixed up (or misunderstood) the various command (steps) to 
make a runnable Java program.

The first step you need to do is to compile your Java class into bytecode:


Code:
javac -cp . Helloworldjava.java


This will produce a file named Helloworldjava.class which is run using the 
Java command:

Code:
java -cp . Helloworldjava



I suggest you go through the Java tutorial to understand all the steps that 
are necessary to compile & run a Java program:

http://docs.oracle.com/javase/tutorial/index.html
especially:
http://docs.oracle.com/javase/tutorial/getStarted/cupojava/win32.html

You might also want to read:
http://docs.oracle.com/javase/tutorial/getStarted/problems/index.html






[nbusers] Running an application from the windows command prompt.

tkellerer 04/30/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close