Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using the following java disto
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux
but am getting the following errror message at runtime
Caused by: java.lang.ClassNotFoundException: java.lang.StringBuilder not found in acc.jar file:/usr/share/java/libgcj-3.4.6.jar, file:./, core:/
Now when i look in libgcj-3.4.6.jar the StringBuilder class is not found .
Does anyone know where I can locate this or is the StringBuilder functions not in this version of Java ..
I apologize for this not being much help, but GCJ makes my toes curl - it's nice that it compiles Java to a native Linux binary, but aside from that, it really serves no other purpose that to frustrate Java programmers. I ran into this problem so many times (and never found a solution) where I would write a quick program, compile it without any errors, and then it would refuse to run with a bullsh*t error, like that one.
Are you making a call to the StringBuilder class in your program, or do you have anything like
Hmm...as a proposed solution, I read up on the java.lang.StringBuilder class, and it appears to just be used for building Strings out of other various types.
Try this, perhaps (depending on your needed usage)?:
Code:
...
String s = "";
s += Integer.toString(someInt);
s += Boolean.toString(someBoolean);
...
Essentially, just using the class versions of the basic types to convert the values to a String.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
StringBuilder purpose is not to provide these append methods as they already existed in the older StringBuffer class.
Your sample code is using StringBuffer under the hood.
StringBuilder purpose is to boost performance when the string isn't used by more than one thread, a common situation.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.