Thursday, January 21, 2016

Installing Java

Oracle provides Java Platform in two types: Java Runtime Environment (JRE) and Java Development Kit (JDK). The JRE consists of the Java Virtual Machine (JVM) and other components needed to run program written using Java language. While JDK shall be composed of the JRE itself plus development tools, compilers, and also debuggers necessary for creating programs written using Java language.

The Official statement from Oracle: "The JDK is a development environment for building applications, applets, and components using the Java programming language. The JDK includes tools useful for developing and testing programs written in the Java programming language and running on the Java platform".

Because we require JDK for create Java programs, we will install the JDK, which will automatically install the JRE as well. Please download JDK below for Windows platform. There are two options, for Windows 32 bit and 64 bit version.

jdk-8u71 means Java Development Kit version 8 update 71. To download other JDK version or update, please visit http://www.oracle.com/technetwork/java/javase/downloads/index.html.

To check the Windows version you are using whether 32 bit or 64 bit, go to Control Panel - System and Security - System.



After downloading JDK, you can install it like other installer in Windows, just select default value and click Next. After JDK installed successfully, Java will be installed in C:\Program Files\Java\ directory by default, in this case is C:\Program Files\Java\jdk1.8.0_71.

To ensure your JDK installed successfully, open Command Prompt and type java -version and press Enter. This will show Java version you already installed.




Setting CLASSPATH


CLASSPATH is a system variable that is used to tell the program which is written in Java (including the tools included in the JDK) the location where the classes to be used. By setting the value of the CLASSPATH variable, then we can do the compilation and execution of the program that we created in any directory.

If you open Command Prompt, then type javac and press Enter, the result will look like this:



The above message appears because the CLASSPATH has not been set. But if you go to JDK bin directory then type javac and press Enter,  the result will look like this:



javac is a command to compile Java source code. javac.exe resides in JDK bin directory. This is just for sample, If CLASSPATH has not been set, you just can compile and execute Java program under JDK directory. Now we will set the CLASSPATH, so we can compile and execute Java program in any directory. The steps are as follow:

  1. Go to Control Panel - System and Security - System, click Advanced system settings.



  2. System Properties will appear. Click Environment Variables...


  3. Environment Variables will appear. In System variables section, Scroll down and click Path in Variable column, then click Edit...



  4. Edit System Variable will appear. Add JDK bin directory string: ";C:\Program Files\Java\jdk1.8.0_71\bin" (without quotation marks) to Variable value then click OK. Important! add Variable value, not replace.



  5. Back to Environment Variables, then click OK.

  6. Back to System Properties, then click OK.

  7. Now your CLASSPATH has been set. You can compile and execute Java program in any directory. To check your CLASSPATH has been set successfully, open Command Prompt and type javac and press Enter in any directory, your console will print all parameters can be used for javac, as shown in the following image.



44 comments:

  1. I read this content and this was really awesome.You provided a very article.I hope this information may change my business carrier.I can remember these things whenever taking the decision. the blog is very useful, interesting and informative.
    Java Training in Chennai

    ReplyDelete
  2. Thanks for sharing this informative content! I would like to add my input in terms of Java beginner guide. I hope this will be helpful. Cheers!

    ReplyDelete
  3. Good post! Thanks for sharing this Information.The information you Provided is much useful onjava classes

    ReplyDelete
  4. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.is article.

    Python training in bangalore
    Python course in pune
    Python training in bangalore

    ReplyDelete
  5. Thank you for an additional great post. Exactly where else could anybody get that kind of facts in this kind of a ideal way of writing? I have a presentation next week, and I’m around the appear for this kind of data.
    Data Science Training in Chennai
    Data Science course in anna nagar
    Data Science course in chennai
    Data science course in Bangalore
    Data Science course in marathahalli

    ReplyDelete
  6. I’m planning to start my blog soon, but I’m a little lost on everything. Would you suggest starting with a free platform like Word Press or go for a paid option? There are so many choices out there that I’m completely confused. Any suggestions? Thanks a lot.
    AWS Training in Bangalore electronic city| AWS Training in Bangalore Cost
    AWS Training in Pune with placements | AWS Training in Pune
    AWS Training Course in Chennai |Best AWS Training in Chennai tnagar
    Best AWS Amazon Web Services Training in Chennai | Best AWS Training centers in Chennai
    AWS Online Training in india | AWS online training cost

    ReplyDelete
  7. Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.
    aws training in bangalore
    RPA Training in bangalore
    Python Training in bangalore
    Selenium Training in bangalore
    Hadoop Training in bangalore

    ReplyDelete
  8. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's. 
    rpa training in bangalore
    rpa training in pune
    rpa online training
    best rpa training in bangalore

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end. 
    microsoft azure training in bangalore
    rpa training in bangalore
    best rpa training in bangalore

    ReplyDelete
  11. Howdy, would you mind letting me know which web host you’re utilizing? I’ve loaded your blog in 3 completely different web browsers, and I must say this blog loads a lot quicker than most. Can you suggest a good internet hosting provider at a reasonable price?
    python Online training in chennai
    python training institute in marathahalli
    python training institute in btm
    Python training course in Chennai

    ReplyDelete
  12. Nice and good post. This is a wonderful article, Given so much info in it, keep sharing.


    ExcelR Data Science Course in Bangalore

    ReplyDelete
  13. Attend The Python Training in Bangalore From ExcelR. Practical Python Training in Bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Python Training in Bangalore.

    ReplyDelete
  14. Really appreciate this wonderful post that you have provided for us.Great site and a great topic as well i really get amazed to read this. Its really good.







    DATA SCIENCE COURSE MALAYSIA

    ReplyDelete
  15. How does we get jdk bin directory string?

    ReplyDelete
  16. I have to search sites with relevant information on given topic and provide them to teacher our opinion and the article. I appreciate your post and look forward tomorrow.data science course in singapore

    ReplyDelete
  17. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.
    Great post, Thanks for sharing.

    ReplyDelete

  18. Its as if you had a great grasp on the subject matter, but you forgot to include your readers. Perhaps you should think about this from more than one angle.
    Data Science Courses

    ReplyDelete
  19. I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work. Definitely a great post. Hats off to you! The information that you have provided is very helpful.
    data science course malaysia

    ReplyDelete
  20. Excellent and very cool idea and great content of different kinds of the valuable informations. I really appreciate your post,Keep updating your posts.
    machine learning course bangalore

    ReplyDelete
  21. Awesome, Thanks for sharing this awesome guide. I’m happy that I came across with your site this article is on point,thanks again and have a great day. Keep posting!!Machine Learning Training in Bangalore

    ReplyDelete
  22. Very much useful article. Kindly keep blogging
    Visit us: Java Online Training Hyderabad
    Visit us: Core Java Online Course
    Visit us: java course

    ReplyDelete
  23. Great blog. Impressive, Keep sharing more with us. Thank you.
    Python Course in Hyderabad

    ReplyDelete
  24. Thanks for sharing this information. I really like your blog post very much. You have really shared an informative and interesting blog post with people..
    data science training in hyderabad

    ReplyDelete
  25. Консоли от корпорации Microsoft не сразу завоевали всемирную известность и доверие игроков. Первая консоль под названием Xbox, вышедшая в далеком 2001 году, существенно уступала PlayStation 2 по количеству проданных приставок. Но все изменилось с выходом Xbox 360 - консоли седьмого поколения, которая стала по-настоящему "народной" для обитателей Рф и стран СНГ - http://ru-xbox.ru/load/1/1/5. Веб-сайт Ru-Xbox.Ru является популярным ресурсом среди поклонников приставки, так как он предлагает игры для Xbox 360, которые поддерживают все имеющиеся версии прошивок - совершенно бесплатно! Зачем играть на оригинальном железе, если имеется эмуляторы? Для Xbox 360 игры выходили долгое время и представлены как посредственными проектами, так и хитами, многие из которых даже сейчас остаются эксклюзивными для это консоли. Некие пользователи, желающие сыграть в игры для Xbox 360, смогут задать вопрос: зачем нужны игры для прошитых Xbox 360 freeboot либо разными версиями LT, если есть эмулятор? Рабочий эмулятор Xbox 360 хоть и существует, однако он просит производительного ПК, для покупки которого потребуется вложить существенную сумму. К тому же, разнообразные артефакты в виде исчезающих текстур, недостатка некоторых графических эффектов и освещения - могут значительно попортить впечатления об игре и отбить желание для ее предстоящего прохождения. Что предлагает этот интернет-сайт? Наш сайт стопроцентно посвящен играм для приставки Xbox 360. У нас можно совсем бесплатно и без регистрации загрузить игры на Xbox 360 через торрент для следующих версий прошивок консоли: - FreeBoot; - LT 3.0; - LT 2.0; - LT 1.9. Каждая прошивка имеет свои особенности обхода встроенной защиты. Поэтому, для запуска той либо иной игры будет нужно загрузить специальную ее версию, которая на сто процентов адаптирована под одну из 4 вышеперечисленных прошивок. На нашем сайте можно без усилий найти желаемый проект под нужную прошивку, так как возле каждой игры присутствует заглавие версии (FreeBoot, LT 3.0/2.0/1.9), под которую она приспособлена. Гостям данного ресурса доступна особая категория игр для 360-го, предназначенных для Kinect - специального дополнения, которое считывает все движения 1-го или нескольких игроков, и позволяет управлять с помощью их компьютерными персонажами. Большой выбор ПО Кроме способности загрузить игры на Xbox 360 Freeboot либо LT разных версий, здесь можно найти программное обеспечение для консоли от Майкрософт: - разные версии Dashboard, которые позволяют кастомизировать интерфейс консоли под свои нужды, сделав его более удобным и нынешним; - браузеры; - просмотрщики файлов; - сохранения для игр; - темы для консоли; - программы, для конвертации образов и записи их на диск. Кроме вышеперечисленного игры на Xbox 360 Freeboot можно запускать не с дисковых, а с USB и многих других носителей, используя программу x360key, которую вы можете достать на нашем портале. Посетителям доступно огромное количество полезных статей, а кроме этого форум, где можно пообщаться с единомышленниками или попросить совета у более опытных владельцев консоли.

    ReplyDelete
  26. Your post is really amazing with lots of important points Thank you for sharing. I was really enjoying reading this article.

    mobile repairing course
    mobile repairing course in Laxmi Nagar Delhi
    mobile repairing course Laxmi Nagar Delhi

    ReplyDelete
  27. I am another customer of this site so here I saw various articles and posts posted by this site,I curious more energy for some of them trust you will give more information further. 360digitmg bangalore

    ReplyDelete
  28. Thank you for sharing valuable information with us.

    Java web application is a type of free programming language used to develop applications and software that are becoming highly in demand on the internet. The software engineer can provide the web application or software in the form of windows, Linux, and MAC OS. There are various types of systems that can not work without java and it is getting necessary day by day even the world’s no.1 application depends on java. Java has become a most popular feature in android smartphone applications that's why Aptech learning provides java training in Dwarka, Janakpuri, and in Gurgaon also. Java training helps to get you complete knowledge about web frameworks, Java testing tools, and design patterns in java.

    Let's get learn about the PHP training course
    PHP is a type of programming language that is most commonly used in dynamic functions such as modifying, collecting, and deleting all types of databases It also helps to encrypt all types of data in the form of HTML and XML file. Aptech learning provides you with a complete PHP training course at a reasonable cost that will help you to grow more in the era of the software industry.

    For more details please visit our website : Aptech Dwarka

    ReplyDelete
  29. Thank You for Sharing valuable information with us.

    E-Commerce is the fastest-growing platform which is becoming more demandable day by day this is a tremendous form of the vibrant sector that is bringing several opportunities to the new generation to become more skilled and professional. Taking up this great advantage in the E-Commerce sector would need the right path and the right skillset you need to learn the latest technologies and high-demand skills such as building payment gateways and developing an accessible and easy website along with the basics of E-commerce that‘s why Aptech learning official Pro E-Commerce training program in Dwarka, Janakpuri, and Gurgaon which will help to make a successful career in this booming industry. Java Programming Course helps to become an expert in Java web application development. It helps you to bring efficiency in collecting and analyzing the data through Java programming in this course you will learn effective web UI/UX design and Secure web applications by using the advanced technologies of the Java program.

    For more details please visit our website : Aptech Gurgaon

    ReplyDelete
  30. Каждый год у людей которых есть проблемы со зрением, появляется все больше и больше. Очки - наиболее нужный и проверенный способ коррекции зрения - проверка зрения спб. На сайте компании ROCKINGLOOK можно оформить высококачественные оправы и линзы для очков по доступной стоимости.

    ReplyDelete
  31. Thanks for the clear and detailed guide on installing Java! For beginners, getting started with Java can be challenging, and having step-by-step instructions like these is incredibly helpful. Do you have any recommendations for troubleshooting common installation issues? Looking forward to more beginner-friendly Java tutorials!

    Epicforce Tech

    ReplyDelete