This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

classpath issue

 
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Im new to EJB. I was trying to compile the AdviveBean in the K&B, when I received a message
package javax.ejb.* doesnt exist. so I read that having the following line in my classpath while compiling would make it work. "javac -cp c:\j2ee1.4\lib\j2ee.jar AdviceBean.java" And it did.

But when I try set it as an environ variable. I again get the original error. I have two questions now
1. How can I set it up so that I wont have to type javac -cp.... again?
2. What does the .jar file have to do with all this?

Thanks,
AB
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amitabha,
Can you write down the procedure, how you tried to set the environment variable for CLASSPATH? Hope some output can come out of it..
 
Amit Batra
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI thanks Ive gotten it. I had made the mistake of adding a space between 'Path' and '='.
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javac doesn't take a -cp parameter, only a -classpath parameter.
In that it's different from java, which accepts either.

One of the mysteries surrounding the design choices of Sun's software engineers
 
get schwifty. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic