Q) What are different kinds of java projects we can develop in myeclipse ?
java project => J2se
web project => jsp/servlet/struts/spring
ejb project => ejb
web service project => web service
Enterprise Application Project => ejb + servlets/jsp
Q) How to create java project?
file -> new -> java project=>enter project name
Q) What is the package convention?
Inversedomainname.projectname.modulename.technology/usecase
package convention
com.companyName.projectName.moduleName.useCase
Q.) How to get Content assist?
--> The content assistant allows you to get input help
in an editor. It can be invoked by CTRL + Space.
Q.) How to get Quick Fix ?
--> Whenever there is a problem in the code Eclipse will highlight it as an error. Then Select error part and press (Ctrl+1)
-->Quick Fix is extremely powerful, it allows you to create new local / instance variables, new methods, classes, put try and catch around your exceptions, assign a statement to a variable etc.
Q.) how to Add external library (.jar ) to the Java classpath?
--> right click on project -> new -> folder -> "mylib"
--> copy and paste jar files into "mylib" folder.
--> right click on jar file-> Build path -> Add to Build path
or
--> right click on project -> Build path -> Configure Buildpath -> libraries -> Add External jars -> Select required jar file.
Q.) Add source code for jar ?
--> Open the Java Build Path page of a project (Projects > Properties > Java Build Path). On the Libraries page expand the library's node and select the Source attachment attribute and press Edit
Maintain the location to the source attachement.
Q.) Add the Javadoc for a jar
--> Download the javadoc of the jar and put it somewhere in your filesystem.
--> Open the Java Build Path page of a project (Projects > Properties > Java Build Path). On the Libraries page expand the library's node and select the Javadoc location attribute and press Edit
Maintain the location to the api.
Important Preference Settings
Window->Preferences -> java -> Editor -> Typing
Window -> Preferences -> java -> Editor -> Save Actions
=> You can export your Preferences settings from one workspace via
File -> Export -> General -> Preferences -> Give file name and location
File -> Import -> General -> Preferences -> select exiting preference file
Similar you can import them again into your workspace.
Comments
Post a Comment