aspose file tools*
The moose likes Beginning Java and the fly likes How To Install Java JDK? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How To Install Java JDK?" Watch "How To Install Java JDK?" New topic
Author

How To Install Java JDK?

Gary Farms
Greenhorn

Joined: Jul 31, 2002
Posts: 12
I just installed Java SE Development Kit 7u9 - the latest.

It successfull copied installed all files to c:\program files\java\jdk1.7.0-09\

What I have in this folder is a series of subfolders. No .exe file and no way to activate java on my desktop with a logo.

What do I do next to have a runnable Java, and how do I run it?
Kemal Sokolovic
Bartender

Joined: Jun 19, 2010
Posts: 825
    
    5

Executables are in the bin subdirectory of your installation directory (you'll probably use javac and java to compile and run Java programs, respectively).
Since you're using Windows (I guess by the path), you need to set Environment Variables properly so you can use these tools from command line. Google will probably give you detailed tutorials on how to set them up.


The quieter you are, the more you are able to hear.
Gary Farms
Greenhorn

Joined: Jul 31, 2002
Posts: 12
No executable files in my c:\program files\java\jdk1.7.0-0.9\bin folder. only application files.
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 905
    
    5
Kemal Sokolovic wrote:
Since you're using Windows (I guess by the path), you need to set Environment Variables properly so you can use these tools from command line.


You can write wrapping scripts (both under Windows and Unix including Linux) for the command line tools, so there is no absolute necessity to set environment variables.

I write wrapping scripts like javaw14, javac15, java16, javap17 etc. for the different versions and I put them onto the PATH.
I consider this an appropriate way for the command-line coexistence of different Java versions.

Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40034
    
  28
Gary Farms wrote: . . . c:\program files\java\jdk1.7.0-0.9\bin . . .
You should not put your own work in a bin folder.

And are you sure it is 1.7.0-09? I thought it was 1.7.0_09. Subtle but significant difference.
Gary Farms
Greenhorn

Joined: Jul 31, 2002
Posts: 12
I'm still lost as to how I now use and invoke java. All files were copied tyo the bin folder.

Now, what do I do to create invoke java and create a hello world program?

How do I create a java icon on my desktop?

Kemal Sokolovic
Bartender

Joined: Jun 19, 2010
Posts: 825
    
    5

You were said not to put your project files (classes or source files) in a bin folder.

To set up environment variable do the following:
  • Go to Start->Control Panel->System, to display system properties.
  • On the left side, click on Advanced System Settings. When done, you should be prompted by System Properties dialog.
  • Now click Environment Variables button to open Environment Variables dialog.
  • Scroll down inside the System variables box and select the Path variable. Click the Edit button. This will cause the Edit System Variable dialog to appear.
  • Place the cursor inside the Variable value field. Move the cursor to the end of the field and add ; after the last item in the field. Then type/paste the name of the directory in which you placed the JDK followed by \bin; (eg. C:\Program Files\Java\jdk1.7.0_07\bin;). DO NOT PLACE ANY SPACES BEFORE OF AFTER WHAT YOU TYPE (not shouting, just pointing this part)! Click OK button to apply changes you made to environment variable.

  • If you already have a Command Prompt running, you need to restart it. When opened again, type in Command Prompt and you should get something like this:


    If you get something like this as output then you've set it right and you can use it to compile/run java programs from command line.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: How To Install Java JDK?