i'm a total novice to java and am looking to get hold of a compiler. I have been on the java web site and have managed to download Java(TM) Development kit 6. I cant seem to launch a compiler though?? All i want to do is get familiarised with the IDE and buy some books and start coding!! I'm using windows Vista basic, can someone help me get up and running with a compiler (freeware) or give me a clue as to how i go about aquiring/installing it.
When you first get started I could continue to use the command line tools you get with the JDK at least until you are comfortable with how to use packages, and understand how it works.
Once you have the basics on how compiling and running is done, you will be able to find many free Java IDEs which will make your workflow easier, such as Eclipse, and NetBeans, and some simple code highlighting editors like NotePad++.
I use Eclipse and so far I love it!! it's really great as java editor. And if you've downloaded JDK you already have a compiler located in C:\Program Files\Java\jdk1.6.0_12\bin or what ever your installation directory is. you just have to initialize it through command line.
thanks for that information. Now im at the command line and Windows can't find the javac compiler. I have a file: HelloWorldApp.java located on my C drive in a folder named Java. I installed the jdk on the following path: C:\Users\Cookson\Downloads\jdk-6-windows-i586.exe and i type this path into the command line prompt preceeding HelloWorldApp but get a message: 'the directory name is invalid'
Check your path. For me it doesn't seem valid as the path should contain \bin directory. You probably added your installation source directory.
I had this problem on my pc too. I tried a lot of solutions, but non of them worked for me. I guess it's Vista problem.
To come around this problem I just created .bat file like this:
First line compiles java code, second one launches the application.
Just change the path to your path (I believe only the version of the JDK should differ so instead of jdk1.6.0_12 there will be jdk1.6.****)
Arthur Donting wrote:sorry, I had other thing in mind when I said "installation source". By this I meant file you've installed JDK FROM. And by the path I meant the place where you've installed JDK. Sorry for confusion...
and about this \bin... it's the name of sub folder where java aplications are located (such as javac.exe or java.exe). this folder is located in your JDK installation directory.
oh, i aint havin much luck with this, i tried downloading eclipse and that gives me probs as well...
Control Panel - System - Advanced System Settings - 'Environment Variables' button .. scroll down until you see path and click the edit button.Add path which location you installed Java(Be careful not installation file.).For me i set below text to my PATH.