• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5025
  • Last Modified:

"package javax.ejb does not exist"- a classpath problem.

Hey.
I have checked the net and 99% of the time it is a classpath problem- but I still cannot fix it!

I am getting this with a run a preconfigured build.cmd file.
error:
'package javax.ejb does not exist'

classpath = D:\jbuilder5\jdk1.3\javax.jar;D:\Program Files\Blazix;.

javax.jar contains javax\ejb, which contains the classes.

Any ideas
Eoin.
0
Eoinbn
Asked:
Eoinbn
  • 3
  • 3
1 Solution
 
CEHJCommented:
Please post the output of this command from the command line:

echo %CLASSPATH%
0
 
EoinbnAuthor Commented:
D:\jbuilder5\jdk1.3\javax.jar;D:\Program Files\Blazix;.

including the '.'
0
 
CEHJCommented:
The EJB classes may not be in javax.jar. Post the output of

jar -tf javax.ejb | find "javax.ejb"

Is there no j2ee.jar?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
EoinbnAuthor Commented:
I assume I should be in the directory that javax.jar is in.
I get the following error when I run your command- however should it be jar -tf javax.JAR instead of javax.EJB??

java.io.FileNotFoundException: javax.ejb (The system cannot find the file specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:64)
        at sun.tools.jar.Main.run(Main.java:186)
        at sun.tools.jar.Main.main(Main.java:904)

I have no j2ee.jar, so I downloaded the javax folder.
0
 
CEHJCommented:
Doh sorry - typo!

Should have been

jar -tf javax.jar | find "javax.ejb"
0
 
thomas908Commented:
EJB's need j2ee.jar, like CEHJ mentioned above.
The reason u dont have a j2ee.jar is that JBuilder EE  comes with Tomcat which is just a servlet container. So although it contains jar files to compile servlets, it does not contain j2ee.jar needed to compile ejbs.

j2ee.jar will be available in any application server u have installed to run ur ejbs. If u haven't as yet u may download and install  j2ee RI from Sun's site (or any other server for htat matter) .
In the lib directory within ur installation directory u'll find j2ee.jar , set classpath to it and everythign will be fine.
0
 
EoinbnAuthor Commented:
Thanks thomas. You have solved my problem, but it seems to have created another LOL

thanks again.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now