• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

J2SE 5.0 download on java.sun.com

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, I have just began learning java. As per the instructions in the book (head first java) i am supposed to go to "java.sun.com" to get my J2SE 5.0 however the URL is leading to the "https://www.oracle.com/technetwork/java/index.html" web page which doesn't have the download option.

Also upon clicking on "java SE" in the top downloads section, different version of Java SE are shown none of which are 5.0
https://www.oracle.com/technetwork/java/javase/downloads/index.html

Quite lost, Need help in getting both the J2SE and the SDK.

Thank you!
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Supritha,
Welcome to CodeRanch! Java 5 is very old. I recommend downloading the latest version of Java. The language is (mostly) backward compatible so you can still use Head First Java to learn the basics.

If you still want to download Java 5, it is on the archive page
 
Supritha Sheshadri
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Jeanne,

Thank you for your quick reply.

I understand that java 5.0 is old. I downloaded the newest version java SE 13. However my command prompt shows the following as my version, refer to the image attached.

Also I am having a lot of trouble with the PATH adding. I have changed my environment variable as suggested on the below CodeRanch replies. Still it looks like there is something i am doing wrong. I would really be grateful if you could help me set it up.

Thank you in advance.
cmd_prompt.PNG
[Thumbnail for cmd_prompt.PNG]
path_found.PNG
[Thumbnail for path_found.PNG]
envt_variable.PNG
[Thumbnail for envt_variable.PNG]
 
Supritha Sheshadri
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I forgot to attach the links of the CodeRanch replies i referred to,

Here are the links I have so far gone through,

https://coderanch.com/t/693921/java/adding-entry-PATH-environment-variable
https://coderanch.com/t/687593/java/Setting-environment-variables-command-line
https://coderanch.com/t/689105/java/Win

Kindly help me set up my Path and the envt variables.

Thanks.
 
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How did you set the PATH environment variable? Make sure to set the PATH to the current version of Java® to come before all the other PATH components.
 
Campbell Ritchie
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You appear to have found the PATH; it will need editing. Where did you install Java®? You want to add that to the PATH. The PATH entry usually start with the drive letter (C:) and ends with bin
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This Wiki probably has the information you need:

https://coderanch.com/wiki/659740/create-Java-program
 
Supritha Sheshadri
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Guys,

Thank you very much for trying to help me, I really appreciate it.

I understand I had to change the path in the system variable, i referred to, https://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_jdk_install.html#BABGDJFH to change the environment variables. I have done that now.
However my command prompt is still unable to find my javac. I have double checked the directory. It is exactly in the path that has been set and I see that it has come before all the other paths, refer to the image attached. I have now downloaded the latest version of java J2SE 13, I do not, at the moment have any other version of java on my system.

Command prompt gives me a lot of information when i type the javac or the java instruction. Also command prompt shows the path with the javac.exe appended to the path.. I am stuck. Please check and help. Screen shots have been attached.

Thank you.
envt_variable.PNG
[Thumbnail for envt_variable.PNG]
cmd_prompt.PNG
[Thumbnail for cmd_prompt.PNG]
javac_cmd.PNG
[Thumbnail for javac_cmd.PNG]
 
Supritha Sheshadri
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please note, while changing the environment variables, i did not touch the user variables.. The path in the user variables was left as it is and only the path in the system variables was changed.

In this link, https://coderanch.com/wiki/659740/create-Java-program the below points left me a little confused..

" You can set environment variables for either your user only, or for all users (System variables). But don't set a user JAVA_HOME and a system PATH (see this discussion). Add a new variable in either of them by clicking the New button.
Set the variable name as JAVA_HOME, and its value to the directory where you installed the JDK (e.g. C:\Program Files\java\jdk1.8.0_172)
Click OK.
Look for a variable called PATH (the name might slightly vary, for example 'Path'). Select it and click Edit. At the beginning of its value, add the following : "%JAVA_HOME%\bin;" (without the double quotations). Don't forget the semi-colon at the end, to separate this directory to the other directories already in the path."

Please clarify If i should alter the path in the user variable also?. Also help me understand what does "Set the variable name as JAVA_HOME, and its value to the directory where you installed the JDK (e.g. C:\Program Files\java\jdk1.8.0_172)" mean?. Where should i be adding "JAVA_HOME"?.

Thank you.
envt_variable1.PNG
[Thumbnail for envt_variable1.PNG]
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is the javac command.
It's installed and on your path.

What exactly are you expecting it to do?
It's job is just to compile .java files.
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Supritha Sheshadri wrote:Please note, while changing the environment variables, i did not touch the user variables.. The path in the user variables was left as it is and only the path in the system variables was changed.



That's backwards, unfortunately.  You should have changed the User Variables, but if you're the only one on your computer or if everyone on your computer uses Java, it doesn't really matter.

Please clarify If i should alter the path in the user variable also?. Also help me understand what does "Set the variable name as JAVA_HOME, and its value to the directory where you installed the JDK (e.g. C:\Program Files\java\jdk1.8.0_172)" mean?. Where should i be adding "JAVA_HOME"?.



Go into Windows Settings and search for System Environment Variables.  We'll change the system variables since that's where you started.  Click the New button.  The variable name is JAVA_HOME and the value is the path to your JDK.

[Edit:]

You already have a path to your JDK in the PATH environment variable, so using the JAVA_HOME is optional.  The advantage is that when your JDK path changes you only have to change the JAVA_HOME variable, not the PATH.

If you would like to use the JAVA_HOME variable in your PATH, remove the first part of your PATH that has C:\Program Files\Java\jdk-13.0.1\bin to %JAVA_HOME%\bin
 
Supritha Sheshadri
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Guys,

Thank you very much for helping me understand. I was not sure that the javac command was being executed correctly as it had a lot of information that i didn't entirely comprehend.

Thanks and cheers.

 
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic