c  « string « Java Data Type Q&A





1. Passing double-byte (WCHAR) strings from C++ to Java via JNI    stackoverflow.com

I have a Java application that uses a C++ DLL via JNI. A few of the DLL's methods take string arguments, and some of them return objects that contain strings ...

2. Memory leak using JNI to retrieve String's value from Java code    stackoverflow.com

i'm using GetStringUTFChars to retrieve a string's value from the java code using JNI and releasing the string using ReleaseStringUTFChars. When the code is run on JRE 1.4 then there is ...

3. C++ Version For Java String.replaceAll    stackoverflow.com

Java String.replaceAll comes very handy. Has anyone encounter similar library in C++ (Even without regular expression match, but with exact match is OK)

4. Where and why JVM checks that the return type of entry method main(String args[]) is void and not anything else?    stackoverflow.com

I will try to answer both, please correct me if I am wrong: Where: If a static method is being called using Classname.method() or using reflection then it doesn’t matter even ...

5. Interview question: Check if one string is a rotation of other string    stackoverflow.com

A friend of mine was asked the following question today at interview for the position of software developer: Given two string s1 and s2 how will you check if s1 is a ...

6. Invisible ActiveX that takes a string    stackoverflow.com

I need to adapt a simple function (let's say) int printText(string) written using an MFC library (this function prints the text on a particular printer whose driver lib is completely developed ...

7. How do I access return value of a Java method returning java.lang.String from C++ in JNI?    stackoverflow.com

I am trying to pass back a string from a Java method called from C++. I am not able to find out what JNI function should I call to access the ...

8. SWIG: How to wrap std::string& (std::string passed by reference)    stackoverflow.com

I am using SWIG to access C++ code from Java. What is the easiest way to expose a std::string parameter passed by non-const reference? I have primitives passed by reference exposed as Java ...

9. How to return a java string in C++ using JNI    stackoverflow.com

I need to call my java code and then return a String from C++ using JNI. Basically in C++ I want to use a function like "String getMyString()" to obtain some ...





10. Calling a java function from C++ via JNI that returns a string    stackoverflow.com

Suppose I have a Java class like this :

class MyClass
{
  String value = "a string value";

  String getValue()
  {
    return value;
  }
}
I've been trying ...

11. Pass ANSI string from Java to C++ (JNI)    stackoverflow.com

I have a file with an arabic content (encoded in ANSI). I wrote the C++ code responsible for processing this text. Now i want to pass this text from Java (without changing ...

12. C++ command line strings like Java?    stackoverflow.com

Is there a way to get c++ strings from the commandline like in Java?

public static void main(String[] args)
where args is an array of C++ strings?

13. passing multiple strings from c to java(jni) in a function    stackoverflow.com

In JNI when we want to pass a string from C to java we do it by(C++):

return env->NewStringUTF("MY String");
As this is a return statement, it can be called just once ie. ...

14. Conversion from basic_string to jstring    stackoverflow.com

I'm using a basic_string<wchar_t> type and need to convert it into a jstring to pass through a JNI layer. I'm wondering what the best way to do that is. I have ...

15. Extending my Java API to C++ through JNI: How to wrap a method returning a String?    stackoverflow.com

I am using JNI to extend my API in Java, in order to make it accessible through C++ (I am creating wrapper classes). I am experienced in Java but new to ...

16. Octet to string conversion    stackoverflow.com

How to convert t-octet into string? I am doing some service on C++, now stuck here I have to write a function that can convert t-octet to string. for more clarification ...





17. Generating Balanced Strings    stackoverflow.com

Is it possible to generate balanced strings of "()" and "[]" of a certain range of length from 0 to 5 or whatever in Java or C++. If anyone could please ...

18. Java and C++ - String    stackoverflow.com

I have a Java Client and C++ server. All values are sent as byte array. The numeric values are received fine but the string values when stored in char array in ...

19. C++ printf String read    forums.oracle.com

20. Converting a Java string into a C++ string    forums.oracle.com

Hi everybody, I hope no one minds the double post, for some reason the forum wouldn't let me do anything with my previous message. Anyway, I've realized that the problem I was encountering is that my method needs a C string as a parameter, not a Java String. Does anyone know of a way to convert a Java String to a ...