Answer» I'm very New to JAVA. I'm taking an "Intro to computing class". ( I don't plan on being a programmer, it's to complete my degree and it is a "required class) I need help in completing an assignment. I have many books but, I don't understand the instructions, in the book (s) to even get started. I 'm supposed to do the "Hello World" program (yeah I know for those of you who are experienced it's simple). Here's my problem: It says to "Set the Path". I have no clear definition of what the "Path" is? My JDK was istalled on my C drive. To go on, the instructions say to: Type in: PATH c:\j2sdk1.4.2_07\bin; %PATH%. But if my JDK is already in C wouldn't I just type in the c:\ j2sdk(etc)? This class expects us to learn this in one week and write this stuff, I"m usually quite sharp, but I just don't get it. I think I have a mental block. I'm POSTING here because I also do not get any help from the class, I did try to get help from my school. I guess I'm just too stupid (They told me it was a stupid question) I'm very depressed over this, I've paid for the class and I don't want to have to drop it. Please help me, I'm desperate, I only have W eek and a half til I'm done. I am not gonna take any credit for this. I found it on the net. It seems simple enough, but being a VB programmer, it's all Greek to me.
class HelloWorld { public static void main(String args[]) { System.out.println("Hello World!"); } }
Good luck with your STUDIES. tigergirl.
A path is a LIST of folders that the computer will search when looking for a file. When programs are installed on a computer sometimes they will add pointers to themselves in the path. (Sorta like walking down the yellow brick road, with a map).
Now when you are being instructed to set the path, the JAVA program is wanting to add pointers to it's folder to the existing path. Hence, :\j2sdk1.4.2_07\bin; %PATH%.
%PATH% is a shortcut to calling out the existing path. So in essence the JAVA program is adding itself to the existing path.
An example, lets say the path on your computer is c:\somestuff;c:\somemorestuff. Typing the line above in the command prompt would give you a path of c:\j2sdk1.4.2_07\bin;c:\somestuff;c:\somemorestuff
It ADDS the path to the JAVA app to the existing path on your computer.
Clear as mud?? Thanks, I'll give it a try!please can anybody tells me more about the Java runtime environment, and what are the tools that enables us to work with JBuilder? since I am working with JBuilderX? plus I wana ask about how to convert from the .class files to make an executable file .exe?
Houssam B.
|