wood burning stoves 2.0*
The moose likes Java in General and the fly likes Want to avoid java.lang.String, but using org.bouncycastle.util.Strings, but not succeeding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Want to avoid java.lang.String, but using org.bouncycastle.util.Strings, but not succeeding" Watch "Want to avoid java.lang.String, but using org.bouncycastle.util.Strings, but not succeeding" New topic
Author

Want to avoid java.lang.String, but using org.bouncycastle.util.Strings, but not succeeding

Jacky Luk
Ranch Hand

Joined: Aug 02, 2012
Posts: 590
I have included the jar files to the project, to no avail.
Any suggestions for me?



http://www.bouncycastle.org/docs/docs1.5on/index.html
http://code.google.com/p/jcardsim/



Thanks
Jack
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4165
    
  21

Jacky Luk wrote:Want to avoid java.lang.String, but using org.bouncycastle.util.Strings, but not succeeding...
Any suggestions for me?

Don't. You severely misunderstand what that class is if you think it can help you avoid String. The error tells you the class java.lang.String is not in the classpath. It needs to be in the classpath. So fix your classpath so it includes java.lang.String.


Also, please read DontWriteLongLines, it makes your post and the entire thread hard to read. Please go back and edit your post so the non-code comment you put in the middle of the code is more readable. Thanks.


Steve
Jacky Luk
Ranch Hand

Joined: Aug 02, 2012
Posts: 590
Steve Luke wrote:
Jacky Luk wrote:Want to avoid java.lang.String, but using org.bouncycastle.util.Strings, but not succeeding...
Any suggestions for me?

Don't. You severely misunderstand what that class is if you think it can help you avoid String. The error tells you the class java.lang.String is not in the classpath. It needs to be in the classpath. So fix your classpath so it includes java.lang.String.


Also, please read DontWriteLongLines, it makes your post and the entire thread hard to read. Please go back and edit your post so the non-code comment you put in the middle of the code is more readable. Thanks.


Hello Steve,
The Java Card Platform doesn't allow java.lang.String to be present in the application which holds back all my work.
Thanks
Jack
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

You cannot just decide to use some other class instead of java.lang.String.

If you're programming for the Java Card platform, you're most likely not supposed to add a main method to your program just like you would with a normal Java SE program.

I've never used Java Card, so I can't tell you what you need to do to write a Java Card program.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7505
    
  18

Jacky Luk wrote:The Java Card Platform doesn't allow java.lang.String to be present in the application which holds back all my work.

Well, according to a few pages I've seen, version 3.0 does support Strings.
However, this is highly specialized stuff (as is Java ME in general), so I suspect that you might do better looking for some tutorials.

PS: Could you please correct those enormous lines, as Jesper asked. You're unlikely to get much help without doing so.

Thanks.

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Jacky Luk
Ranch Hand

Joined: Aug 02, 2012
Posts: 590
Winston Gutkowski wrote:
Jacky Luk wrote:The Java Card Platform doesn't allow java.lang.String to be present in the application which holds back all my work.

Well, according to a few pages I've seen, version 3.0 does support Strings. However, this is highly specialized stuff (as is Java ME in general), so I suspect that you might do better looking for some tutorials.

Winston


Okay, but I am using 2.2 because I am taking advantage of the Integrated Simulator of the Eclipse IDE. How can I get the best of both worlds?
Thanks
Jack
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4165
    
  21

Jacky Luk wrote:
Winston Gutkowski wrote:
Jacky Luk wrote:The Java Card Platform doesn't allow java.lang.String to be present in the application which holds back all my work.

Well, according to a few pages I've seen, version 3.0 does support Strings. However, this is highly specialized stuff (as is Java ME in general), so I suspect that you might do better looking for some tutorials.

Winston


Okay, but I am using 2.2 because I am taking advantage of the Integrated Simulator of the Eclipse IDE. How can I get the best of both worlds?
Thanks
Jack

You probably can't. Choose one, and work with it. You can't use that org.bouncycastle.util.Strings class as a replacement for String because it is a utility class that uses java.lang.String. If you are stuck in a world without java.lang.String then you need to do what Jesper suggested: lookup some resources (books/tutorials) which describe how to use Java Card.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Want to avoid java.lang.String, but using org.bouncycastle.util.Strings, but not succeeding
 
Similar Threads
Mock Exam Question
static synchronized
Command line runs it, Eclipse does not :-(
string construction
Overloading with Boxing and Var-args