English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I need to use Java and prolog for a project. The java code will output a string and prolog needs to do some processing on that string. So how do I pipe Java's output into prolog's input? (And then prolog's output must go into another program but that's another story...)

2007-03-03 18:11:20 · 4 answers · asked by Anonymous in Computers & Internet Programming & Design

4 answers

You've probably answered your own question, actually. You should pipe the output from your java program to the input of your prolog program, and then on from there. This is usually done with the | character on the command line, though you should look up how it's done for your environment.

You could also spawn all of your programs from within java, write to their input and read from their output streams all from the java Runtime class... look up the exec methods.

2007-03-03 19:12:06 · answer #1 · answered by Ryan 4 · 0 0

There are extra advantageous than a hundred merchandise orientated Programming Languages. Java is the particular between them as a results of fact that's the 1st in straight forward terms merchandise orientated Programming Language. that's extra effective than C++ (which replaced into developed until now Java and which isn't organic merchandise orientated language) in terms of reminiscence administration (rubbish collector) and others. It has even have been given many extra good factors.

2016-10-02 08:43:14 · answer #2 · answered by ? 4 · 0 0

Seems like generally a bad idea unless absolutely necessary. Getting a non-trivial program "knit together" is often a headache.

2007-03-04 08:56:18 · answer #3 · answered by lda 4 · 0 0

Not sure you can combine those languages. But if you use the new Visual Studio (VB.NET, C#, J#, ASP.NET, ADO.NET) they compile into a COMMON LANGUAGE RUNTIME file that can be written in any of those languages.

2007-03-03 18:54:15 · answer #4 · answered by Richard H 7 · 0 0

fedest.com, questions and answers