Saturday, 19 January 2013

Java standalone application on Eclipse

Java standalone application would be the easiest one to start when learning the language. We will print "Hello World" text on the console as the first step.

Java standalone applications should have at least a class with main method, in the right signature. This is the first method that will take the handle of the application when called by Java Virtual Machine. Here we go.

  1. On your Eclipse IDE, click on File > New > Project.
  2. Choose Java > Java Project and click Next.
  3. Key in the project name and click Finish.
  4. From the Package Explorer, right click and create new Class.
  5. Name your new Class. If you need to place the new Class in a package, fill-in the package name. Since this is your Main class, you can check "public static void main(String[] args)" under "Which method stubs would you like to create?". I would not select this option now.
  6. You will find your Main class being opened in the editor. You can type the entire signature of the main method or just type main, then use Ctrl + Space to show the proposed templates and choose main method to generate the main method.
  7. Type the statement to print "Hello World" statement on the output stream. That is, System.out.println("Hello World");. The template way to type the statement is sysout and using Ctrl + Space.
  8. Format the code snippet using Source > Format or Ctrl + Shift + F and save the file.
  9. Right-click on the project or the class and use Run As > Java Application to run the file.
  10. See the console. If console could not be found, select to show it from Window menu.

45 comments:

  1. Apart from its cross-platform benefits, it is also efficient, secure, and portable, making it invaluable to developers.javascript forum

    ReplyDelete
  2. http://webtrackker.com/Best-Artificial-Intelligence-Training-institute-in-Noida.php

    ReplyDelete

  3. Best Solidworks training institute in noida

    SolidWorks is a solid modeling computer-aided design (CAD) and computer-aided engineering (CAE) computer program that runs on Microsoft Windows. SolidWorks is published by Dassault Systems. Solid Works: well, it is purely a product to design machines. But, of course, there are other applications, like aerospace, automobile, consumer products, etc. Much user friendly than the former one, in terms of modeling, editing designs, creating mechanisms, etc.
    Solid Works is a Middle level, Main stream software with focus on Product development & this software is aimed at Small scale & Middle level Companies whose interest is to have a reasonably priced CAD system which can support their product development needs and at the same time helps them get their product market faster.

    Company Address:
    WEBTRACKKER TECHNOLOGY (P) LTD.
    C-67,Sector-63,Noida,India.
    E-mail: info@webtracker.com
    Phone No: 0120-4330760 ,+91-880-282-0025

    webtrackker.com/solidworks-training-Course-institute-in-noida-delhi

    ReplyDelete
  4. Data science Training Institute in Noida

    Webtrackker Data science Training Institute in Noida Accelerate your career in data science by starting from basics in Statistics, Data Management and Analytics to advanced topics like Neural Networks, Machine Learning and Big Data.



    http://webtrackker.com/Best-Data-Science-Training-Institute-in-Noida.php



    Data science Training Institute in Noida

    OUR OTHER COURCES

    SAS Training center in Delhi


    Best Software Testing Training Institute in delhi

    Best Salesforce Training Institute in delhi

    Best Python Training Institute in delhi



    ReplyDelete
  5. 3D Animation Training in Noida

    Best institute for 3d Animation and Multimedia

    Best institute for 3d Animation Course training Classes in Noida- webtrackker Is providing the 3d Animation and Multimedia training in noida with 100% placement supports. for more call - 8802820025.

    3D Animation Training in Noida

    Company Address:

    Webtrackker Technology

    C- 67, Sector- 63, Noida

    Phone: 01204330760, 8802820025

    Email: info@webtrackker.com

    Website: http://webtrackker.com/Best-institute-3dAnimation-Multimedia-Course-training-Classes-in-Noida.php

    ReplyDelete
  6. Graphics designing training institute in Noida
    Best Graphics training institute in Noida, Graphic Designing Course, classes in Noida- webtrackker is providing the graphics training in Noida with 100% placement supports. If you are looking for the Best Graphics designing training institute in Noida For more call - 8802820025.

    Graphics designing training institute in Noida, Graphics designing training in Noida, Graphics designing course in Noida, Graphics designing training center in Noida

    Company address:
    Webtrackker Technology
    C- 67, Sector- 63, Noida
    Phone: 01204330760, 8802820025
    Email: info@webtrackker.com
    Website: http://webtrackker.com/Best-institute-for-Graphic-Designing-training-course-in-noida.php

    ReplyDelete
  7. Latest News in Hindi

    Latest News in Hindi- Hindustan channel is the best online web portal in india where you read the all latest indian news in hindi. if you are looking the Latest News in Hindi, live news channel, hindi news channel, live news channels in hindi, live hindi channels then hindustan channel is best for you.
    Latest News in Hindi

    Company address:
    C- 67, Sector- 63, Noida
    Phone: 01204330760, 8802820025


    URL: https://hindustanchannel.com

    ReplyDelete
  8. Very interesting content which helps me to get the indepth knowledge about the technology. To know more details about the course visit this website.
    JAVA Training in Chennai
    core Java training in chennai
    JAVA Training in Chennai
    Best JAVA Training in Chennai

    ReplyDelete
  9. Thanks for your post which gather more knowledge about this topic. I read your blog everytime which is helpful and effective.
    Digital marketing training in chennai
    Digital marketing course in chennai
    SEO training in chennai

    ReplyDelete
  10. Nice to read the article which you posted lastly, its helpful to enhance my knowledge as well as for my career
    SEO training in velachery
    SEO training in anna nagar
    SEO course in chennai
    SEO training in porur
    SEO training in tambaram

    ReplyDelete
  11. Oh, that's Great Post Thanks for sharing with us. This python training in Bangalore Platform helped me to learn advanced concepts of all the trending technologies out there in the current IT market. really worth trying them.

    ReplyDelete
  12. thank for posting amazing info abou the java if your looking for selenium or big data courses you can checkout our links.Very well written article thanks for posting this amazing article with us keep growing and keep hustling
    Selenium course in chennai
    best selenium training institute in chennai
    best selenium training in chennai
    selenium training in chennai omr
    selenium training in omr
    big data course in chennai
    big data hadoop training in chennai
    big data analytics courses in chennai

    ReplyDelete

  13. Great post.I really liked you article,your writing style is simply awesome with useful information. Best python certification course in Bangalore is offering Python training with 100% Placement assistance.Get certification under certified experts

    ReplyDelete
  14. Very impressive and informative data,
    Thanks for sharing with us,
    We are again come on your website,
    Thanks and good day,
    Please visit our site,
    buylogo

    ReplyDelete

  15. Thanks of sharing this post…Python is the fastest growing language that helps to get your dream job in a developing area. It says every fundamental in a programming, so if you want to become an expertise in python get some training






    Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery

    ReplyDelete
  16. I like the helpful info you supply in your articles. I’ll bookmark your weblog and take a look at once more here regularly. I am relatively certain I will learn a lot of new stuff right here! Good luck for the following!
    angular js training in chennai

    angular js training in velachery

    full stack training in chennai

    full stack training in velachery

    php training in chennai

    php training in velachery

    photoshop training in chennai

    photoshop training in velachery

    ReplyDelete

  17. It is very beneficial information for me, I am really impressed. This is a very nice article and continues sharing with us…
    MVC Training in Chennai
    Inplant Training in Chennai
    Soft Skills Training in Chennai
    JMeter Training in Chennai
    Appium Training in Chennai

    ReplyDelete
  18. Nice blog. I finally found great post here Very interesting to read this article and very pleased to find this site. Great work!

    Java Training in Chennai

    Java Course in Chennai

    ReplyDelete
  19. Getting into Integrated Marketing is tough if you don’t have thorough knowledge. Then why not join Talentedge, the first ed-tech platform that has joined hands with XLRI and MICA to provide the best courses to the students.

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

    ReplyDelete
  21. Good blog,

    Digital Marketing, Digital Marketing Online Training, Digital Marketing Training Programs, Women Entrepreneurship, Women Entrepreneurship Training Programs, Digital marketing online video course, Women Entrepreneurship Online Certification Course, Business coaching, Training for Business owners, Business coaching for women, young entrepreneurs training

    https://www.eminentdigitalacademy.com

    ReplyDelete
  22. I feel good about your share.
    It's very helpful for me and I am so happy to see your blog.
    Thank you for sharing it with us.
    Law essay help

    ReplyDelete
  23. Nice blog post so thanks a lot for sharing this great blog post.. keep more post for sharing.. have a nice day.
    Apply for Super Visa Canada

    ReplyDelete
  24. The Latest Mount and Blade Warband 2022 Crack is the standalone expansion pack to the strategy action playing game. Website

    ReplyDelete
  25. SiSoftware Sandra 31.93 crack is highlights the foremost vital acknowledged and unreported facts. This allows you to be told relating to. SiSoftware Sandra crack

    ReplyDelete
  26. Good morning Wishes quote on the pillow wedge and apply one of his desired cologne around the mattress therefore he is able to get up with a adorable smell that is going to be a wonderful second of his existence. Love MSG For Husband

    ReplyDelete