So I finally started reading into programming today and came across a roadblock.
How do I add an entry to PATH environment variable that points to the bin in java directory?
I'm a beginner reading Head First Java.
I forgot to mention I'm using Notepad.
Thanks for the quick reply and welcome.
That Beginner FAQ helped a lot, I guess I should've searched around before making a new thread so quickly.
I have errors on it though, it says "Could not find main class"
Here's my code:
I couldn't compile it to a class and how do I post the full stack trace?
I'm prolly annoying you right now. lawl
When I tried to compile it said:
error: Class names, 'DooBee.app', are only accepted if annotation processing is explicitly requested. 1 error.
Jonathan Pro wrote:When I tried to compile it said:error: Class names, 'DooBee.app', are only accepted if annotation processing is explicitly requested. 1 error.
How you named your java source file ?What is DooBee.app? Seems you have put the source file in a package and use wrong name ? What is the command you use to compile ? (I assume you have set the PATH properly and working from command line ?)
I made a typo, it was DooBee.java.
I don't know how to set the path.
I'm using Vista and I found the path variable thing but would this be the path I input?
C:\Program Files\Java\jdk1.6.0_11\bin
What is the error you are getting now? Try "echo %path%" in command prompt to see what's in your path variable and post it here. If you don't have it pointing to the bin directory of your JDK installation you have to add that to the path variable (through environment variables in Advanced System Properties - for Windows).
Java™ Tutorials. There are sections about installing Java, and you find a link to setting the PATH in the "common problems" page.
Somebody said not to use NotePad: agree. Try NotePad2, NotePad++ or jEdit, but jEdit requires Java to be working.
Create a "java" folder to contain your work somewhere. Try opening a command prompt, thenand you are in your java folder, which you have probably created in "My Documents".
If you start getting errors like "annotation processing enabled" that suggests you have in fact installed Java correctly and have set your PATH correctly already. The error caused by not setting the PATH usually reads "javac is not recognized as a . . ."
Post by:autobot
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?
a bit of art, as a gift, the permaculture playing cards