I have a simple question, join livecode an
I have a bunch of java files (.java) and I want them to call include them in livecode.
I can start a shell and call the procedure by the following command java -jar getprocess.jar -host param1 and so on.
The problem I have with this Jar method is the calling as shell.
I can embed windows dll or mac osx bundles but java it still bothering me.
Jan Schenkel has some tips but I do something wrong. Is a helper required ?
Q : How do I call a function or procedure in a .java file.
java and livecode can that we embedded
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 37
- Joined: Fri Sep 09, 2011 10:04 am
- Location: Netherlands
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Location: Aalst, Belgium
- Contact:
Re: java and livecode can that we embedded
Hi there,
A few years back I wrote an external that allowed embedding a Java VM in a LiveCode process and then calling commands and functions in it.
This worked quite well (as long as you didn't use it for any GUI stuff using AWT or Swing). But I never published it as RunRev was overhauling the LiveCode externals interface.
However, there are advantages to starting a separate java process.
First of all, you don't have 32-bit/64-bit problems as each process can have its own bit-ness (LiveCode is limited to 32-bit and Oracle doesn't provide a 32-bit on OS X).
Secondly, your LiveCode app can stay responsive to user interaction while the Java process churns away.
This blog post includes a skeleton for delegating tasks to a separate Java process and having these tasks handled in a multi-threaded way.
HTH,
Jan Schenkel.
A few years back I wrote an external that allowed embedding a Java VM in a LiveCode process and then calling commands and functions in it.
This worked quite well (as long as you didn't use it for any GUI stuff using AWT or Swing). But I never published it as RunRev was overhauling the LiveCode externals interface.
However, there are advantages to starting a separate java process.
First of all, you don't have 32-bit/64-bit problems as each process can have its own bit-ness (LiveCode is limited to 32-bit and Oracle doesn't provide a 32-bit on OS X).
Secondly, your LiveCode app can stay responsive to user interaction while the Java process churns away.
This blog post includes a skeleton for delegating tasks to a separate Java process and having these tasks handled in a multi-threaded way.
HTH,
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com