Which do i click?
For whatever reason when i go to download java jdk i dont get the same thing on my screen as seen in videos on youtube, after i accept i get this list..
Linux x86 - RPM Installer 76.93 MB jdk-6u26-linux-i586-rpm.bin
Linux x86 - Self Extracting Installer 81.20 MB jdk-6u26-linux-i586.bin
Linux Intel Itanium - RPM Installer 60.25 MB jdk-6u26-linux-ia64-rpm.bin
Linux Intel Itanium - Self Extracting Installer 67.92 MB jdk-6u26-linux-ia64.bin
Linux x64 - RPM Installer 77.15 MB jdk-6u26-linux-x64-rpm.bin
Linux x64 - Self Extracting Installer 81.45 MB jdk-6u26-linux-x64.bin
Solaris x86 - Self Extracting Binary 81.08 MB jdk-6u26-solaris-i586.sh
Solaris x86 - Packages - tar.Z 136.89 MB jdk-6u26-solaris-i586.tar.Z
Solaris SPARC - Self Extracting Binary 86.05 MB jdk-6u26-solaris-sparc.sh
Solaris SPARC - Packages - tar.Z 141.37 MB jdk-6u26-solaris-sparc.tar.Z
Solaris SPARC 64-bit - Self Extracting Binary 12.24 MB jdk-6u26-solaris-sparcv9.sh
Solaris SPARC 64-bit - Packages - tar.Z 15.58 MB jdk-6u26-solaris-sparcv9.tar.Z
Solaris x64 - Self Extracting Binary 8.50 MB jdk-6u26-solaris-x64.sh
Solaris x64 - Packages - tar.Z 12.24 MB jdk-6u26-solaris-x64.tar.Z
Windows x86 76.81 MB jdk-6u26-windows-i586.exe
Windows Intel Itanium 63.32 MB jdk-6u26-windows-ia64.exe
Windows x64 67.42 MB jdk-6u26-windows-x64.exe
I have no idea what these things mean, i clicked the top one and i list of code came up and pretty much crashed my computer. I just want to download it so i can get started with the tutorials on youtube.
I have a problem though, im trying to run a hello world program, im saving it in a folder on my desktop, so i go to my command prompt, i type cd desktop, then dir, then cd java (the folder name), dir, then i type javac youtube.java (the file name) and it just stays in the java folder so there's no class. What have i done wrong? the way i saved it maybe?
So let me get this path right.
You have: %SYSTEMDRIVE%\Users\{YOURUSER}\Desktop\Java\youtube.java correct?
Use:
Code:
> cd %SYSTEMDRIVE%\Users\{YOURUSER}\Desktop
> javac Java\youtube.java
And post back if that works. That path I derived from a server 2008 filesystem, but I'm pretty sure its the same path as used in Vista.
Oh also there is something else I just thought of. Before trying the above, you can try a simple:
Code:
> javac /?
Does that provide the help guide or say it cannot find the program javac? I recall this on my windows 7 installation, the javac was not registered against the system path. If this is the case, you can either register it to the system path (I wouldn't, the version of the java in use determines what path it uses, so you have something like C:\Program Files\java\jdk_x_x_x to indicate the version). So my recommendation here would be to attach to the java path and execute the full compile path instead. So navigate the command line to the program files\java and find the jdk (called jdk_1.6.0_26 I believe it will be for you), and enter the ./bin from there. This is where javac is. You can then call javac on the command line and enter the full path. The same can be done the other way as well, so it doesn't really matter which way you go.
Consider getting an IDE in the future as well. Learning javac is an important part of Java programming, but I haven't needed to manually call a javac in a long time as the IDE executes the javac when I export it from eclipse.
IDE = Integrated Development Environment.
Eclipse is a multi-language IDE. Which is why I use it, I do both my PHP and Java work in it, but I do not use it for C# or C (which is what I have visual studio for).