Hi All,
I have downloaded and installed
j2ee 1.3 from
j2ee 1.3 download
I have got several batch files like userconfig,j2ee etc in bin folder.
I am not getting what all settings do I need to complete my installation process.
I have set my JAVA_HOME, J2EE_HOME and Path variables as:
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_21
J2EE_HOME=F:\J2EE\j2sdkee1.3.1
PATH=%PATH%F:\J2EE\j2sdkee1.3.1\bin\;C:\Program Files\Java\jdk1.6.0_21\bin\;
But if from cmd prompt I try to get the version of j2ee, I get following error. (My j2ee 1.3 is installed in F:\J2EE folder)
F:\J2EE\j2sdkee1.3.1\bin>j2ee -version
Exception in
thread "main" java.lang.NoClassDefFoundError: Files\Common
Caused by: java.lang.ClassNotFoundException: Files\Common
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: Files\Common. Program will exit.
Also, If I try to compile my first Ejbs i.e AdviceBean.java from first chapter of Headfirst Ejbs, i get following error.
F:\Temp Workspace\projects\advice\src>javac -d ../classes headfirst/*.java
headfirst\Advice.java:9: package javax.ejb does not exist
import javax.ejb.EJBObject;
^
headfirst\Advice.java:15: cannot find symbol
symbol: class EJBObject
public interface Advice extends EJBObject{
^
headfirst\AdviceBean.java:9: package javax.ejb does not exist
import javax.ejb.EJBException;
^
headfirst\AdviceBean.java:10: package javax.ejb does not exist
import javax.ejb.SessionBean;
^
headfirst\AdviceBean.java:11: package javax.ejb does not exist
import javax.ejb.SessionContext;
^
headfirst\AdviceBean.java:17: cannot find symbol
symbol: class SessionBean
public class AdviceBean implements SessionBean{
^
headfirst\AdviceBean.java:21: cannot find symbol
symbol : class SessionContext
location: class headfirst.AdviceBean
public void setSessionContext(SessionContext ctx) throws EJBException, Remo
eException {
^
headfirst\AdviceBean.java:21: cannot find symbol
symbol : class EJBException
location: class headfirst.AdviceBean
public void setSessionContext(SessionContext ctx) throws EJBException, Remo
eException {
^
headfirst\AdviceBean.java:24: cannot find symbol
symbol : class EJBException
location: class headfirst.AdviceBean
public void ejbRemove() throws EJBException, RemoteException {
^
headfirst\AdviceBean.java:28: cannot find symbol
symbol : class EJBException
location: class headfirst.AdviceBean
public void ejbActivate() throws EJBException, RemoteException {
^
headfirst\AdviceBean.java:32: cannot find symbol
symbol : class EJBException
location: class headfirst.AdviceBean
public void ejbPassivate() throws EJBException, RemoteException {
^
headfirst\AdviceHome.java:9: package javax.ejb does not exist
import javax.ejb.CreateException;
^
headfirst\AdviceHome.java:10: package javax.ejb does not exist
import javax.ejb.EJBHome;
^
headfirst\AdviceHome.java:16: cannot find symbol
symbol: class EJBHome
public interface AdviceHome extends EJBHome{
^
headfirst\AdviceHome.java:18: cannot find symbol
symbol : class CreateException
location: interface headfirst.AdviceHome
public Advice create() throws CreateException, RemoteException;
^
15 errors
I believe there is some problem in my classpath. But I am not getting what should I include in my classpath, I think need to add ejb.jar to my classpath.
Any help would be appreciated.
Thanks in advance.