This blog is under construction

Saturday 19 March 2016

How to install JDK and setting environment variables for java

In this tutorial, we are going to see the following.
  • How to install JDK
  • How to run java program without setting java path
  • How to set temporary java path in windows
  • How to set permanent java path in windows

How to install JDK?
  • Check whether JDK is installed on your PC.  If it is not installed, please go to the below link and download JDK under Java SE(Java Standard Edition) in oracle website.
  • Install the downloaded JDK in your PC.

Once JDK is installed, you can run your java program using any method shown below.
  • Having your java source code under jdk/bin, compile the source code and run the program from same directory
  • Setting temporary path for java, compiling the source code and running the program from any location using command prompt
  • Updating the java path in system or user variable(in system properties), compiling the source code and running the program anywhere using command prompt

Let us see how to run java program without setting environmental variables.  Once java is installed in your PC, move to the location where java is installed and check whether javac and java executable are present(jdk/bin).  In the below example, Java is installed in the below path.

C:\Java\jdk1.6.0_22\bin


I have a java program named javaexample.java stored under C:\Java\jdk1.6.0_22\bin directory where java compiler and java executable or application launcher are present. Now, let us try to compile and execute our java program.

Launch the command prompt and move to the location where javac.exe and java.exe are located(C:\Java\jdk1.6.0_22\bin).  Then, compile the java source code as shown below.

javac  javaexample.c

where javaexample.c is the file where our source code resides.  As a result of compilation, we will get a class file named javaexample.class under the same directory where the source code is located.



Below is the source code of the program which we compiled above.  And the program would print "Hello World" on execution.

public class javaexample {

    public static void main(String args[]) {
        /* prints "Hello World" on the output screen */
        System.out.println("Hello World");
    }

}

Let us execute the program using java application launcher and check the output.

"Hello World" is printed on our output screen as a result of executing our java program.

How to set temporary java path in windows?
Below are the steps to set the temporary java(JDK) path to compile and execute your java program that is located anywhere in our computer.
  • Command prompt would display javac as unrecognized command when the same is executed without setting path environmental variable.
  • Set the path environmental variable with the location where java compiler(javac) and java application launcher(java) are located.  In my case, javac and java are located in C:\Java\jdk1.6.0_22\bin.  Hence, I am setting the same location as value for path environmental variable in command prompt.  This tells our system about the location of javac and java executable.
  • Run javac in command prompt again and check whether the command is recognized.

Please note that the above set path would be cleared on closing the command prompt. We need to set the path again if we need to compile or execute the program after relaunching command prompt.

How to set permanent java path in windows?
Below are the steps to set permanent java(JDK) path to compile and execute your java program that is located anywhere in our computer.
  • Click Start -> Control panel -> System and Security -> System
  • Click Advanced settings which will open a pop up window named "system properties"
  • Choose "Advanced" tab in system properties
  • Click on "Environment variables" and update your Java(JDK/bin) path.
  • Run javac in command prompt again and check whether the command is recognized.
Trying to execute javac in command prompt without setting path environment variable.

Trying to set the environment variable(Start -> Control panel -> System and Security -> System -> Advanced system settings).

Setting environment variable - Click new under user variable and update PATH variable and its value.  Please don't update system variable.

Checking whether javac command is getting recognized in command prompt.


46 comments:

  1. Replies
    1. Hello Everyone !

      USA SSN Leads/Dead Fullz available, along with Driving License/ID Number with good connectivity.

      All SSN's are Tested & Verified.

      **DETAILS IN LEADS/FULLZ**

      ->FULL NAME
      ->SSN
      ->DATE OF BIRTH
      ->DRIVING LICENSE NUMBER
      ->ADDRESS WITH ZIP
      ->PHONE NUMBER, EMAIL
      ->EMPLOYEE DETAILS

      *Price for SSN lead $2
      *You can ask for sample before any deal
      *If you buy in bulk, will give you discount
      *Sampling is just for serious buyers

      ->Hope for the long term business
      ->You can buy for your specific states too

      **Contact 24/7**

      Whatsapp > +923172721122

      Email > leads.sellers1212@gmail.com

      Telegram > @leadsupplier

      ICQ > 752822040

      Delete
    2. **SELLING SSN+DOB FULLZ**

      CONTACT 24/7
      Telegram > @leadsupplier
      ICQ > 752822040
      Email > leads.sellers1212@gmail.com

      >>1$ each without DL/ID number
      >>2$ each with DL
      >>5$ each for premium (also included relative info)

      Price will be reduce in Bulk order

      FORMAT OF LEADS/FULLZ/PROS

      ->FULL NAME
      ->SSN
      ->DATE OF BIRTH
      ->DRIVING LICENSE NUMBER WITH EXPIRY DATE
      ->COMPLETE ADDRESS
      ->PHONE NUMBER, EMAIL, I.P ADDRESS
      ->EMPLOYMENT DETAILS
      ->REALTIONSHIP DETAILS
      ->MORTGAGE INFO
      ->BANK ACCOUNT DETAILS

      >All Leads are Spammed & Verified.
      >Fresh spammed data of USA Credit Bureau
      >Good credit Scores, 700 minimum scores
      >Invalid info found, will be replaced.
      >Payment mode BTC, ETH, LTC, PayPal, USDT & PERFECT MONEY

      ''OTHER GADGETS PROVIDING''

      >SSN+DOB Fullz
      >CC with CVV
      >Photo ID's
      >Dead Fullz
      >Carding Tutorials
      >Hacking Tutorials
      >SMTP Linux Root
      >DUMPS with pins track 1 and 2
      >Sock Tools
      >Server I.P's
      >HQ Emails with passwords

      Contact 24/7

      Email > leads.sellers1212@gmail.com
      Telegram > @leadsupplier
      ICQ > 752822040

      Delete
  2. your Java concepts are really very well nice thus it is very well done and i got more interesting information it is very much useful too.


    cognos Training in Chennai

    ReplyDelete
  3. You can learn more about participation from our website.
    You can join, the applications are ongoing.
    online baccarat
    สูตรบาคาร่า
    sbobet

    ReplyDelete
  4. Hi Dear, A big thanks, You have shared a wonderful info which are helpful for us. Such a nice post!!!
    Coding Classes Singapore

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

    ReplyDelete
  6. Don’t hestiate to ask us something.
    We understand the need of providing and integral service tailored to any business. We also understand the big gap between high prices and low quality service.
    Call: 0452281980
    Visit: online marketing brisbane

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

    ReplyDelete
  8. Nice information, thanks for sharing...! Interested in the field of Big data and hadoop? Then this course is for you!
    This course has been designed by professional so that we can share our knowledge and help you learn complex theory, algorithms and coding. Big Data Training in Pune

    ReplyDelete
  9. AWS Training classes are available in all the Technogeeks. Most of the working professionals prefer to strengthen their skills in the field of Cloud Computing designed by Amazon. AWS Certification Training is an added advantage for your career growth. Technogeeks’s AWS training in Pune has been more successful in past few years.

    AWS Training in Pune

    ReplyDelete
  10. You got an extremely helpful website I actually have been here reading for regarding an hour. I’m an initiate and your success is incredibly a lot of a concept on behalf of me.
    Data Science training in Chennai
    Data science training in Bangalore
    Data science training in pune
    Data science online training
    Data Science Interview questions and answers
    Data science training in bangalore

    ReplyDelete
  11. Thanks for sharing the blog, seems to be interesting and informative too.
    marketing write for us

    ReplyDelete
  12. Awesome post.Java training in Abu Dhabi Thank u for sharing wonderful information keep it up

    ReplyDelete
  13. Nice article admin thanks for share your atricle keep share your knowledge i am waiting for your new post check mens winter jackets polo shirts kindly review and reply me

    ReplyDelete
  14. Are you facing error while sending the bitcoin from the Blockchain account? Bitcoin is the most popular coin among users and Blockchain provides the best platform for users for bitcoin-trading. If you are unable to carry forward the bitcoin sending process and needs solutions, you can always call on Blockchain phone number which is functional all Blockchain Support NUmber the time for help and the team is ready to assist you in every possible way. Contact the team who is always there to support you anytime for availing fruitful results.

    ReplyDelete
  15. Are you facing error while sending the bitcoin from the Blockchain account? Bitcoin is the most popular coin among users and Blockchain provides the best platform for users for bitcoin-trading. If you are unable to carry forward the bitcoin sending process and needs solutions, Blockchain Support NUmber you can always call on Blockchain phone number which is functional all the time for help and the team is ready to assist you in every possible way. Contact the team who is always there to support you anytime for availing fruitful results.

    ReplyDelete
  16. Thanks for sharing this My Package Tracking is providing all kind of tracking services.

    ReplyDelete
  17. What is a search engine?

    What is Linux and why it is used?

    What is RAM?

    Thanks for sharing this wonderful article. Keep going and If you want information about computers and IT, then go and see on my blog.

    ReplyDelete
  18. The Frenchie dog is one of the miniature dog breed. They’re alsoknown as the clown dog because of their fun-loving nature and some evencall them the ‘Frog dog’ because of their wide round heads and sittingposture.

    if you want more just look here "French Bulldog"

    ReplyDelete
  19. Nice article thanks for given this information. I hope it useful to many People
    Workday Online Training
    Workday Online Training Hyderabad

    ReplyDelete
  20. **SELLING SSN+DOB FULLZ**

    CONTACT 24/7
    Telegram > @leadsupplier
    ICQ > 752822040
    Email > leads.sellers1212@gmail.com

    >>1$ each without DL/ID number
    >>2$ each with DL
    >>5$ each for premium (also included relative info)

    Price will be reduce in Bulk order

    FORMAT OF LEADS/FULLZ/PROS

    ->FULL NAME
    ->SSN
    ->DATE OF BIRTH
    ->DRIVING LICENSE NUMBER WITH EXPIRY DATE
    ->COMPLETE ADDRESS
    ->PHONE NUMBER, EMAIL, I.P ADDRESS
    ->EMPLOYMENT DETAILS
    ->REALTIONSHIP DETAILS
    ->MORTGAGE INFO
    ->BANK ACCOUNT DETAILS

    >All Leads are Spammed & Verified.
    >Fresh spammed data of USA Credit Bureau
    >Good credit Scores, 700 minimum scores
    >Invalid info found, will be replaced.
    >Payment mode BTC, ETH, LTC, PayPal, USDT & PERFECT MONEY

    ''OTHER GADGETS PROVIDING''

    >SSN+DOB Fullz
    >CC with CVV
    >Photo ID's
    >Dead Fullz
    >Carding Tutorials
    >Hacking Tutorials
    >SMTP Linux Root
    >DUMPS with pins track 1 and 2
    >Sock Tools
    >Server I.P's
    >HQ Emails with passwords

    Contact 24/7

    Email > leads.sellers1212@gmail.com
    Telegram > @leadsupplier
    ICQ > 752822040

    ReplyDelete
  21. We have got the multi-level information for the latest technical support solution. So thanks for sharing your blog posting this is very helpful for me.
    UK Dedicated Server Hosting

    ReplyDelete
  22. Advanced Level Star Pattern Programs In Java
    Read Now

    ReplyDelete
  23. Thanks for providing me with that sensational information which will surely increase my knowledge and prove quite helpful.

    XANA Games

    ReplyDelete
  24. North America currently dominates the global aerospace coatings industry, and it is expected to continue to remain the leading regional market in the forecast period. The rise of commercial aviation in regional markets such as the United States of Canada and Canada is driving the regional aerospace coatings market
    ’s growth. The market growth in North America is also aided by the presence of major players in the region.

    Also Read :

    well testing services market , propyl gallate market , well testing services market

    ReplyDelete
  25. if you want more about information of computer keyboard than click link below
    What is keyboard in computer?

    ReplyDelete
  26. Thanks for your information blog, this is nice and helpful… Definitely going to share this article with your friends, thanks for sharing this blog article.
    Top 10 World Popular Sites

    ReplyDelete
  27. ys4043055
    ws6973125
    za0647480
    wl8338276
    xn3284956
    qq0802781
    aam5144851
    uv6943186
    wq7732003
    tp6029691
    vd2321764
    hx0694195
    xb5775395
    vd1388951
    tg8061140
    nd2532387
    bbl6649292
    byq8045994
    bhr1155358
    abk2308798
    vc1714426
    se2453489

    ReplyDelete
  28. We are providing fresh databases for fullz & Tools
    All stuff will be fresh, Genuine, Legit & Guaranteed
    Our team is available for you 24/7
    If you need anything regarding
    Hacking|Carding|Fullz|Tools|tutorials|Ebooks
    Just let us know
    we'll fulfill your demand in mins
    Contact Here

    Whats-app +92.317. 272.1122
    T-ele-gram/I.C.Q @killhacks
    Wickr or Skype @peeterhacks
    Mail exploit dot tools4u at gmail dot-com

    SSN fullz with DL info
    USA Pros with good credit scores
    Dumps with Pins/CC with CVV's

    Hacking tools & Tutorials
    S-pamming complete stuff with all tools
    CArding Methods of cashouts, transfers, cloning
    Mailers & RDP's
    Many other tools We can provide on demand
    Let us know what you need !

    ReplyDelete
  29. Thank you for your informative blog; it's lovely and useful. Thanks for sharing this great post; I will definitely forward it along to my friends.

    Best Software Development Company In Mohali

    Mobile App Development Company

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

    ReplyDelete
  31. hank you for your informative blog; it's lovely and useful. Thanks for sharing this great post; I will definitely forward it along to my friends.
    washer method calculator
    obs video
    how do you breed a shugabush
    bang browser
    hook vpn

    ReplyDelete
  32. I thoroughly enjoyed reading your post Thank you for sharing the information! Looking forward to more of your valuable insights.

    Top 10 Programming Languages to Learn for a Career in IT

    ReplyDelete