On Jan 8, 12:16 pm, Williams <[email protected]> wrote:
> I need help please.
>
> How do I connect to a jbase database from java? I am a novice and I will
> appreciate any advice from this forum please. If it requires buying the
> required tools please let me know.
>
The choices I can offer are:
a) Use Java OBjEX (Caveat: whilst this comes free with jBASE, it does
not work with later versions of the jre/jdk; I believe the version you
need is 1.3 and will possibly work with 1.4)
b) jRCS has a Java client. This is an add-on, contact your VAR or
sales rep for pricing. Caveat: It's not well documented for a
beginner.
c) Roll your own. Whilst jBASE does not have the necessary socket
tools for connectivity from Java, you could do this by connecting to
stdin and stdout, eg:
Process process = Runtime.getRuntime().exec("myBasicProgram");
BufferedWriter out = new BufferedWriter(new OutputStreamWriter
(process.getOutputStream()));
InputStreamReader in = new InputStreamReader(new DataInputStream
(process.getInputStream()));
The 'myBasicProgram' can use INPUT to receive from Java's stdout and
PRINT to send to Java's stdin. You'd have to create your own protocol
for communication. I like Dan Bernstein's netstrings protocol:
http://cr.yp.to/proto/netstrings.txt
Since you are a self-proclaimed novice, jRCS seems to be your best
option.
Dan
--~--~---------~--~----~------------~-------~--~----~
Please read the posting guidelines at:
http://groups.google.com/group/jBASE/web/Posting%20Guidelines
IMPORTANT: Type T24: at the start of the subject line for questions specific to
Globus/T24
To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
-~----------~----~----~----~------~----~------~--~---