set CLASSPATH=%CLASSPATH%;C:\Program Files\Java\JDK1.6.20\lib
set PATH=%PATH%;C:\Program Files\Java\JDK1.6.20\bin
1)The main difference between PATH and CLASSPATH is that PATH is an environment variable which is used to locate JDK binaries like "java" or "javac" command used to run java program and compile java source file. On the other hand, CLASSPATH, an environment variable is used by System or Application ClassLoader to locate and load compile Java bytecodes stored in the .class file.
Another significant difference between PATH and CLASSPATH is that PATH can not be overridden by any Java settings but CLASSPATH can be overridden by providing command line option -classpath or -cp to both "java" and "javac" commands or by using Class-Path attribute in Manifest file inside JAR archive.
WhyBackingBean/mangedBean doesnot have main();
set PATH=%PATH%;C:\Program Files\Java\JDK1.6.20\bin
1)The main difference between PATH and CLASSPATH is that PATH is an environment variable which is used to locate JDK binaries like "java" or "javac" command used to run java program and compile java source file. On the other hand, CLASSPATH, an environment variable is used by System or Application ClassLoader to locate and load compile Java bytecodes stored in the .class file.
Another significant difference between PATH and CLASSPATH is that PATH can not be overridden by any Java settings but CLASSPATH can be overridden by providing command line option -classpath or -cp to both "java" and "javac" commands or by using Class-Path attribute in Manifest file inside JAR archive.
Java Identifiers:
All Java components require names. Names used for classes, variables and methods are called identifiers.
In Java, there are several points to remember about identifiers. They are as follows:
- All identifiers should begin with a letter (A to Z or a to z), currency character ($) or an underscore (_).
- After the first character identifiers can have any combination of characters.
- A key word cannot be used as an identifier.
- Most importantly identifiers are case sensitive.
- Examples of legal identifiers: age, $salary, _value, __1_value
- Examples of illegal identifiers: 123abc, -salary
- Access Modifiers: default, public , protected, private
- Non-access Modifiers: final, abstract, strictfp
WhyBackingBean/mangedBean doesnot have main();
The main method is only used to start a program. A managed bean is never used to start a program. Such beans are used by web application which have another start class, having a main method.
You can add a main method to a managed bean, but this method will never be called by a running web application. As a managed bean contains attributes and sometimes logic which can' be used outside a web application (they have to run in a context which you can't setup from the main method) there is no need to have a main method in a managed bean
No comments:
Post a Comment