Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Accessing a Java class in Perl

  • 14-07-2005 11:41AM
    #1
    Closed Accounts Posts: 3,105 ✭✭✭


    ok.. i'm using the "Inline" package.
    and i need to work out how to access a java class..
    i have to run it with a command line argument.
    can someone please help me with this, if anyone has good links examples or anything.
    thanks.


Comments

  • Registered Users, Registered Users 2 Posts: 68,173 ✭✭✭✭seamus


    Not sure what the inline package is, but I did a similar thing with Java/PHP before.

    Basically created a runnable Java class (i.e. one with a main() method) that took certain arguments, and outputted the data formatted a certain way. Then from PHP I opened a process stream with a system call to "java myClass arg1 arg2 arg3", etc and read in the data outputted by the java class.

    It's messy in my eyes, but it got the job done.


Advertisement