Question:
Learnin Java Programming?
2013-07-08 01:56:15 UTC
For almost half a year now i've been researching java Programming. It feels like am going nowhere. I'm only a beginner but i find it very hard to learn. Till now i've only learn how to compile and run a program in Netbeans. I tried doing it from the command line but it seems i don't have a classpath set on my desktop win7 pc. I don't know how to set a classpath. Can anyone help me to learn Java programming easier. Am only 16 years old and i want to learn programming now because i'm still deciding on a career. I don't want to find out oneday that i've made a mistake. But i really like computers and am very eager to learn programming.
Three answers:
AnalProgrammer
2013-07-08 02:09:48 UTC
Book mark this page for common problems, plus your classpath problem.

http://docs.oracle.com/javase/tutorial/getStarted/problems/index.html



Java tutorial. Click on Getting Started

http://docs.oracle.com/javase/tutorial/



Java problems

http://codingbat.com/



When you compile a program in Netbeans there will be some text that tells you how to run the program on the command line.



Have fun.
?
2013-07-08 09:20:17 UTC
The Yahoo Community has plenty of avid programmers, happy to help you with programming as and when you get confused. Hence you post what you have done so far, and explain the issue you wish to resolve.



Online of course there are numerous Blogs, websites, etcetera with Java Tutorials written for people wanting to learn Java. Just Google: "Java Tutorial online"



In the meanwhile it seems you are struggling with the classpath and path environment variables, so let's get that working.





For this example I will pretend:

> you downloaded a Java Development Kit (JDK) and installed it

> the version was 1.7.0

> It is a 32-bit version and is being installed on Windows 7 32-bit OS



To set up the environment variables do the following:



1. Click Start | then RIGHT click on Computer and select "Properties"



2. In window that opens, on left pane click the link: "Advanced System Settings"



3. In window that opens click on the "Environment Variables . . ." button



4. In the LOWER half of window that opens click on the "New" button



5. In the popup window enter the following:



> Next to "Variable Name:" type   PATH

> Next to "Variable Value:" type   .;C:\Program Files\Java\JDK1.7.0\bin



Note!!! If anything else in present in that second line, place the above to the left of that information then add a semicolon [;] after bin



6. Now click OK



7. Next in LOWER half of window click on CLASSPATH to highlight it, then click EDIT button



8. Next to "Variable Value:" type   .;C:\Program Files\Java\JDK1.7.0\bin



Note!!! If anything else in present in that second line, place the above to the left of that information then add a semicolon [;] after bin



9. Click OK, then OK again, then OK again.



All done!!! Your environment variables are now set up and you ought to be able to use the Command Prompt window to compile and run programs if you so choose to.



Notes:

---------



If your Windows 7 is infact a 64-bit OS, but you installed a 32-bit JDK package, then for both the PATH and CLASSPATH "Variable Value:" type:



  .;C:\Program Files (x86) \Java\JDK1.7.0\bin



If you installed a different version number the only thing that changes is the 1.7.0, the JDK still stays there.



The only exception to this, would be had you only installed a Java Runtime Environment, then the JDK would become JRE followed by the version number. However, its the JDK you need if you wish to program and compile and run on your Windows 7 pc.
2013-07-08 09:03:43 UTC
It might be your solution..

http://www.learnjavaonline.org/


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Continue reading on narkive:
Loading...