🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17147

Re: C code in JBuilder?

#17147
From: Sergio Fernandez
Date: Sun, 13 Dec 1998 00:00
39 lines
1833 bytes
This is not the most elegant solution, but any code with you have in another
language can be easly used in Java, by creating an .exe and calling in from
Java, passing any needed parameters.

However, you should think of this as only a patch until you can integrate
the code with your java code.
Its not good, to have 10 or 15, small .exe modules being called from a Java
program, kind of defeats the all Java Portability reason.

here a sample of how to Launch a program from inside Java:

 // Launch Another Application
    String fileName = "notepad.exe";
    String  sys = System.getProperty("os.arch");
    String  os = System.getProperty("os.name");
    try
    {
        Process p = Runtime.getRuntime().exec("start "+fileName);
    }
    catch(Exception e2)
    {
        System.err.println("Exception : "+e2);
    }

Sergio Fernandez

Jonathan wrote in message <74lne3$bnv1@forums.borland.com>...
>I have code in C which performs a particluar function- can someone tell me
>how to use this code in my program calling it etc...
>
>a) does the code need to be in .exe form,
>b) can it directly use its code etc..
>c) where can i find out details
>
>many thanks
>
>Jonathan
>
>
Technical Details
Message-ID: <750tjb$mfi$1@fir.prod.itd.earthlink.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <74lne3$bnv1@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,f26e4d668106d02f
X-Google-Attributes: gidf74b3,public
From: "Sergio Fernandez" <pabsoftware@earthlink.net>
Subject: Re: C code in JBuilder?
Date: 1998/12/13
Message-ID: <750tjb$mfi$1@fir.prod.itd.earthlink.net>
X-Deja-AN: 421860072
References: <74lne3$bnv1@forums.borland.com>
X-Posted-Path-Was: not-for-mail
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-ELN-Date: 13 Dec 1998 17:30:19 GMT
X-ELN-Insert-Date: Sun Dec 13 10:15:38 1998
Organization: EarthLink Network, Inc.
Newsgroups: borland.public.jbuilder.java.language