• 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

Installing Java

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i was following the instructions in a book titled 'Head First Java' book to install Java on my home machine.

I went to java.sun.com and downloaded the latest JDK that included NetBeans, which was Java6 update 11. It downloaded fine but when i went to install it, the installation bar goes up to 90% then it says 'Cancelling, rolling back installation' and the installation bar starts going backwards.

Once it goes back to 0% it says "Installation of JDK6u11 was not completed" and i dont have any choice but to exit the installation.

Why is this happening?

I reasoned that it might be because i already have Java6u12 on my system, but i need the kit to install so i can get all of the modules in NetBeans to work (when i run netbeans i get told im missing file paths and some modules were unable to load).

Also the textbook i am using stated that once ive installed java i need to add an entry to my PATH environment variable that points to the /bin directory inside the main java directory.

Where do i find this PATH variable and how do i add my /bin directory to it?

My path (when i get the JDK to install) is C:\Program Files (x86)\Java\jdk1.6.0_11

Im running windows vista.
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch
If you really are a beginner, please don't use NetBeans or other IDEs; use a decent text editor (eg NotePad++, NotePad2, JEdit) and the command line. Otherwise you spend so much time learning the IDE that you don't learn the Java.

If you already have jdk6u12, why not use that?

The PATH tells the computer where the "java" or "javac" files are when you invoke them from the command line. There are instructions for setting it in this "problems" link. Most probably here; do what it says for permanent setting (until you next install Java). Note the PATH entry usually begins with C and ends with bin, so you might simply have an incorrect entry. What you quoted would require C:\Program Files (x86)\Java\jdk1.6.0_11\bin as an entry.

Does the name of your folder really have (x86) in?
 
Campbell Ritchie
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And please confirm that is your real name.
 
Charlie Murphy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Welcome to JavaRanch

Does the name of your folder really have (x86) in?



Hi thanks for your reply.

Ya its 64-bit vista so it has 2 program files directories - one which gets used and one which doesnt. The one that gets used has (x86) appended on the end of it. More typing but i got over it

Your reply pointed me in the right direction and after fumbling around the internet and my computer for a few hours i managed to get everything working!

Turns out by uninstalling all other versions of Java on my system (including update 12) i was able to install update 11 and netbeans with no hassle. Netbeans no longer gives me error messages.

Its obvious that Netbeans is targeted at large scale projects so i took your advice and installed Notepad2. What a great little program - Everything i need + i overwrote windows notepad with this one so everything opens in Notepad2!

re: the PATH issue - my little coder self thought that entering a variable name to go with the directory meant thinking of a name that followed good coding conventions. So after much thought i named the variable name 'Java'. Turns out it wants the name of the actual PATH variable so i went back and changed the name of the variable to 'Path' and now i can compile and run programs from the command line

ps. whats wrong with my name lol (other than the fact my friends always want to sing the end to that beck song whenever i do something amusing 'Thats beautiful John'...)
 
Campbell Ritchie
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
John von Neumann was one of the original inventors of the computer. He discovered the concept of having input devices, output, memory, RAM and a processor.

And well done getting it to work. Now you just have to find your next problem . . .
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Note that we have a naming policy on JavaRanch. Your name "John Von Neumann" sounds obviously fake (it's the name of a famous person in computer science), and is therefore not allowed - unless you prove that this is your real name.

Please read the naming policy carefully and change your display name.

Note that we take the naming policy seriously, and if you don't change your name a moderator might lock your account.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I signed the JavaRanch to know ho to work with Java language, but as Charlie Murphy, i coudn't execute the codes that i'm learning in Head First Java, in portuguese, language that i speek, named "Use a Cabeça! Java".
Can anyone help me?
I configured the PATH including the directory that's Java was installed but it doesn't works.
 
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check errors in the installation log, the log should be located in the directory from which you started the installer.
Check error messages in the windows event viewer.
Try to download and install simple JDK without Netbeans, if you need Netbeans then download it directly from Netbeans home page
-as I remember, the JDK distribution with Netbeans contains in addition the GlassFish database and Tomcat server,
you don't need this stufff, and there could be some errors related to Tomcat/GlassFish, not the JDK itself.
 
Campbell Ritchie
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch ( ) Felipe Lopes. What sort of error messages are you getting?
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which operating system are you using, and did you follow the installation instructions for the JDK?

Note that you need to close and re-open the command prompt window on Windows, otherwise setting the PATH in the properties of My Computer has no effect. What error messages are you getting? Is your PATH set correctly? Try this in a command prompt window and tell us the output:

echo %PATH%
 
Felipe Lopes
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, i installed JDK again and configured the variable path, now it works.
Java didn't run cause the way in path was writed in portuguese and the correctly form is in english.
Thanks
By the way, anyone has an exemple of code to show me?
 
Felipe Lopes
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, can I execute a java program out of folder which contains it?
 
reply
    Bookmark Topic Watch Topic
  • New Topic