{"id":16377109,"url":"https://github.com/danfickle/cpptojavarpcstubgenerator","last_synced_at":"2026-07-02T14:05:26.888Z","repository":{"id":2495613,"uuid":"3469892","full_name":"danfickle/cppToJavaRpcStubGenerator","owner":"danfickle","description":"C++ To Java Rpc Stub Generator. Easily call Java code running in a JVM from C++.","archived":false,"fork":false,"pushed_at":"2012-02-17T13:30:50.000Z","size":128,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-11T14:16:32.783Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danfickle.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-17T12:58:48.000Z","updated_at":"2018-04-06T00:10:53.000Z","dependencies_parsed_at":"2022-08-31T23:21:06.061Z","dependency_job_id":null,"html_url":"https://github.com/danfickle/cppToJavaRpcStubGenerator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danfickle/cppToJavaRpcStubGenerator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danfickle%2FcppToJavaRpcStubGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danfickle%2FcppToJavaRpcStubGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danfickle%2FcppToJavaRpcStubGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danfickle%2FcppToJavaRpcStubGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danfickle","download_url":"https://codeload.github.com/danfickle/cppToJavaRpcStubGenerator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danfickle%2FcppToJavaRpcStubGenerator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35050094,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T03:28:42.437Z","updated_at":"2026-07-02T14:05:26.864Z","avatar_url":"https://github.com/danfickle.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C++ To Java RPC Stub Generator #\n\n## About ##\nThis project is an automatic stub generator for C++ to Java RPC (remote procedure calls). It uses Java reflection to automatically produce server(Java) and client(C++) stubs. Also included in the project are basic C++ and Java RPC libraries that are used by the stubs. Currently tested on Linux with JRE 1.6.\n\n## Sample code ##\nThis sample shows usage of the java.lang.StringBuilder class in C++:\n\n\tjava::java_lang_StringBuilder o(\u0026conn);\n\n\to.append(std::string(\"Hello World!\\n\"));\n\to.append(256);\n\to.append(1.12345f).append(23456.789).append(-1000); /* Method chaining supported. */\n\to.append(-1000);\n\to.append(0);\n\n\tstd::vector\u003cuint16_t\u003e chars;\n\tchars.push_back('g');\n\tchars.push_back('i');\n\tchars.push_back('t');\n\n\to.append(chars, 1, 2); /* Arrays supported. */\n\n\tstd::cout \u003c\u003c o.toString() \u003c\u003c std::endl;\n\tstd::cout \u003c\u003c o.reverse().toString() \u003c\u003c std::endl;\n\n## License ##\nThe project code is licensed under the permissive BSD license. Generated files remain the property of the people generating them.\n\n## Current Issues ##\n+ Two or more dimension arrays are not supported by the RPC libraries. If you generate stubs for a class containing methods that take or return two or more dimension arrays, you will have to go into the stubs and comment out those methods.\n+ In/out arguments are not supported.\n+ No way to tell whether a string is null or empty.\n+ No way to tell whether an array is null or empty.\n+ No way to pass in null object reference.\n+ Warnings produced in Java stubs (unchecked and rawtypes).\n\n\n## Dependencies ##\nThe C++ RPC library uses socket communication as well as strong and weak pointers. These can either be provided by the C++ Boost library or the Qt framework.\n\n## Using ##\nThe project contains three java projects (the generator, RPC server library and a sample server) and one C++ project (RPC client library with sample usage).\n\n 1. First build the Java server RPC library and export as a JAR.\n 2. Build the Java generator and export as a JAR.\n 3. Import these JAR files into the Java sample server, build and run either SampleGeneratorUsage.java or SimpleServer.java\n 4. Compile the C++ project using (on Linux) `g++ -I /home/user/boost_1_46_1/ *.cc -lpthread -lboost_system` (with the cpp directory as cwd). \n 5. You can also build the C++ project using Qt. A Qt project file is included.\n 6. You can now run the C++ sample project.\n\n## Types ##\nThe following types are supported:\n\n\tJava Type           C++ Type\n\tnumber              int8_t, int16_t, int32_t, int64_t, float, double\n\tchar                uint16_t\n\tjava.lang.String    std::string in UTF-8 format.\n\tobject              generated object stub\n\tarray               std::vector\u003carray_type\u003e eg. std::vector\u003cint8_t\u003e for byte[]\n\n## Exceptions ##\nExceptions thrown in the Java stubs are propagated back to the C++ client. The exception thrown is always a `java::java_lang_Exception`. However, one can use the instanceOf operator and casting constructor to cast to supported exception types. The following code sample demonstrates this:\n\n\ttry\n\t{\n\t\to.append(chars, 5, 3);\n\t}\n\tcatch(java::java_lang_Exception e)\n\t{\n\t\te.printStackTrace();\n\t\tif (java::java_lang_Throwable::instanceOf(\u0026conn, e))\n\t\t{\n\t\t\tjava::java_lang_Throwable throwable(e);\n\t\t\tstd::cout \u003c\u003c throwable.getMessage() \u003c\u003c std::endl;\n\t\t}\n\t}\n\n## Performance ##\nThis project favors correctness and ease-of-use over performance. Therefore, some performance anti-patterns are used such as returning std::string and std::vector on the stack.\n\n## Security ##\nThe project is intended to be used only with trusted clients.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanfickle%2Fcpptojavarpcstubgenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanfickle%2Fcpptojavarpcstubgenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanfickle%2Fcpptojavarpcstubgenerator/lists"}