¿Que es el JRE? ¿y JDK?¿Que versión de Java tengo instalada? ¿Como instalo Java JDK?

¿Que es el JRE? ¿y JDK?¿Que versión de Java tengo instalada? ¿Como instalo Java JDK?

Que es JRE y JDK, y diferencias

Para poder simplemente ejecutar un programa en JAVA, necesitamos tener como mínimo el Java Runtime Environment (JRE) instalado. El JRE, solo nos permitirá ejecutar programas una vez compilados. Sería el software (programa) equivalente al programa de fotografía que nos permite abrir las fotos pero en el caso, el JRE ejecutará o muy entre comillas “abrirá” los programas de JAVA.

En el caso de querer desarrollar programas con Java, necesitaremos el JDK también conocido como Java Development Kit o en castellano Kit de Desarrollo de Java, que simplemente es un software (programa) que provee las herramientas de desarrollo para la creación de programas en Java.
A modo de curiosidad, además de JRE y JDK, tenemos el SDK Software Development Kit que es muy similar al JDK.

Nosotros instalaremos el JDK ya qué con el JRE solo podríamos ejecutar los programas una vez compilados y con extensión .class (¿Que qué? ¿Como? si os suena a chino, no so preocupéis ya qué lo veremos más adelante 🙂 )

Elementos del JRE

El JRE, está compuesto por la máquina virtual de Java también conocida por JVM o Java Virtual Machine, un conjunto de bibliotecas Java y algunos componentes necesarios para que una aplicación en Java pueda ser ejecutada.

JRE = JVM + bibliotecas Java + componentes

Elementos del JDK

El JDK, está compuesto principalmente por:

  • Appletviewer.exe: nos permite generar vistas previas visor de applets (pequeñas aplicaciones web). Necesitamos generar vistas previas debido a que al carecer de un método main no se puede ejecutar desde el programa de Java.
  • Javac.exe: el compilador que nos permitirá crear el archivo .class para más tarde ejecutarlo con la JVM de JAVA.
  • Java.exe: El intérprete de Java.
  • Javadoc.exe: nos permite generar la documentación de las clases que contiene un programa en Java.
  •  JRE al completo: Si instalamos JDK automáticamente tendremos instalado el JRE al completo (JVM, sus bibliotecas Java y sus componentes).

¿Tengo java instalado?

Antes de instalar Java, lo primero que deberemos saber es sí lo tenemos instalado en el sistema y qué versión la JDK o la JRE. En este artículo, lo vamos a  comprobar.

Para comprobar que versión tenemos instalada, podemos utilizar 4 maneras. Yo os aconsejo la primera debido a que el futuro primer programa lo compilaremos desde la línea de comandos (CMD). Además, nos permitirá saber que versión tenemos instalada (en el caso de que la tengamos) JRE o JDK.

1. Java -version CMD 

En Windows, pulsaremos la combinación de teclas Windows+R, escribiremos CMD (otra forma es ir a inicio y pulsar sobre ejecutar) y en la interfaz de comandos escribiremos:

Si tenemos instalado el JRE, utilizaremos el comando java y nos aparecerá:

Para testear si tenemos instalado el JDK, haremos un java -version (con un espacio entre java y -version) y no nos muestra la versión por lo tanto o tenemos un problema en la ruta  o no lo tienes instalado.

 



2. Comprobar si tenemos instalado JAVA desde Internet Explorer

Visitando https://www.java.com/es/ con Microsoft Explorer (OJO! NO con Microsoft Edge) y en caso de Mac con Safari. Y pulsamos sobre Tengo JavaAcepto. Continuar
Acordaos, de utilizar Internet Explorer y no Edge! Y también de pulsar sobre el link de usuarios de IE 11 (el de la flechita).Bien una vez llegados a esté punto, nos aparecerá un mensaje de alerta, pulsamos Más información y después sobre Permitir.Ahora esperaremos aproximadamente un minuto, en caso de no aparecer el desinstalador o bien no está instalado o no se ha podido ejecutar.

Una vez instalado, repetimos el proceso y podremos comprobar que la instalación se ha realizado correctamente:

3. Comprobar si tenemos JAVA desde el desinstalador de programas

Vamos a inicio panel de control y verificamos que no aparezca JAVA.En el caso que lo tengamos instalado nos aparecerá:

O también podemos ver si aparece en Panel de control > Programas > Java

4. Buscar la ruta en el sistema Operativo

Siempre que al instalar JDK o JRE seleccionemos la ruta por defecto, o una ruta que después nos sea fácil encontrar en el caso de ser personalizada, podemos encontrar las versiones instaladas. En este caso, yo tengo instalada jdk1.2.0_144 y jre1.8.0_144. Un detalle que no hemos comentado hasta el momento y que me parece bastante importante es que podemos tener varias versiones de JDK instaladas. Por ejemplo la versión jdk1.8.0_144 + jdk

Instalación de JDK

Para instalar JDK, debemos ir a Oracle concretamente al siguiente enlace: Oracle JDK descarga

Para saber la versión de Windows que tenemos y por lo tanto cual debemos descargar vamos a Equipo>Propiedades.

En mí caso, la versión que descargaré será la de Windows x64. Descargamos eso sí, aceptando las licencia, ya que sino no nos dejará.

Bien, una vez instalado podremos verificar que este todo OK y que podamos ejecutar los comandos desde el CMD. Tal y como vimos en los apartados anteriores. Ahora podemos decir, que ya tenemos todo instalado para empezar nuestra emocionante carrera como programadores. Good luck! 🙂


Configurar variables de entorno en Java: JAVA_HOME Y PATH

Para solucionar el problema vamos a equipo, propiedades y seleccionamos variables de entorno. Podemos elegir entre si la queremos para un usuario en concreto (solamente para el usuario en este caso David) o variables de sistema (para todos los usuarios.

Crearemos dos variables una de tipo JAVA_HOME con la ruta la instalacion del JDK y otra de tipo PATH con la ruta de la instalación del directorio BIN dentro de la carpeta JDK.

Una vez añadido el directorio de la instalación del JDK (carpeta bin) en mi caso C:\Program Files\Java\jdk1.8.0_144\bin testeamos de nuevo el comando java – version:

O también podemos comprobarlo con un javac:

Si os fijáis, si ahora hacemos un javac -versión nos mostrará la versión del compilador que tenemos. Y con java_home la ruta donde tenemos instalado el JDK.

65 comentarios

  1. Muchas gracias! Me ha servido de maravillas.
    Funciona!!
    He estado usando Dr.Java en mi curso, pero el botón de Javadoc no funcionaba, estaba como deshabilitada. Luego de tantas vueltas me tomó mucho llegar hasta aquí y estaba perdiendo las esperanzas pero, una vez hecho lo que explicas aquí y tras haber reiniciado mi pc, ya lo puedo usar y funciona de maravillas!!

    Te agradezco mucho y te felicito por este tutorial tan bien explicado y súper útil incluso para los primerizos como yo! 😀

  2. puedo instalar solo el JDK o tienen que instalarse los dos , el JDK Y EL JRE ?

    • admin

      4 mayo, 2019 a las 21:39

      Buenas Ramon, instalando el JDK, ya podemos utilizar el JRE y la JVM. De hecho, en el artículo hay una imagen que lo muestra. Un saludo

  3. Buenas noches, quiero saber cual es la diferencia y/o conveniencia de escoger entre los jdk 8, 9, 10, 11, etc cual me conviene mas instalar y porque y cual es el beneficio en cada uno. Muchas gracias de antemano

    • admin

      19 noviembre, 2019 a las 14:01

      Buenas tardes Alejandro,

      Conforme va pasando el tiempo, los lenguajes van evolucionando y surgen nuevas necesidades a cubrir, por ello, se van añadiendo nuevos aspectos/maneras de realizar las cosas que satisfacen dichas necesidades.
      El tener una versión de JDK reciente, se traducirá en tener la posibilidad de hacer las cosas de una forma más actual, que normalmente se traduce en menos tiempo picando código, en cambio, el tener una versión menos reciente se traduce en tener una compatibilidad menor con las nuevas funcionalidades que se han ido añadiendo en las últimas versiones.
      Espero que te haya quedado claro, en caso contrario puedes comentármelo.

      Un saludo,
      David

  4. admin

    25 diciembre, 2019 a las 13:51

    Muchas gracias Mireia. Un saludo 🙂

  5. Greetings! Very useful advice in this particular article!
    It is the little changes that produce the most significant
    changes. Thanks a lot for sharing!

  6. Thanks for one’s marvelous posting! I definitely enjoyed reading it, you are a great author.
    I will be sure to bookmark your blog and will eventually come back later in life.
    I want to encourage yourself to continue your
    great job, have a nice evening!

  7. After I initially left a comment I seem to have clicked on the -Notify me
    when new comments are added- checkbox and now whenever a comment is added I receive 4 emails with the exact same
    comment. There has to be an easy method you can remove me from that service?

    Kudos!

    Here is my blog post :: Arctos Portable AC Review (vip5.moisait2021.ru)

  8. Hello, I log on to your blogs daily. Your story-telling style is awesome, keep up the
    good work!

    my website; Modern Belle Review

  9. Howdy! I know this is kinda off topic nevertheless I’d figured I’d ask.
    Would you be interested in trading links or
    maybe guest writing a blog article or vice-versa?
    My website covers a lot of the same topics as yours and I think we could greatly benefit from
    each other. If you are interested feel free to send me an email.
    I look forward to hearing from you! Awesome blog by the way!

    Here is my website; Modern Belle Cream

  10. This site is my aspiration, rattling wonderful design and Perfect
    content material.

    My page; SynoGut Side Effects (http://www.hltkd.tw)

  11. Hello there! This article couldn’t be written any
    better! Looking at this article reminds me of my previous roommate!
    He always kept preaching about this. I am going to send this information to him.
    Pretty sure he’ll have a good read. Thanks for sharing!

    My site – Far East XL

  12. Thanks, I have just been searching for information approximately this subject for a while and yours is the best I’ve came upon so far.

    However, what about the conclusion? Are you sure about the supply?

    My site – Infinuity CBD Gummies (http://www.fles.hlc.edu.tw)

  13. I’m impressed, I have to admit. Seldom do I come across a blog that’s equally educative and entertaining, and without
    a doubt, you’ve hit the nail on the head. The problem is something that not enough men and women are speaking intelligently about.
    I am very happy I stumbled across this in my
    hunt for something regarding this.

  14. Thank you for sharing with us, I conceive this website genuinely stands out :D.

    My blog post: NeoBio Keto

  15. Oh my goodness! Impressive article dude! Many
    thanks, However I am encountering troubles with your RSS.
    I don?t know why I can’t subscribe to it. Is there anybody
    else having identical RSS issues? Anyone who
    knows the answer can you kindly respond? Thanks!!

    My web-site – Wawza Apple Cider Vinegar Review

  16. I feel that is among the so much important info for
    me. And i am satisfied studying your article. But want to remark on some
    general things, The site taste is perfect,
    the articles is really nice : D. Excellent
    job, cheers

    Feel free to surf to my webpage – Yec Keto

  17. Good day! I know this is kind of off topic but I was wondering if you knew where
    I could find a captcha plugin for my comment form? I’m using the same blog platform
    as yours and I’m having trouble finding one? Thanks a lot!

    My blog post – Luiresse Skin Reviews

  18. I like the helpful info you supply to your articles.

    I’ll bookmark your blog and check again right
    here frequently. I’m moderately certain I’ll be informed many new stuff proper right here!
    Best of luck for the following!

    Check out my webpage; Pure Keto Burn Review

  19. It’s a pity you don’t have a donate button! I’d certainly donate to this excellent blog!
    I guess for now i’ll settle for book-marking and adding your RSS feed to my
    Google account. I look forward to new updates and will talk about
    this site with my Facebook group. Chat soon!

  20. We wish to thank you yet again for the gorgeous ideas you offered Jesse when preparing her own post-graduate research and, most
    importantly, with regard to providing each of the ideas in a single blog post.
    If we had been aware of your site a year ago, we’d have been saved the useless measures we were having to take.
    Thank you very much.

    Also visit my homepage: Viking XL Keto Reviews (http://www.koan.at)

  21. Very good info. Lucky me I ran across your website by chance (stumbleupon).
    I have saved it for later!

    Also visit my web-site: IceHouse Portable AC Reviews

  22. I wanted to thank you for this excellent read!!
    I absolutely enjoyed every bit of it. I have you book-marked to check out new stuff you
    post?

    my homepage – Infinuity CBD Gummies (http://novogorskpark.ru)

  23. What’s up to every body, it’s my first visit of this website;
    this blog consists of awesome and in fact excellent information in favor
    of visitors.

    my blog: BioShed Keto

  24. I think this website has got very superb written subject matter articles.

    Have a look at my webpage; Wawza Apple Cider Vinegar

  25. WOW just what I was looking for. Came here by searching
    for natural treatment for eczema

    Also visit my web page :: Insights CBD

  26. Hi, i think that i noticed you visited my blog thus i came to return the prefer?.I’m attempting to in finding issues to enhance my site!I
    assume its adequate to make use of some of your ideas!!

    Look into my web site Hydrofirm Review

  27. Right here is the perfect blog for everyone who would like
    to find out about this topic. You realize so much its almost tough to argue with you (not that I really will need to?HaHa).
    You definitely put a fresh spin on a subject that
    has been discussed for many years. Excellent stuff, just
    great!

    Have a look at my website; Vigor Max Male Enhancement

  28. Magnificent beat ! I would like to apprentice whilst you amend your
    web site, how could i subscribe for a blog site? The account
    helped me a acceptable deal. I had been a little
    bit acquainted of this your broadcast provided shiny clear concept

  29. Thank you for your site post. Thomas and I have been saving to buy a new e-book on this subject and your blog post has made us
    to save the money. Your thoughts really responded to all our queries.
    In fact, above what we had thought of ahead of the time we found your superb blog.
    We no longer have doubts and a troubled mind because you have attended to our own needs in this post.
    Thanks

    My web blog :: Eagle Hemp CBD Gummies Reviews

  30. It?s hard to find well-informed people about this subject, but you seem like you know what you?re talking about!
    Thanks

    Feel free to visit my website … Infinuity CBD Gummies Review

  31. Enjoyed looking at this, very good stuff, regards.

    my homepage :: TetraMale

  32. You need to be a part of a contest for one of the most useful sites on the internet.
    I will highly recommend this site!

    Also visit my web blog; Biodermeux Anti Wrinkle Cream Reviews

  33. I got what you intend,saved to bookmarks, very nice web site.

    Also visit my blog: Your Essential Care Keto

  34. Thanks for sharing your thoughts about drug abuse statistics.

    Regards

    my web-site – Niva CBD

  35. Great web site. Plenty of useful information here.
    I’m sending it to several buddies ans also sharing in delicious.
    And of course, thanks for your effort!

  36. I just like the valuable information you provide on your articles.
    I will bookmark your weblog and take a look at once more
    right here frequently. I’m quite sure I’ll be told many new stuff right right here!
    Good luck for the next!

    My page … Ketorol Reviews (http://www.meteoritegarden.com/)

  37. We would like to thank you yet again for the
    stunning ideas you offered Jeremy when preparing a post-graduate research
    as well as, most importantly, for providing every one of the ideas in one blog post.
    If we had known of your blog a year ago, we may have been saved the unnecessary measures we were implementing.

    Thank you very much.

    Also visit my web blog … Green CBD Gummies Review

  38. Just wish to say your article is as astonishing.
    The clearness in your post is simply cool and i could assume you’re
    an expert on this subject. Well with your permission let me to grab
    your feed to keep updated with forthcoming post. Thanks a
    million and please keep up the enjoyable work.

    Review my webpage – Luiresse Review (http://www.wizardhardware.com)

  39. Fabulous, what a website it is! This weblog gives useful facts to us,
    keep it up.

  40. Greetings from Los angeles! I’m bored to tears at work so I
    decided to browse your blog on my iphone during lunch break.
    I love the information you provide here and can’t wait to take a look when I get
    home. I’m surprised at how fast your blog loaded on my phone ..
    I’m not even using WIFI, just 3G .. Anyhow, great site!

    Feel free to visit my blog :: Eagle CBD Gummies Reviews

  41. I really like your writing style, great info, regards for posting
    :D.

    Here is my web page :: http://kanmoulue.com

  42. It’s genuinely very complicated in this full of activity
    life to listen news on TV, thus I only use internet
    for that reason, and obtain the most recent news.

    Review my homepage – Pure Keto Burn Pills

  43. This post offers clear idea for the new visitors of blogging, that truly
    how to do running a blog.

    my page; True Keto 1800 Reviews

  44. I visited several web sites however the audio feature for audio songs current
    at this web site is actually fabulous.

    my blog :: Optimum Keto Review (http://www.meteoritegarden.com/userinfo.php?uid=2852434)

  45. There is apparently a bunch to realize about this.

    I feel you made certain good points in features also.

    Feel free to visit my website :: Insights CBD Gummies

  46. I’m impressed, I must say. Rarely do I come
    across a blog that’s both equally educative and interesting, and without a doubt,
    you’ve hit the nail on the head. The issue is something which too few men and women are speaking intelligently about.
    Now i’m very happy I came across this during my hunt for something
    regarding this.

    My page … shihan.com.ru

  47. Great article! We are linking to this particularly great
    article on our website. Keep up the good writing.

    My web page … Luiresse Skin Cream

  48. I went over this site and I conceive you have a lot of excellent info, bookmarked (:
    .

    Feel free to visit my site; Primiene Skin Care

  49. I needed to thank you for this good read!! I certainly enjoyed every little
    bit of it. I’ve got you book-marked to check out new things
    you post…

    Also visit my web-site; Primiene Reviews

  50. Hello! This post could not be written any better!
    Reading through this post reminds me of my old room mate! He always kept chatting about this.
    I will forward this write-up to him. Fairly certain he will have a good read.
    Many thanks for sharing!

    Also visit my web blog … Optimum Keto Pills (http://www.fles.hlc.edu.tw)

  51. Whoah this weblog is excellent i love reading
    your posts. Stay up the good work! You already know, a
    lot of people are searching around for this info,
    you could aid them greatly.

    Stop by my page :: Natural Burn Keto Reviews

  52. It’s an remarkable article in support of all the online visitors; they will obtain benefit
    from it I am sure.

    My web-site :: Far East XL Male Enhancement Ingredients

  53. Way cool! Some very valid points! I appreciate you writing this
    write-up plus the rest of the website is really good.

    Take a look at my web-site … Biodermeux

  54. whoah this weblog is fantastic i love studying your articles.
    Stay up the good work! You recognize, a lot of individuals
    are hunting around for this information, you could help
    them greatly.

    my site – Viking XL Keto Reviews

  55. Excellent blog! Do you have any recommendations for aspiring writers?
    I’m planning to start my own site soon but I’m a little lost on everything.

    Would you advise starting with a free platform like
    Wordpress or go for a paid option? There are so many choices out there that I’m totally confused ..
    Any ideas? Cheers!

    Look at my webpage :: Aizen Power Pills (https://mycte.net/bb/index.php?action=profile;u=151438)

  56. I like this internet site because so much
    utile stuff on here :D.

    Also visit my blog; Amellia Skin Cream

  57. Hiya, I’m really glad I’ve found this information. Nowadays bloggers publish just about gossips and net and this is really
    annoying. A good website with exciting content, that’s
    what I need. Thanks for keeping this web-site, I’ll be visiting it.
    Do you do newsletters? Can not find it.

    Here is my blog – Keto LeanX

  58. Hi my family member! I wish to say that this article is amazing, nice written and come with approximately all significant infos.

    I’d like to look more posts like this .

    my website … http://www.koan.at

  59. Can I just say what a relief to discover a person that truly understands what they are discussing on the net.
    You certainly know how to bring an issue to light and make it important.
    More and more people need to look at this and understand this
    side of the story. I was surprised that you’re not more popular because you most certainly possess the gift.

    Here is my web-site – Ilok Air Portable AC Reviews

  60. Hello very cool site!! Man .. Beautiful .. Wonderful ..

    I’ll bookmark your website and take the feeds additionally?I’m satisfied to search out numerous useful
    info right here within the submit, we’d like work out more strategies on this regard, thank
    you for sharing.

    Take a look at my page; Far East XL Ingredients

  61. I have been exploring for a little bit for any high
    quality articles or blog posts in this sort of area . Exploring in Yahoo I
    at last stumbled upon this site. Reading this info
    So i’m glad to express that I have a very good uncanny feeling
    I discovered just what I needed. I such a lot certainly will make sure
    to don?t fail to remember this site and give it a look regularly.

    Also visit my blog; polywebhost.com

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

La Ley 34/2002 nos obliga a avisarte de que usamos cookies propias y de terceros con objetivos estadísticos y de sesión y para mostrarte la 'publi' que nos da de comer. Tranquilo, este mensaje solo sale una vez. Más información

Java desde 0 comunica a los usuarios, a través de este aviso, que puede utilizar cookies cuando el usuario navega por las diferentes pantallas y páginas del sitio. Durante el uso de nuestra página Web usted acepta y autoriza expresamente el uso de cookies, de acuerdo con nuestra Política de Privacidad. Este sitio web utiliza las siguientes cookies propias: - Cookies de sesión, para garantizar que los usuarios que escriban comentarios en el blog sean humanos y no aplicaciones automatizadas. De esta forma se combate el spam. Este sitio web utiliza las siguientes cookies de terceros: - Google AdManager y AdSense: Utiliza cookies para mejorar la publicidad. Entre otros fines, suelen utilizarse para segmentarla según el contenido que sea relevante para los usuarios o su ubicación, mejorar los informes de rendimiento de las campañas y evitar mostrar anuncios que los usuarios ya hayan visto. Las cookies no contienen información personal identificable. Consulta cómo utiliza Google la información de sitios web o aplicaciones. y cómo bloquear determinados anuncios. - Google Analytics: Almacena cookies para poder elaborar estadísticas sobre el tráfico y volumen de visitas de esta web. Al utilizar este sitio web está consintiendo el tratamiento de información acerca de usted por Google. Por tanto, el ejercicio de cualquier derecho en este sentido deberá hacerlo comunicando directamente con Google. - Redes sociales: Cada red social utiliza sus propias cookies para que usted pueda pinchar en botones del tipo Me gusta o Compartir.

Cerrar