The Artima Developer Community
Sponsored Link

Java Answers Forum
Same Newbie Problem again... help?

5 replies on 1 page. Most recent reply: Jan 9, 2006 1:07 AM by Matthias Neumair

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 5 replies on 1 page
Metallic Kitty

Posts: 1
Nickname: metalkitty
Registered: Sep, 2005

Same Newbie Problem again... help? Posted: Sep 21, 2005 2:41 AM
Reply to this message Reply
Advertisement
Hey,

I have a problem i can't resolve.
When i try to compile anything (even the helloWorld applic), the DOS told me that the javac command is not an internal or external command.
The same quetion everybody asks! I've tried reading solutions in various forums but I haven't been able to solve the problem.

What could I do?

My OS is Win XP.

The thing is, the javac.exe file exists but when I try to find it using cmd - it doesn't.

Right now, the real path is c:\>program\java\jdk1.5.0_04\bin

Help...??

/Kitty


Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: Same Newbie Problem again... help? Posted: Sep 21, 2005 3:25 AM
Reply to this message Reply
In DOS Type:

set PATH=%PATH%;c:\program\java\jdk1.5.0_04\bin

Then execute JavaC to see if that really is where
your path is. The Path is only set until you close
DOS. To Permanently set it, go to Control Panel
Click on System. Then on the advanced Tab, Click
on the button at the bottom "Environment Variables"
Double Click Path (Make sure you don't delete anything
in Path). Take it to the End of the Text Field and
at the end add:

;c:\program\java\jdk1.5.0_04\bin

That will add this environment to your path you
will be able to compile your programs from any
where; running them will be another issue - Setting
the Path. Get back to us when you have managed to
get it to run javac. I recommend not playing with
your System Variables yet, set Path via DOS then
try the second option, to set it permanently...

Good luck,
Spike

micah l

Posts: 2
Nickname: flightx31
Registered: Dec, 2005

Re: Same Newbie Problem again... help? Posted: Dec 21, 2005 8:52 PM
Reply to this message Reply
I have a similar problem. My path variables are correct(they point to the files I need) but when I run the command prompt and type path it says "no path". When I set the path in dos it dosent do any thing.

It seemes like my windows and dos paths are separate. Can any one help me with this?

Thanks.

--Micah.

Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: Same Newbie Problem again... help? Posted: Dec 21, 2005 9:53 PM
Reply to this message Reply
what you want to do is set the variable path to your java and
javac and also set the variable JAVA_HOME to where ever your
Java installation is in.

E.g. on my Laptop at home its in C:\j2sdk1.4.2_06

set JAVA_HOME=C:\j2sdk1.4.2_06

On my Linux Box it would be something like

export JAVA_HOME=/usr/local/j2sdk

micah l

Posts: 2
Nickname: flightx31
Registered: Dec, 2005

Re: Same Newbie Problem again... help? Posted: Dec 30, 2005 12:16 PM
Reply to this message Reply
I've noticed that I have duplicate java stuff. My jave directory is C:\j2sdk1.4.0 but I also have a java folder in the Program Files folder. Whats been confusing me about entering the variables paths is things like that. Should I just enter both locations? If so which one should be first? Or will that cause problems?

Thanks.

--Micah.

Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: Same Newbie Problem again... help? Posted: Jan 9, 2006 1:07 AM
Reply to this message Reply
The java folder in your program files directory only contains the runtime environment (This changes with Java 1.5).

So only add "c:\j2sdk1.4.0\bin"

Flat View: This topic has 5 replies on 1 page
Topic: java problem Previous Topic   Next Topic Topic: struts

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use