Environmental variables, asked the experts to help look at?

  Abstract: The problem of the environment variable, and asked the experts to help look at? 


  I javac HelloBean.java error in the operation, suggesting that 
  HelloBean.java: 3: cannot resolve symbol 
  Symbol: class CreatException 
  Location: package ejb 
  Import javax.ejb.CreatException; 

  Environment variables are as follows: 
  CLASSPATH: C: / Sun/AppServer/lib/j2ee.jar; C: / bea/wlserver6.1/lib/weblogic.jar 
  JAVA_HOME: C: / j2sdk1.4.2_10 
  J2EE_HOME: C: / Sun / AppServer 
PATH:
  % SystemRoot% / system32;% SystemRoot%% SystemRoot% / System32/Wbem; C: / Program Files / Microsoft SQL Server/80/Tools/BINN; C: / PROGRA ~ 1/Borland/Delphi6/Bin; C: / PROGRA ~ 1/Borland/Delphi6/Projects/Bpl; C: / j2sdk1.4.2_10/bin; C: / Sun / AppServer / bin 



  / / Need to introduce this type of class or interface 
  Import javax.ejb.CreatException; 
  Import javax.ejb.SessionBean; 
  Import javax.ejb.SessionContext; 

  Public class HelloBean implements SessionBean 
  ( 
  Private SessionContext ctx; 
  Private String words; 
  Public void setSessionContext (SessionContext ctx) 
  ( 
  This.ctx = ctx; 
  ) 
  / / And the corresponding definition of the interface method, we must realize 
  Public void ejbCreate () throws CreateException 
  ( 
  Words = "Hello Word !!!"; 
  ) 
  / / Client call for the business logic, here simply print string, the string and return to the client 
  Public String SayHello () 
  ( 
  System.out.println ( "I am in an EJB of Server." + Words); 
  Return words; 
  ) 
  ) 



CLASSPATH
  Also.; Dt.jar path; tools.jar path 



  Gefengxztg: 
  I would like to ask about, and I dt.jar Add classpath tools.jar path, and still can not find ejb suggested that this package. 

  New configuration path is as follows: 
  CLASSPATH: C: / Sun/AppServer/lib/j2ee.jar; C: / bea/wlserver6./lib/weblogic.jar; 
  C: / bea/jdk131/lib/tools.jar; C: / bea/jdk131/lib/dt.jar 
  JAVA_HOME: C: / bea/jdk131 
  J2EE_HOME: C: / Sun / AppServer 
PATH:
  % SystemRoot% / system32;% SystemRoot%% SystemRoot% / System32/Wbem; C: / Program Files / Microsoft SQL Server/80/Tools/BINN; C: / PROGRA ~ 1/Borland/Delphi6/Bin; C: / PROGRA ~ 1/Borland/Delphi6/Projects/Bpl; C: / j2sdk1.4.2_10/bin; C: / Sun / AppServer / bin; 
  C: / bea/jdk131/bin 



  The main problem is not ejb this package. 



  CLASSPATH: C: / Sun/AppServer/lib/j2ee.jar; C: / bea/wlserver6.1/lib/weblogic.jar wrong should be a plus. 

  Still inside path to C: / Sun/AppServer/lib/j2ee.jar; C: / join bea/wlserver6.1/lib/weblogic.jar 



  Wmzsl; 
  I now re-configuration of a path, but the compiler procedures, or find tips ejb this package, the source is at the top. 

  New configuration path is as follows: 
CLASSPATH:
  C: / Sun/AppServer/lib/j2ee.jar; C: / bea/wlserver6.1/lib/weblogic.jar; C: / bea/jdk131/lib/tools.jar; C: / bea/jdk131/lib / dt.jar. 

  JAVA_HOME: C: / bea/jdk131 
  J2EE_HOME: C: / Sun / AppServer 

PATH:
  % SystemRoot% / system32;% SystemRoot%% SystemRoot% / System32/Wbem; C: / Program Files / Microsoft SQL Server/80/Tools/BINN; C: / PROGRA ~ 1/Borland/Delphi6/Bin; C: / PROGRA ~ 1/Borland/Delphi6/Projects/Bpl; C: / j2sdk1.4.2_10/bin; C: / Sun / AppServer / bin; C: / bea/jdk131/bin; C: / Sun/AppServer/lib/j2ee . jar; C: / bea/wlserver6.1/lib/weblogic.jar 




  Source should be CreateException, missed a e 



  OK, thank you, ask more than one way, I am now in the machine inside a c: / j2sdk1.4.2_10 and C: / bea/jdk131, What is the difference between them?    If I JAVA_HOME variables will be c: / j2sdk1.4.2_10, what would be the difference? 



  Distinction is a version of a high-end version, if used at the end of version 1.3 can not use, such as 1.4 nio will only emerge when the function, probably it is so 



  Oh, I would like to thank the. 


  ↑ Back 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • DotNetKicks
  • DZone
  • Netvouz
  • Propeller

Tags:

Releated Java Articles

Comments

Leave a Reply