[program-java] Re: Command prompt updated

  • From: "Corbett, James" <James.Corbett@xxxxxxxxxxxxx>
  • To: "'program-java@xxxxxxxxxxxxx'" <program-java@xxxxxxxxxxxxx>
  • Date: Fri, 11 Feb 2011 15:54:47 -0500

Roger:

It's quite simple to run / execute your newly compiled java file. Remember that 
once you have successfully compiled error free the .java file is now a .class 
file.

Try this: ...to compile

C:\devmicro\hello\>javac HelloWorld.java C:\devmicro\hello\>

...to run / execute

C:\DevMicro\hello\>java HelloWorld Hello, World


James M. Corbett

Programmer / Analyst |
Canada Revenue Agency | Agence du revenue du Canada
875 Heron Rd.
Ottawa, On.
K1A0L5

James.Corbett@xxxxxxxxxxxxx
Telephone | Téléphone: (613) 941-1338
Facsimile | Télécopieur: (613) 941-2261

Government of Canada | Gouvernement du Canada

E = MC²

-----Original Message-----
From: program-java-bounce@xxxxxxxxxxxxx 
[mailto:program-java-bounce@xxxxxxxxxxxxx] On Behalf Of Roger Woolgrove
Sent: February 11, 2011 15:35
To: program-java@xxxxxxxxxxxxx
Subject: [program-java] Re: Command prompt updated

Hi Jim,

I've got 3 computers here, this netbook with eclipse installed, my tower which 
I reserve only for my studies as I do not want to clutter it up and mess up my 
degree, with BlueJ installed.  They are both running XP with Jaws.  I also have 
a Macc book which I am not fully conversant with as yet and do not know which 
version of eclipse to get for it, the 64 or 32 bit version.

I can only assume that I can also write and compile code with eclipse but I am 
still stuck with the idea of how to make a class run.

This is not a major part of the studies as yet but it has come up a couple of 
times and I am stuck with the problem.

Knowing that java is a flexible application, I expect that any code written in 
BlueJ that compiles OK can also be run on my netbook.

The big question is how do I do it?  Any assistance such as step by step 
guidance would be a great help.

Thanks for all the help so far.

Roger





----- Original Message -----
From: "Corbett, James" <James.Corbett@xxxxxxxxxxxxx>
To: <program-java@xxxxxxxxxxxxx>
Sent: Friday, February 11, 2011 3:54 PM
Subject: [program-java] Re: Command prompt updated


Roger:

May I suggest you abandon the "Command Prompt" approach and join us in the
21st century and get Eclipse.

Jim


James M. Corbett

Programmer / Analyst |
Canada Revenue Agency | Agence du revenue du Canada
875 Heron Rd.
Ottawa, On.
K1A0L5

James.Corbett@xxxxxxxxxxxxx
Telephone | Téléphone: (613) 941-1338
Facsimile | Télécopieur: (613) 941-2261

Government of Canada | Gouvernement du Canada

E = MC²

-----Original Message-----
From: program-java-bounce@xxxxxxxxxxxxx
[mailto:program-java-bounce@xxxxxxxxxxxxx] On Behalf Of Roger Woolgrove
Sent: February 11, 2011 10:35
To: JavaProgramming
Subject: [program-java] Command prompt updated

Hi Jim and all,

Thanks for all the input with this.

It seems that there maybe a problem with the link to the Command Prompt
supplied by the Open University.

So all that assistance may have been the right thing to do but was all
relative and pointless as the problem goes somewhat deeper.

So onwards:

Could anyone please give me a step-by-step list of instructions on how to
run a java class after compilation inside the editor.

As I understand it,

I need to open the command prompt, no idea how this is done enter the
address of the compiled class which has been saved as  name.java and is
opened at the end of the address with javac name.java Then I need to
re-write the address only now pointing at name.Class which the previous step
would create This will open the class within the command prompt and that
should be lovely.

Many thanks

Roger





Other related posts: