aspose file tools*
The moose likes Beginning Java and the fly likes Do I already have JDK? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Do I already have JDK?" Watch "Do I already have JDK?" New topic
Author

Do I already have JDK?

A Prescott
Greenhorn

Joined: Mar 29, 2007
Posts: 9
I'm looking at the "First Program" tutorial on this site (http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html), and it says to download the JDK in the checklist. How do I know what pieces of Java I already have on my pc here?

I don't see anything under "Start > All Programs > " that appears to be Java-related. But, I do recall that I get automatic updates for some Java stuff. Is that the JDK? Something else?

Thanks in advance.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36508
    
  16
Easiest way to find out what Java you have on your PC is to enter "java -version" from a command prompt or shell. If you get a sensible reply, you probably have the JDK loaded correctly. If it says something like "java is not recognised as a file or executable program" then you might as well download the whole JDK. It is most likely that what you already have is the runtime environment on its own (JRE) which is of no use for developing software. Be sure whatever you download has "SE" (standard edition) somewhere in its name and you might as well get the most recent version, Java 6 also called jdk1.6.0.
Follow the installation instructions to the letter, especially the bit about setting the PATH permanently.

And don't believe them about NotePad. Dreadful program. Ask your teachers about what to use as a text editor. I like JCreatorLE which can be used as a text editor.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13875
    
  10

If "java -version" gives you a Java version number (and not an error message) then you know you have a JRE (Java Runtime Environment) installed. But that is not the same as the JDK.

The JRE is the Java Virtual Machine (JVM) + libraries etc. that you need to run Java programs. It is meant for end users who are not going to develop and compile their own Java programs.

The JDK is the JRE + the compiler and other tools that you need to compile and run Java programs. If you are a programmer and you want to compile your own Java programs, then you need the JDK.

"But, I do recall that I get automatic updates for some Java stuff. Is that the JDK? Something else?"

The standard JRE periodically checks for updates automatically. From this message alone you can't tell if you also have the JDK installed.

You can download JDK 6 here. I see that JDK 6 Update 1 is currently the newest version.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
A Prescott
Greenhorn

Joined: Mar 29, 2007
Posts: 9
Thanks guys (in the generic form of "guys")!

My results of "java -version" :



Based on this, and your comments above, I'm convinced I don't have the JDK and need to download it.

Regarding Notepad -- I agree with you, Campbell Ritchie. I'm more of a "unix-y" guy rather than a Microsoft guy. I have sinced found WinVi and have downloaded that, so I'm good to go with my editor.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Do I already have JDK?
 
Similar Threads
help on java
My first Java Program showing error
Java Beginner to Programmer
Problems runing java prograns
J2SE SDK