Results 1 to 10 of 10
Thread: Setting java up on my pc
- 06-10-2011, 05:14 PM #1
Member
- Join Date
- Jun 2011
- Location
- North Wales
- Posts
- 6
- Rep Power
- 0
Setting java up on my pc
Have just downloaded jdk1.6.0_26
I remeber in uni having to change some system variables on my laptop before i could complie any code, however this information doesn't seem to come with the download.
When i try to compile in cmd typing 'javac' it returns the classic
'javac' is not recognised as an internal or external command...
which i know means i'm still not fully set up to begin coding :)
Any help/links to help get me going would very much be apprieciated!
Info:
java -version yields:
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05
Java Hotspot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)
- 06-10-2011, 05:38 PM #2
Assuming you're using windows, you have to set the PATH environment variable to point to the jdk's bin directory.
How do I set or change the PATH system variable?
- 06-10-2011, 06:00 PM #3
Member
- Join Date
- Jun 2011
- Location
- North Wales
- Posts
- 6
- Rep Power
- 0
Thank you.
But still can't compile :(
added it's location ';C:\Program Files (x86)\Java\jdk1.6.0_26\bin' to the end of the path file in environmental variables
But i'm still getting the same compile error
Anything i've missed ?
Thank you
- 06-10-2011, 06:14 PM #4
Member
- Join Date
- Dec 2010
- Posts
- 38
- Rep Power
- 0
i think you have to put one more "\" after the bin.
- 06-10-2011, 06:35 PM #5
Member
- Join Date
- Jun 2011
- Location
- North Wales
- Posts
- 6
- Rep Power
- 0
Sorry that didn't work either :(
found another post/thread on here saying i need to do the same for the jre
so added
';C:\Program Files (x86)\Java\jre6\bin\'
to the path too.
really stumped as there doesn't seem to be any instructions for the whole set up process. :(
- 06-10-2011, 06:40 PM #6
That really should be all you need to do, try double checking that javac.exe actually exists in that directory. Just a long shot but i saw you said you were using "cmd", every time you make a change to the path variable you'll have to close and open a new instance of cmd. If you're using the same window it won't have the updated path.
- 06-10-2011, 06:44 PM #7
Show us what your path variable is set to by opening a command prompt window and entering: Path
Then copy the full output here.
To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'
Paste here.
here's what mine looks like:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
D:\Norms\Norms Tools>path
PATH=C:\Program Files\PHP\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDO WS\System32\Wbem;C:\Program Files\Java\jdk1.5.0_04\bin;C:\BatchFiles;C:\Progra m Files\Support Tools\;C:\WINDOWS\system32\WindowsPowerShell\v1.0; C:\Program Files\QuickTime\QTS
ystem\
D:\Norms\Norms Tools>
- 06-10-2011, 06:46 PM #8
Member
- Join Date
- Dec 2010
- Posts
- 38
- Rep Power
- 0
YA everything is fine and it should work for sure. Make sure about the javac.exe and java.exe exist there in bin directory or not...................as said above SLOSS
- 06-10-2011, 06:49 PM #9
Member
- Join Date
- Jun 2011
- Location
- North Wales
- Posts
- 6
- Rep Power
- 0
Forgot about that property of cmd (should have known :))
Yes compiling like there's no tomorrow thank you all :)
- 06-10-2011, 09:36 PM #10
That's a crappy site. Why go there when Oracle has their own tutorial?You can always refer the following link :
Trail: Getting Started (The Java™ Tutorials)
db
edit @shwetasabane: Stop posting your pet link to old dead threads or you'll be banned as a spammer. The two posts you made to old threads have been deleted.Last edited by DarrylBurke; 06-10-2011 at 09:42 PM. Reason: Found two zombie resurrections duplicating the previous post.
Similar Threads
-
Need help setting up my environment in Java
By coding in forum New To JavaReplies: 5Last Post: 01-31-2011, 08:52 AM -
setting classpath for java in ubuntu
By kulangotski in forum Java ServletReplies: 0Last Post: 01-03-2011, 02:18 AM -
setting memory limit for java?
By MuslimCoder in forum New To JavaReplies: 1Last Post: 08-26-2010, 06:09 PM -
Help with setting up Java
By itmasterw in forum New To JavaReplies: 6Last Post: 01-18-2008, 11:04 PM -
Setting Java Path
By bugger in forum New To JavaReplies: 2Last Post: 11-22-2007, 09:48 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks