result of a compiled class in Eclipse for Java EE Developers
I am trying to get the ".class" file from a java class开发者_开发问答 in Eclipse for Java EE developers.
I have enabled the the "build" option in project menu and I am building the project but still can't find the compile file or compilation errors in console window.
Thanks, Sid
The .class files should be located on X:/yourWorkspaceLocation/yourProject/build/classes
I would wager that your java source file isn't in a location considered as java source directory by Eclipse. Go to project properties -> Java Build Path -> Source and make sure that the folder where you keep your java source is listed. Alternatively, move your java source file under [project]/src directory which is the default java source folder for web projects in Eclipse.
Also, do not look for compilation errors in the console. Eclipse doesn't use javac or similar for compilation. It compiles java source file internally on the fly. Any errors will appear in the Problems view. The compiled class files will appear in the output directory designated in Java Build Path properties. Default output location for web projects is build/classes.
精彩评论