Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #18402

Re: (Encryption Package) error: cannot find symbol symbol: class BaseNCode

Received by 10.66.80.166 with SMTP id s6mr445492pax.30.1346263846031; Wed, 29 Aug 2012 11:10:46 -0700 (PDT)
Received by 10.68.197.70 with SMTP id is6mr536753pbc.14.1346263846017; Wed, 29 Aug 2012 11:10:46 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!169.228.66.3.MISMATCH!ihnp4.UCSD.Edu!newsfeed.news.ucla.edu!usenet.stanford.edu!r4no3226242pbs.0!news-out.google.com!t10ni109755722pbh.0!nntp.google.com!r4no3226237pbs.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.programmer
Date Wed, 29 Aug 2012 11:10:45 -0700 (PDT)
In-Reply-To <c60c6542-537f-4fcf-8aa0-06c0f977ca59@googlegroups.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=69.28.149.29; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
NNTP-Posting-Host 69.28.149.29
References <c60c6542-537f-4fcf-8aa0-06c0f977ca59@googlegroups.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <fd28dd62-1006-49fe-a020-2572b8235fd7@googlegroups.com> (permalink)
Subject Re: (Encryption Package) error: cannot find symbol symbol: class BaseNCode
From Lew <lewbloch@gmail.com>
Injection-Date Wed, 29 Aug 2012 18:10:46 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.java.programmer:18402

Show key headers only | View raw


(unknown) wrote:
> When I include the below package (link 1) in a project, I get the following error message:
> 
> C:\...\src\org\apache\commons\codec\binary\Base64.java:50: error: cannot find symbol   
> public class Base64 extends BaseNCodec {
> 
>     symbol: class BaseNCode
> 
> The code in (1) came from (2). I'd like to use both of these. 
> 
> What am I doing wrong here! What should I be doing. (Do I need a dot jar for this.)

You apparently brought in part, not all, of the source code for the library you want to 
use. This is not conventional or optimal.

Instead, either download or build the JAR, ensuring thus that it contains *all* the 
project (Commons Codec in this case). Since Apache Commons is, well, common, 
unless you're contributing to the project download the JAR rather than build it.

See the Java documentation for how to include JARs in the classpath with the 
"-classpath" ("-cp" for short) argument to the Java tools.

> How do I encrypt strings. Also, do you have a simple example project. 

http://lmgtfy.com/?q=Java+how+to+encrypt+strings

Note: Interrogative sentences should end in a question mark ("?").

> Is there a better alternative to this package for encryption. What should I be considering

What does "better" mean to you?

Apache Commons Codec is not an encryption library, so presumably any 
encryption library would be better.

As for your other errors, the messages seem clear enough.

[snip]
> Note: C:\...\src\...\Login_Screen.java uses unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.

Don't use raw types.

Use generics correctly.

-- 
Lew

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: (Encryption Package) error: cannot find symbol   symbol: class BaseNCode Lew <lewbloch@gmail.com> - 2012-08-29 11:10 -0700
  Re: (Encryption Package) error: cannot find symbol   symbol: class BaseNCode clusardi2k@aol.com - 2012-08-29 11:21 -0700
    Re: (Encryption Package) error: cannot find symbol   symbol: class BaseNCode Lew <lewbloch@gmail.com> - 2012-08-29 11:31 -0700
      Re: (Encryption Package) error: cannot find symbol   symbol: class BaseNCode clusardi2k@aol.com - 2012-08-29 12:48 -0700
        Re: (Encryption Package) error: cannot find symbol   symbol: class BaseNCode Lew <lewbloch@gmail.com> - 2012-08-29 13:33 -0700

csiph-web