Connecting Tech Pros Worldwide Forums | Help | Site Map

Can't find javax.* and other "extra" packages

Hal Vaughan
Guest
 
Posts: n/a
#1: Jul 17 '05
I'm using JDK 1.4.1 for Java 2. According to the API docs, I can use javax
packages, but when I add:

import javax.crypto;

I get an error that it can't find the package. Is there some special way to
get javax packages? According to a web page at Sun, the crypto is supposed
to be included with 1.4. (That's how they write it -- no 1.4.1 or 1.4.2,
just written as 1.4.)

And, along with this, I've found references to a java.mail API. I can't
find anything like that documented in the JDK references. Where can I find
this package? It would be a huge help to have that instead of having to
write my own POP3/SMTP routines.

Thanks for any help!

Hal

Hal Vaughan
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Can't find javax.* and other "extra" packages


Chris wrote:
[color=blue]
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hal Vaughan wrote:
>[color=green]
>> I'm using JDK 1.4.1 for Java 2. According to the API docs, I can
>> use javax packages, but when I add:
>>
>> import javax.crypto;[/color]
> [snip]
>
> Hi,
> Maybe you want:
>
> import javax.crypto.*;
>
> which will import all the classes inside the package. You can't just
> import a package on its own.[/color]

Okay. The error message said, "package javax does not exist" so I thought
it refered specifically to javax, but once I fixed it like you suggested,
it worked fine. (I had also seen some documentation that indicated
javax.crypto was a package all by itself.)

Thanks. It works fine now!

Hal
[color=blue]
> - --
> Chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.2 (GNU/Linux)
>
> iD8DBQE/Mo4HwxczzJRavJYRAr9sAKCzvX9QEdD4dGBJ1+NeNyJ3gfr6Ug CdGElf
> VjAiHjh+79MOhab1klcvMy4=
> =A7Sj
> -----END PGP SIGNATURE-----[/color]

Closed Thread