AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Simple Command Prompt Problem (Learning Java)

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
Nehmo
Guest





PostPosted: Mon Oct 24, 2005 12:13 am    Post subject: Simple Command Prompt Problem (Learning Java) Reply with quote



I'm sure this is an embarrassingly simple question, and actually it's
about commands rather than Java, but I'm learning Java (just beginning),
so here I am in this NG.
I'm using the tutorial at
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html#win32-2b .

I can't seem to get the Hello app to compile. You can see the error
message below. I'm trying to direct Windows to find the Java compiler.
Copy of the command prompt window:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:Documents and SettingsNehmo Sergheyev> cd C:Documents and
SettingsNehmo Se
rgheyevMy DocumentsComputerJava

C:Documents and SettingsNehmo SergheyevMy DocumentsComputerJava>
dir
Volume in drive C is First Concord
Volume Serial Number is 4C00-D5AC

Directory of C:Documents and SettingsNehmo SergheyevMy
DocumentsComputerJa
va

10/22/2005 04:46 AM <DIR> .
10/22/2005 04:46 AM <DIR> ..
10/17/2005 08:59 AM 16,197 accesscontrol.html
10/17/2005 08:59 AM <DIR> accesscontrol_files
10/17/2005 08:43 AM 8,008 cando.html
10/17/2005 08:43 AM <DIR> cando_files
10/17/2005 08:43 AM 6,383 changemylife.html
10/17/2005 08:43 AM <DIR> changemylife_files
10/17/2005 09:00 AM 8,392 classvars.html
10/17/2005 09:00 AM <DIR> classvars_files
10/17/2005 08:43 AM 9,149 definition.html
10/17/2005 08:43 AM <DIR> definition_files
10/22/2005 04:46 AM 152 HelloWorldApp.java
10/18/2005 04:17 AM 152 helo.txt
10/17/2005 08:44 AM 8,012 index.html
10/17/2005 08:44 AM <DIR> index_files
10/17/2005 08:51 AM 9,538 main.html
10/17/2005 08:51 AM <DIR> main_files
10/18/2005 05:58 AM 9,659 objects.html
10/18/2005 05:58 AM <DIR> objects_files
10 File(s) 75,642 bytes
10 Dir(s) 1,124,990,976 bytes free

C:Documents and SettingsNehmo SergheyevMy DocumentsComputerJava>
C:Program
FilesJavajre1.5.0_05binjaac HellowWorldApp.java
'C:Program' is not recognized as an internal or external command,
operable program or batch file.

C:Documents and SettingsNehmo SergheyevMy DocumentsComputerJava>

--
)|||(__ Nehmo __)|||(

Back to top
Mark
Guest





PostPosted: Mon Oct 24, 2005 12:41 am    Post subject: Re: Simple Command Prompt Problem (Learning Java) Reply with quote



Nehmo wrote:
Quote:
I'm sure this is an embarrassingly simple question, and actually it's
about commands rather than Java, but I'm learning Java (just beginning),
so here I am in this NG.
I'm using the tutorial at
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html#win32-2b .

I can't seem to get the Hello app to compile. You can see the error
message below. I'm trying to direct Windows to find the Java compiler.
Copy of the command prompt window:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:Documents and SettingsNehmo Sergheyev> cd C:Documents and
SettingsNehmo Se
rgheyevMy DocumentsComputerJava

C:Documents and SettingsNehmo SergheyevMy DocumentsComputerJava
dir
Volume in drive C is First Concord
Volume Serial Number is 4C00-D5AC

Directory of C:Documents and SettingsNehmo SergheyevMy
DocumentsComputerJa
va

10/22/2005 04:46 AM <DIR> .
10/22/2005 04:46 AM <DIR> ..
10/17/2005 08:59 AM 16,197 accesscontrol.html
10/17/2005 08:59 AM <DIR> accesscontrol_files
10/17/2005 08:43 AM 8,008 cando.html
10/17/2005 08:43 AM <DIR> cando_files
10/17/2005 08:43 AM 6,383 changemylife.html
10/17/2005 08:43 AM <DIR> changemylife_files
10/17/2005 09:00 AM 8,392 classvars.html
10/17/2005 09:00 AM <DIR> classvars_files
10/17/2005 08:43 AM 9,149 definition.html
10/17/2005 08:43 AM <DIR> definition_files
10/22/2005 04:46 AM 152 HelloWorldApp.java
10/18/2005 04:17 AM 152 helo.txt
10/17/2005 08:44 AM 8,012 index.html
10/17/2005 08:44 AM <DIR> index_files
10/17/2005 08:51 AM 9,538 main.html
10/17/2005 08:51 AM <DIR> main_files
10/18/2005 05:58 AM 9,659 objects.html
10/18/2005 05:58 AM <DIR> objects_files
10 File(s) 75,642 bytes
10 Dir(s) 1,124,990,976 bytes free

C:Documents and SettingsNehmo SergheyevMy DocumentsComputerJava
C:Program
FilesJavajre1.5.0_05binjaac HellowWorldApp.java
'C:Program' is not recognized as an internal or external command,
operable program or batch file.

C:Documents and SettingsNehmo SergheyevMy DocumentsComputerJava

javac


rather than

jaac

???

Is javac.exe on your path for finding executable files? If you type

set

on the command line, does the path statement include a location where
javac.exe can be found?

Back to top
nehmo54@hotmail.com
Guest





PostPosted: Mon Oct 24, 2005 1:40 am    Post subject: Re: Simple Command Prompt Problem (Learning Java) Reply with quote



I figured I'd save the experimental applications I wrote in a folder
in
C:Documents and SettingsNehmo SergheyevMy DocumentsComputerJava
Which is where I placed HelloWorldApp.java
When I use the command Set I get that directory, but it's not where
javac.exe can be found.
In C:Program FilesJavajre1.5.0_05bin , I don't have javac.exe. I
have javacpl.exe . Is that the same thing with a different name? Anyway
I tried that name in command line, and it still didn't work. I should
move HelloWorldApp.java to the bin folder?
I'll send this and try that.
--
)|||(__ Nehmo __)|||(

Back to top
Andrew Thompson
Guest





PostPosted: Mon Oct 24, 2005 2:05 am    Post subject: Re: Simple Command Prompt Problem (Learning Java) Reply with quote

[email]nehmo54 (AT) hotmail (DOT) com[/email] wrote:

Quote:
In C:Program FilesJavajre1.5.0_05bin , I don't have javac.exe.

- That is the run-time environment (jre) rather than the
(Java) developers kit (jdk). (It will not contain
javac.exe, but it should have java.exe.)
- I believe 1.5.0_07 is the latest version shipping..

Unfortunately, sorting the correct download bundle (from
the many offered by Sun), can be quite confusing. Look for
one that mentions both JDK and J2SE* specifically.

* J2SE - Java 2 Standard Edition - (Java for the 'desktop',
rather than 'server')

Back to top
Andrew Thompson
Guest





PostPosted: Mon Oct 24, 2005 2:10 am    Post subject: Re: Simple Command Prompt Problem (Learning Java) Reply with quote

Andrew Thompson wrote:

Quote:
nehmo54 (AT) hotmail (DOT) com wrote:

In C:Program FilesJavajre1.5.0_05bin , I don't have javac.exe.

- That is the run-time environment (jre) rather than the
(Java) developers kit (jdk).

Or, they sometimes also referred to it as
"Software Developers Kit" - SDK [1]

Quote:
Unfortunately, sorting the correct download bundle (from
the many offered by Sun), can be quite confusing. ...

[1] And all this would be slightly simpler if not for Sun's
idiot marketing people, who think it is 'kewl' to change words,
expresssions and (the resulting) acronyms pertaining to Java.
To whoever makes these decisions to suddenly change the names
of Java related technologies - 'A pox on you'.

Back to top
Roedy Green
Guest





PostPosted: Mon Oct 24, 2005 2:13 am    Post subject: Re: Simple Command Prompt Problem (Learning Java) Reply with quote

On Mon, 24 Oct 2005 00:13:17 GMT, "Nehmo" <nehmo54 (AT) hotmail (DOT) com> wrote
or quoted :

Quote:
C:Program
FilesJavajre1.5.0_05binjaac

see

1. In windows you need quotes around filenames containing spaces.
2. it is javac.exe not jaac
3. the devil is in the details, cut and paste, don't retype since you
may add or inadvertently fix your problems in the transcription.

http://mindprod.com/jgloss/gettingstarted.html
http://mindprod.com/jgloss/helloworld.html
http://mindprod.com/jgloss/javacexe.html
http://mindprod.com/jgloss/javaexe.html


--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Back to top
Roedy Green
Guest





PostPosted: Mon Oct 24, 2005 2:15 am    Post subject: Re: Simple Command Prompt Problem (Learning Java) Reply with quote

On 23 Oct 2005 18:40:41 -0700, [email]nehmo54 (AT) hotmail (DOT) com[/email] wrote or quoted :

Quote:
I figured I'd save the experimental applications I wrote in a folder
in
C:Documents and SettingsNehmo SergheyevMy DocumentsComputerJava
Which is where I placed HelloWorldApp.java
When I use the command Set I get that directory, but it's not where
javac.exe can be found.

Just put javac.exe's directory on the path. Then you don't need giant
long names to refer to it. Just javac.exe


see http://mindprod.com/jgloss/path.html

--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Back to top
Roedy Green
Guest





PostPosted: Mon Oct 24, 2005 2:16 am    Post subject: Re: Simple Command Prompt Problem (Learning Java) Reply with quote

On Mon, 24 Oct 2005 02:05:03 GMT, Andrew Thompson
<seemysites (AT) www (DOT) invalid> wrote or quoted :

Quote:

- That is the run-time environment (jre) rather than the
(Java) developers kit (jdk). (It will not contain
javac.exe, but it should have java.exe.)
- I believe 1.5.0_07 is the latest version shipping..
see http://mindprod.com/jgloss/jdk.html


You probably are going to make a million other standing beginner
errors if you try to get set up without some documentation.

See http://mindprod.com/jgloss/gettingstarted.html
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Back to top
Andrew Thompson
Guest





PostPosted: Mon Oct 24, 2005 2:21 am    Post subject: Re: Simple Command Prompt Problem (Learning Java) Reply with quote

Roedy Green wrote:

Quote:
See http://mindprod.com/jgloss/gettingstarted.html

(Good call - I think that page will help the OP through
a dozen questions/challenges they are about to encounter)

Back to top
TechBookReport
Guest





PostPosted: Mon Oct 24, 2005 9:33 am    Post subject: Re: Simple Command Prompt Problem (Learning Java) Reply with quote

Andrew Thompson wrote:
Quote:
the many offered by Sun), can be quite confusing. ...


[1] And all this would be slightly simpler if not for Sun's
idiot marketing people, who think it is 'kewl' to change words,
expresssions and (the resulting) acronyms pertaining to Java.
To whoever makes these decisions to suddenly change the names
of Java related technologies - 'A pox on you'.

Amen to that!

--
TechBookReport Java book reviews -
http://www.techbookreport.com/JavaIndex.html

Back to top
Roedy Green
Guest





PostPosted: Mon Oct 24, 2005 9:37 am    Post subject: Re: Simple Command Prompt Problem (Learning Java) Reply with quote

On Mon, 24 Oct 2005 10:33:46 +0100, TechBookReport <tbr (AT) nospam (DOT) nos>
wrote, quoted or indirectly quoted someone who said :

Quote:
[1] And all this would be slightly simpler if not for Sun's
idiot marketing people, who think it is 'kewl' to change words,
expresssions and (the resulting) acronyms pertaining to Java.
To whoever makes these decisions to suddenly change the names
of Java related technologies - 'A pox on you'.

Amen to that!

Ditto having two different numbering system for versions.

Feel free to jump to Java 98.6 if you want, but make sure every
reference in every html web page in the universe calls it that. That
means making that decision early on.

--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Back to top
Andrew Thompson
Guest





PostPosted: Mon Oct 24, 2005 10:24 am    Post subject: Re: Simple Command Prompt Problem (Learning Java) Reply with quote

Roedy Green wrote:

(snip bits that could not be read in a funny way)

Quote:
Feel free to jump to Java 98.6 ..

Is that an 'Alternative Rock' station? ;-)

Back to top
Nehmo
Guest





PostPosted: Mon Oct 24, 2005 10:33 am    Post subject: Re: Simple Command Prompt Problem (Learning Java) Reply with quote

- Roedy Green -
Quote:
3. the devil is in the details,

- Nehmo -
I finally got it to work. For simplicity, I had to move
HelloWorldApp.java to the folder
C:Program FilesJavajdk1.5.0_05bin (which has javac.exe)
I was in the wrong folder before, but even when I corrected it, I
couldn't seem to get the path right. I had to re-write the app too. Very
touchy stuff.

Thanks, everybody. Please be prepared for more questions!

--
)|||(__ Nehmo __)|||(


Back to top
Roedy Green
Guest





PostPosted: Tue Oct 25, 2005 2:11 am    Post subject: Re: Simple Command Prompt Problem (Learning Java) Reply with quote

On Mon, 24 Oct 2005 10:33:52 GMT, "Nehmo" <nehmo54 (AT) hotmail (DOT) com> wrote,
quoted or indirectly quoted someone who said :

Quote:
I finally got it to work. For simplicity, I had to move
HelloWorldApp.java to the folder
C:Program FilesJavajdk1.5.0_05bin (which has javac.exe)
I was in the wrong folder before, but even when I corrected it, I
couldn't seem to get the path right. I had to re-write the app too. Very
touchy stuff.

Pick a nice short name e.g. E:exper for you package-less experiments.

You will be typing it often.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.