Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #18402 > unrolled thread
| Started by | Lew <lewbloch@gmail.com> |
|---|---|
| First post | 2012-08-29 11:10 -0700 |
| Last post | 2012-08-29 13:33 -0700 |
| Articles | 5 — 2 participants |
Back to article view | Back to comp.lang.java.programmer
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
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
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Date | 2012-08-29 11:10 -0700 |
| Subject | Re: (Encryption Package) error: cannot find symbol symbol: class BaseNCode |
| Message-ID | <fd28dd62-1006-49fe-a020-2572b8235fd7@googlegroups.com> |
(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
[toc] | [next] | [standalone]
| From | clusardi2k@aol.com |
|---|---|
| Date | 2012-08-29 11:21 -0700 |
| Message-ID | <19293822-5218-40d5-b5c7-205eeedb73c9@googlegroups.com> |
| In reply to | #18402 |
> On Wednesday, August 29, 2012 2:10:46 PM UTC-4, Lew wrote: > 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. Where can I get either the pre-built jar or *all* of the project! Thank you,
[toc] | [prev] | [next] | [standalone]
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Date | 2012-08-29 11:31 -0700 |
| Message-ID | <2bd66b01-727f-4312-b773-e7c04ac25c30@googlegroups.com> |
| In reply to | #18404 |
(unknown) wrote: > Lew wrote: >> 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. > > Where can I get either the pre-built jar or *all* of the project! http://lmgtfy.com/?q=Apache+Commons+Codec+downloads -- Lew
[toc] | [prev] | [next] | [standalone]
| From | clusardi2k@aol.com |
|---|---|
| Date | 2012-08-29 12:48 -0700 |
| Message-ID | <ae86b13f-d92d-4b0b-b2f9-b011a1fbb8da@googlegroups.com> |
| In reply to | #18406 |
> On Wednesday, August 29, 2012 2:31:26 PM UTC-4, Lew wrote:
> (unknown) wrote: > Lew wrote: >> 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. > > Where can I get
> either the pre-built jar or *all* of the project! http://lmgtfy.com/?
q=Apache+Commons+Codec+downloads -- Lew
When I add the java package and your dot jar (from http://commons.apache.org/codec/download_codec.cgi) to a project (as a library) and try to build it, I get error messages such as the below hard (if not impossible) to remove error messages. The error messages are from the new package.
Compiling 46 source files to C:\...\build\classes
C:\...\src\org\apache\commons\codec\binary\Base64.java:324: error: cannot find symbol
if (context.eof) {
symbol: variable eof
location: variable context of type Context
C:\...\src\org\apache\commons\codec\binary\Base64.java:330: error: cannot find symbol
context.eof = true;
symbol: variable eof
location: variable context of type Context
C:\...\src\org\apache\commons\codec\binary\Base64.java:331: error: cannot find symbol
if (0 == context.modulus && lineLength == 0) {
symbol: variable modulus
location: variable context of type Context
C:\...\src\org\apache\commons\codec\binary\Base64.java:334: error: method ensureBufferSize in class BaseNCodec cannot be applied to given types;
ensureBufferSize(encodeSize, context);
required: int
found: int,Context
reason: actual and formal argument lists differ in length
C:\...\src\org\apache\commons\codec\binary\Base64.java:335: error: cannot find symbol
int savedPos = context.pos;
symbol: variable pos
location: variable context of type Context
C:\...\src\org\apache\commons\codec\binary\Base64.java:336: error: cannot find symbol
switch (context.modulus) { // 0-2
symbol: variable modulus
location: variable context of type Context
C:\...\src\org\apache\commons\codec\binary\Base64.java:338: error: cannot find symbol
context.buffer[context.pos++] = encodeTable[(context.ibitWorkArea >> 2) & MASK_6BITS]; // top 6 bits
symbol: variable buffer
location: variable context of type Context
[toc] | [prev] | [next] | [standalone]
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Date | 2012-08-29 13:33 -0700 |
| Message-ID | <0033f0f2-d228-46c3-a70e-a930c622fef6@googlegroups.com> |
| In reply to | #18411 |
(unknown) wrote: >> Lew wrote: >> (unknown) wrote: > Lew wrote: >> 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. > > Where can I get > > either the pre-built jar or *all* of the project! http://lmgtfy.com/? > > q=Apache+Commons+Codec+downloads > > When I add the java package and your dot jar (from I am not nor have ever been affiliated with the Apache Project, and I've made no contributions to Commons Codec. > http://commons.apache.org/codec/download_codec.cgi) to a project (as a library) > and try to build it, I get error messages such as the below hard (if not impossible) > to remove error messages. The error messages are from the new package. Your use of the term "package" is inconsistent with Java usage. What exactly do you mean? > Compiling 46 source files to C:\...\build\classes > > C:\...\src\org\apache\commons\codec\binary\Base64.java:324: error: cannot find symbol Why are you compiling the Commons Codec project? This is what I told you *not* to do! Stop compiling third-party source. -- Lew
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web