Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4181
21
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15284
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Winston Gutkowski
Bartender
Pie
Posts: 10417
63
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4181
21
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic