<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: calling C from java in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393939#M42019</link>
    <description>Tim Sneddon from Kednos had a good article, "Calling OpenVMS native routines from Java," in the OpenVMS Technical Journal, Volume 12 (&lt;A href="http://h71000.www7.hp.com/openvms/journal/index.html)" target="_blank"&gt;http://h71000.www7.hp.com/openvms/journal/index.html)&lt;/A&gt; which, although using a PLI example, should (and claims to be) extensible to C.</description>
    <pubDate>Thu, 02 Apr 2009 19:13:42 GMT</pubDate>
    <dc:creator>Mike Kier</dc:creator>
    <dc:date>2009-04-02T19:13:42Z</dc:date>
    <item>
      <title>calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393938#M42018</link>
      <description>I am seeing few examples here on how to call Cobol or Fortran from java but I couldnt find any document or example on how to call C from java ..can someone point me in the right direction?&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Thu, 02 Apr 2009 18:50:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393938#M42018</guid>
      <dc:creator>SAMI AHMAD</dc:creator>
      <dc:date>2009-04-02T18:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393939#M42019</link>
      <description>Tim Sneddon from Kednos had a good article, "Calling OpenVMS native routines from Java," in the OpenVMS Technical Journal, Volume 12 (&lt;A href="http://h71000.www7.hp.com/openvms/journal/index.html)" target="_blank"&gt;http://h71000.www7.hp.com/openvms/journal/index.html)&lt;/A&gt; which, although using a PLI example, should (and claims to be) extensible to C.</description>
      <pubDate>Thu, 02 Apr 2009 19:13:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393939#M42019</guid>
      <dc:creator>Mike Kier</dc:creator>
      <dc:date>2009-04-02T19:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393940#M42020</link>
      <description>Sami,&lt;BR /&gt;&lt;BR /&gt;see this page: &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h18012.www1.hp.com/java/faq/ovms.html#4.1a" target="_blank"&gt;http://h18012.www1.hp.com/java/faq/ovms.html#4.1a&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Thu, 02 Apr 2009 19:16:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393940#M42020</guid>
      <dc:creator>Duncan Morris</dc:creator>
      <dc:date>2009-04-02T19:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393941#M42021</link>
      <description>SAMI,&lt;BR /&gt;&lt;BR /&gt;  Calling C shouldn't be any different from Cobol or Fortran. The VMS calling standard is specifically designed to make intra language calls possible, and relatively painless.&lt;BR /&gt;&lt;BR /&gt;  The biggest issue is matching data types between the languages. There should be a better match for data types between Java and C, as you may not need to worry about string descriptors and packed decimal types.&lt;BR /&gt;&lt;BR /&gt;  Start with your existing Fortran example, and replace the Fortran routine with a C equivalent. Make sure you can receive and return all the data types you're interested in.&lt;BR /&gt;&lt;BR /&gt;  I'd expect far more people to be calling C from Java than Cobol. Chances are, the reason you can't find any example code is it's too easy!</description>
      <pubDate>Thu, 02 Apr 2009 20:38:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393941#M42021</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2009-04-02T20:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393942#M42022</link>
      <description>Sami,&lt;BR /&gt;&lt;BR /&gt;Please contact me offline and I would&lt;BR /&gt;be happy to provide you with few examples&lt;BR /&gt;that call C from Java.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Guy Peleg&lt;BR /&gt;Maklee Engineering&lt;BR /&gt;&lt;A href="http://www.maklee.com" target="_blank"&gt;www.maklee.com&lt;/A&gt;&lt;BR /&gt;guy.peleg@company_name.com</description>
      <pubDate>Fri, 03 Apr 2009 04:40:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393942#M42022</guid>
      <dc:creator>Guy Peleg</dc:creator>
      <dc:date>2009-04-03T04:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393943#M42023</link>
      <description>whats your email address?</description>
      <pubDate>Fri, 03 Apr 2009 16:51:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393943#M42023</guid>
      <dc:creator>SAMI AHMAD</dc:creator>
      <dc:date>2009-04-03T16:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393944#M42024</link>
      <description>What is Guy's address?   Since you're looking for help with the JNI and that's going to put you rather deep into the Java and C coding requirements, here is the answer to your question in the form of some C coding practice.  &lt;BR /&gt;&lt;BR /&gt;:-) &lt;BR /&gt;&lt;BR /&gt;$ type y.c&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;main() { printf("guy.peleg@%s.com","maklee"); return 1; } &lt;BR /&gt;$ &lt;BR /&gt;$ cc y&lt;BR /&gt;$ link y&lt;BR /&gt;$ run y&lt;BR /&gt;[the answer appears here]&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Fri, 03 Apr 2009 18:33:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393944#M42024</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-04-03T18:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393945#M42025</link>
      <description>iam willing to take the challange :)&lt;BR /&gt;thanks</description>
      <pubDate>Fri, 03 Apr 2009 21:34:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393945#M42025</guid>
      <dc:creator>SAMI AHMAD</dc:creator>
      <dc:date>2009-04-03T21:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393946#M42026</link>
      <description>Sami,&lt;BR /&gt;&lt;BR /&gt;you can also use SWIG, which generates the jackets routines: &lt;A href="http://www.swig.org/" target="_blank"&gt;http://www.swig.org/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SWIG 1.3.31 has been ported on OpenVMS and I have extensively used it without any problem (but not with java...)&lt;BR /&gt;&lt;BR /&gt;JF&lt;BR /&gt;</description>
      <pubDate>Sat, 04 Apr 2009 13:58:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393946#M42026</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2009-04-04T13:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393947#M42027</link>
      <description>based on Guy Peleg's example I am trying to put together this extern C program call, can someone point out why iam unable to compile ?&lt;BR /&gt;Guy thanks for your valuable example to give me a starting point.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SUNNY2$ type snd_snmp.java&lt;BR /&gt;class SYSTEMCALL {&lt;BR /&gt;public native int SNMPTRAP (String msg);&lt;BR /&gt;static {&lt;BR /&gt;             System.loadLibrary("SNDSNMP_C");&lt;BR /&gt;        }&lt;BR /&gt;public static void main (String[] args) {&lt;BR /&gt;      &lt;BR /&gt;        System.out.println("This is java ..calling the C routing"); &lt;BR /&gt;        int result = new SYSTEMCALL().SNMPTRAP("TEST TRAP MSG");&lt;BR /&gt;        System.out.println("for now lets omit this");&lt;BR /&gt;     }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ javac snd_snmp.java&lt;BR /&gt;&lt;BR /&gt;$ javah -jni "SYSTEMCALL"&lt;BR /&gt;&lt;BR /&gt;$TYPE SYSTEMCALL.H&lt;BR /&gt;&lt;BR /&gt;/* DO NOT EDIT THIS FILE - it is machine generated */&lt;BR /&gt;#include &lt;JNI.H&gt;&lt;BR /&gt;/* Header for class SYSTEMCALL */&lt;BR /&gt;&lt;BR /&gt;#ifndef _Included_SYSTEMCALL&lt;BR /&gt;#define _Included_SYSTEMCALL&lt;BR /&gt;#ifdef __cplusplus&lt;BR /&gt;extern "C" {&lt;BR /&gt;#endif&lt;BR /&gt;/*&lt;BR /&gt; * Class:     SYSTEMCALL&lt;BR /&gt; * Method:    SNMPTRAP&lt;BR /&gt; * Signature: (Ljava/lang/String;)I&lt;BR /&gt; */&lt;BR /&gt;JNIEXPORT jint JNICALL Java_SYSTEMCALL_SNMPTRAP&lt;BR /&gt;  (JNIEnv *, jobject, jstring);&lt;BR /&gt;&lt;BR /&gt;#ifdef __cplusplus&lt;BR /&gt;}&lt;BR /&gt;#endif&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SUNNY2$ type sndsnmp_c.c&lt;BR /&gt;#include "SYSTEMCALL.H"&lt;BR /&gt;#include &lt;STDIO.H&gt; &lt;BR /&gt;#include &lt;STDLIB.H&gt; &lt;BR /&gt;#include &lt;STRING.H&gt;&lt;BR /&gt;&lt;BR /&gt;#define size 512&lt;BR /&gt;static char cmdbuffer[size];&lt;BR /&gt; &lt;BR /&gt;/* main(int argc, char **argv )  */&lt;BR /&gt;&lt;BR /&gt;JNIEXPORT jint JNICALL Java_SYSTEMCALL_SNMPTRAP&lt;BR /&gt;  (JNIEnv *env, jobject obj , jstring cmdbuffer) {&lt;BR /&gt; &lt;BR /&gt;   int i; &lt;BR /&gt;   int sts;&lt;BR /&gt;  char *cmd = "mcr sys$system:tcpip$snmp_trapsnd.exe 0.0 local 0 0 0 -h 10.100.18.245 -v2c  1.3.6.1.6.3.1.1.4.1.0 \"D\"";&lt;BR /&gt;    &lt;BR /&gt;    strncat (cmdbuffer, cmd,size);&lt;BR /&gt;    strncat (cmdbuffer, "  \"",size);&lt;BR /&gt;    strncat (cmdbuffer, argv[1],size);&lt;BR /&gt;    strncat (cmdbuffer,"\"",size);&lt;BR /&gt;    printf ("%s\n",cmdbuffer);&lt;BR /&gt;    sts = system(cmdbuffer); &lt;BR /&gt;   printf( " sts = %%x%08x.\n", sts);&lt;BR /&gt;} &lt;BR /&gt;SUNNY2$ &lt;BR /&gt;&lt;BR /&gt;SUNNY2$ cc /prefix=all/float=ieee/ieee=denorm/defin=JIT_OPTION/names=(short,as_is)   &lt;BR /&gt;/reent=multithread/includ=SYS$COMMON:[JAVA$142.INCLUDE...] SNDSNMP_C&lt;BR /&gt;&lt;BR /&gt;SUNNY2$ cc /prefix=all/float=ieee/ieee=denorm/defin=JIT_OPTION/names=(short,as_is)   /reent=multithread/includ=SYS$COMMON:[JAVA$142.&lt;BR /&gt;INCLUDE...] SNDSNMP_C&lt;BR /&gt;&lt;BR /&gt;    strncat (cmdbuffer, cmd,size);&lt;BR /&gt;.............^&lt;BR /&gt;%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer value "cmdbuffer" is "struct _jobject", which is not compat&lt;BR /&gt;ible with "char".&lt;BR /&gt;at line number 18 in file DISK$ORACLE:[ORACLE9I]SNDSNMP_C.C;18&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRING.H&gt;&lt;/STDLIB.H&gt;&lt;/STDIO.H&gt;&lt;/JNI.H&gt;</description>
      <pubDate>Sun, 05 Apr 2009 22:38:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393947#M42027</guid>
      <dc:creator>SAMI AHMAD</dc:creator>
      <dc:date>2009-04-05T22:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393948#M42028</link>
      <description>&amp;gt;can someone point out why I am unable to compile?&lt;BR /&gt;&lt;BR /&gt;You have:&lt;BR /&gt;static char cmdbuffer[size];&lt;BR /&gt;JNIEXPORT jint JNICALL Java_SYSTEMCALL_SNMPTRAP&lt;BR /&gt;(JNIEnv *env, jobject obj, jstring cmdbuffer) {&lt;BR /&gt;&lt;BR /&gt;Your parm name cmdbuffer hides your file scope definition.&lt;BR /&gt;&lt;BR /&gt;If you were using a real language like C++, you could just use ::cmdbuffer to access the global scope.  :-)</description>
      <pubDate>Mon, 06 Apr 2009 03:38:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393948#M42028</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-04-06T03:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393949#M42029</link>
      <description>Apart from cmdbuffer used twice, jstring is NOT an ordinary C char*. You'll have to convert the jstring parameter - see &lt;A href="http://java.sun.com/docs/books/jni/html/objtypes.html#4001" target="_blank"&gt;http://java.sun.com/docs/books/jni/html/objtypes.html#4001&lt;/A&gt; , especially the methods GetStringChars and GetStringLength.&lt;BR /&gt;&lt;BR /&gt;cu,&lt;BR /&gt;  Martin</description>
      <pubDate>Mon, 06 Apr 2009 05:15:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393949#M42029</guid>
      <dc:creator>Martin Vorlaender</dc:creator>
      <dc:date>2009-04-06T05:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393950#M42030</link>
      <description>After learning C or a "real" languages and how to call their functions from Java in order to do a system() with a C-style string retrieved from a Java and/or C++ string class, you may want to learn what the Runtime class can do for you.</description>
      <pubDate>Mon, 06 Apr 2009 06:58:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393950#M42030</guid>
      <dc:creator>x2084</dc:creator>
      <dc:date>2009-04-06T06:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393951#M42031</link>
      <description>ok I am not getting compiler errors now after i made the following change but iam now not able to run it using java &lt;BR /&gt;&lt;BR /&gt;static char cmdbuffer[size];&lt;BR /&gt; &lt;BR /&gt;/* main(int argc, char **argv )  */&lt;BR /&gt;&lt;BR /&gt;JNIEXPORT jint JNICALL Java_SYSTEMCALL_SNMPTRAP&lt;BR /&gt;  (JNIEnv *env, jobject obj , jstring msg) {&lt;BR /&gt; &lt;BR /&gt;   int i; &lt;BR /&gt;   int sts;&lt;BR /&gt;  char *cmd = "mcr sys$system:tcpip$snmp_trapsnd.exe 0.0 local 0 0 0 -h 10.100.18.245 -v2c  1.3.6.1.6.3.1.1.4.1.0 \"D\"";&lt;BR /&gt; &lt;BR /&gt;   char buf[512];&lt;BR /&gt;     const jbyte *str;&lt;BR /&gt;     str = (*env)-&amp;gt;GetStringUTFChars(env, msg, NULL);&lt;BR /&gt;     if (str == NULL) {&lt;BR /&gt;         return NULL; /* OutOfMemoryError already thrown */&lt;BR /&gt;     }&lt;BR /&gt;     printf("%s", str);&lt;BR /&gt;     (*env)-&amp;gt;ReleaseStringUTFChars(env, msg, str);&lt;BR /&gt;&lt;BR /&gt;   &lt;BR /&gt;/*    strncat (cmdbuffer, cmd,size);&lt;BR /&gt;    strncat (cmdbuffer, "  \"",size);&lt;BR /&gt;    strncat (cmdbuffer, argv[1],size);&lt;BR /&gt;    strncat (cmdbuffer,"\"",size);&lt;BR /&gt;    printf ("%s\n",cmdbuffer);&lt;BR /&gt;    sts = system(cmdbuffer); &lt;BR /&gt;   printf( " sts = %%x%08x.\n", sts);&lt;BR /&gt;*/&lt;BR /&gt;return 0;&lt;BR /&gt;} &lt;BR /&gt;&lt;BR /&gt;$link/share=sndsnmp_c sndsnmp_c,sndsnmp_c/opt&lt;BR /&gt;&lt;BR /&gt;$ JAVA "SYSTEMCALL" "testing"&lt;BR /&gt;Warning: JIT compiler "SUNCOMPILER" not found. Will use interpreter.&lt;BR /&gt;Exception in thread "main" java.lang.UnsatisfiedLinkError: no SNDSNMP_C in java.library.path&lt;BR /&gt;        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1578)&lt;BR /&gt;        at java.lang.Runtime.loadLibrary0(Runtime.java:788)&lt;BR /&gt;        at java.lang.System.loadLibrary(System.java:834)</description>
      <pubDate>Mon, 06 Apr 2009 14:49:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393951#M42031</guid>
      <dc:creator>SAMI AHMAD</dc:creator>
      <dc:date>2009-04-06T14:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393952#M42032</link>
      <description>and my options file looks like this :&lt;BR /&gt;&lt;BR /&gt;SUNNY2$ type sndsnmp_c.opt&lt;BR /&gt;case_sensitive=YES&lt;BR /&gt;symbol_vector=(Java_SYSTEMCALL_SNMPTRAP=PROCEDURE)&lt;BR /&gt;case_sensitive=NO&lt;BR /&gt;java$java_shr/share&lt;BR /&gt;gsmatch=lequal,1,1</description>
      <pubDate>Mon, 06 Apr 2009 14:52:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393952#M42032</guid>
      <dc:creator>SAMI AHMAD</dc:creator>
      <dc:date>2009-04-06T14:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393953#M42033</link>
      <description>looking at the files in sys$common:[java$142.vms_demo...]build_example.com , I see following which is confusing me, what &lt;BR /&gt;is the function of the libgesyi logical pointing to the shared image ? I didnt define any such logical, is this the reason iam getting error? how is this logical name constructed ?&lt;BR /&gt;&lt;BR /&gt;$ link/share=getjpi_shr.exe getjpi_nat.obj,getjpi.opt/opt,java.opt/opt&lt;BR /&gt;$ link/debug/share=getjpi_g_shr.exe getjpi_nat.obj,getjpi.opt/opt,java_g.opt/opt&lt;BR /&gt;$&lt;BR /&gt;$ define/nolog libgetsyi sys$disk:[]getsyi_shr.exe&lt;BR /&gt;$ define/nolog libgetsyi_g sys$disk:[]getsyi_g_shr.exe&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Apr 2009 15:03:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393953#M42033</guid>
      <dc:creator>SAMI AHMAD</dc:creator>
      <dc:date>2009-04-06T15:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393954#M42034</link>
      <description>ok I found on HP site how to link the image properly and that fixed the issue so now i can concentrate on application errors , any ideas why iam getting those special characters instead of the string that iam inputting as parameter?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SUNNY2$ link/share/exec=java$sndsnmp_c_shr.exe sndsnmp_c,sndsnmp_c/opt&lt;BR /&gt;&lt;BR /&gt;SUNNY2$ def/job/log java$sndsnmp_c_shr sys$login:java$sndsnmp_c_shr.exe&lt;BR /&gt;SUNNY2$ JAVA  "SYSTEMCALL" "TESTING"&lt;BR /&gt;Warning: JIT compiler "SUNCOMPILER" not found. Will use interpreter.&lt;BR /&gt;This is java ..calling the C routing&lt;BR /&gt;@Â²UPÂ²UÃ&amp;nbsp;`Uî¤»U0lÅ¸z;lÅ¸zî¤»6for now lets omit this&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Apr 2009 15:22:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393954#M42034</guid>
      <dc:creator>SAMI AHMAD</dc:creator>
      <dc:date>2009-04-06T15:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393955#M42035</link>
      <description>&amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;any ideas why iam getting those special characters instead of the string that iam inputting as parameter?&lt;BR /&gt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;Because you're not using it?&lt;BR /&gt;&lt;BR /&gt;- The jstring parameter msg is probably not UTF8 encoded. That's why I suggested GetStringChars and not GetStringUTFChars.&lt;BR /&gt;- The jbyte variable str is not a null-terminated C string. That's why I suggested using GetStringLength&lt;BR /&gt;&lt;BR /&gt;cu,&lt;BR /&gt;  Martin</description>
      <pubDate>Mon, 06 Apr 2009 15:57:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393955#M42035</guid>
      <dc:creator>Martin Vorlaender</dc:creator>
      <dc:date>2009-04-06T15:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393956#M42036</link>
      <description>There are Java SNMP libraries widely available that can send SNMP traps, and various of which would seem more supportable than this current approach.</description>
      <pubDate>Mon, 06 Apr 2009 16:07:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393956#M42036</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-04-06T16:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: calling C from java</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393957#M42037</link>
      <description>sorry i think the code is not upto date . iam using jstring n not jbyte&lt;BR /&gt;&lt;BR /&gt; jstring jstr;&lt;BR /&gt;  jstr = (*env)-&amp;gt;NewStringUTF(env, result);&lt;BR /&gt;        if (jstr == NULL) {&lt;BR /&gt;            fprintf(stderr, "out of memory");&lt;BR /&gt;            return 0;&lt;BR /&gt;        }&lt;BR /&gt;&lt;BR /&gt;    printf("%s","now in C routine");&lt;BR /&gt;    printf("%s", jstr);</description>
      <pubDate>Mon, 06 Apr 2009 16:08:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calling-c-from-java/m-p/4393957#M42037</guid>
      <dc:creator>SAMI AHMAD</dc:creator>
      <dc:date>2009-04-06T16:08:38Z</dc:date>
    </item>
  </channel>
</rss>

