calling javaNew to java wiht no directions
Page 1 of 1
14 Replies - 1061 Views - Last Post: 04 October 2008 - 09:58 PM
#1
calling java
Posted 29 September 2008 - 09:26 PM
My real problem:
I need run that app. After it starts I need to call a method in that running app. I can use C, Pascal or Bash (I prefer Bash) to talk to that Java app, but I could use Java.
Any help will be apreciated.
Replies To: calling java
#3
Re: calling java
Posted 30 September 2008 - 02:13 AM
#4
Re: calling java
Posted 30 September 2008 - 02:46 PM
public static void main(String[] arg) method into it
at the console prompt:
> java filename
should call this method
#5
Re: calling java
Posted 30 September 2008 - 08:27 PM
#6
Re: calling java
Posted 30 September 2008 - 08:38 PM
Locke37, on 29 Sep, 2008 - 09:30 PM, said:
Yes!
I star the app (it is just a jar file) and it stays int the monitor waiting. Next I use a c/pascal/bash/ app/script to call a method with parameters into the running java app. If I succeed the java app window displays the solution. I dont need get a response from the java app. I only need it "listen" my request.
Thank you reply.
#7
Re: calling java
Posted 30 September 2008 - 08:45 PM
pbl, on 30 Sep, 2008 - 02:46 PM, said:
public static void main(String[] arg) method into it
at the console prompt:
> java filename
should call this method
"> java filename" starts the app. After it started I need to call a method into the running app (it is just a jar file). I know the method and I know the parameters, my problem is send it to the running app.
Thank you reply.
#8
Re: calling java
Posted 30 September 2008 - 08:46 PM
new_to_java, on 30 Sep, 2008 - 08:38 PM, said:
Thank you reply.
So your Java APP will have to listen to a socket or something like that. I don't see a language other than Java calling a Java method. Your are kind of lucky with your problem, 1Lacca (European based) should show up soon in your time zone but personnaly I can't see Pascal calling a Java method. He might have an idea
This post has been edited by pbl: 30 September 2008 - 08:49 PM
#9
Re: calling java
Posted 01 October 2008 - 12:33 AM
#10
Re: calling java
Posted 02 October 2008 - 09:07 PM
g00se, on 1 Oct, 2008 - 12:33 AM, said:
Thank you to all replys.
Well, currently I am using a pure Java implementation of J2ME in J2SE:
http://www.microemu.org/
Great tool.
Problem I need to speed the debug proccess of midlets. Usualy I create the midlet, run the emulator pointing to the midlet and wait it to start. It is simple:
java org.microemu.app.Main (MIDlet application main class)
Works, but it is very time consuming.
I want start the microemulator, let it stay working and command it to call the midlet I want to debug! Call the midlet is just a matter of call a method with parameters.
Microemu listen to sockets, but I have no idea how to send the command to it.
Thank you
#11
Re: calling java
Posted 03 October 2008 - 12:23 AM
#12
Re: calling java
Posted 03 October 2008 - 09:18 PM
#13
Re: calling java
Posted 04 October 2008 - 05:41 AM
If you want to call it from another language, let's say Pascal for the sake of argument, you'll need to create a VM in Pascal then invoke the appropriate method on the emulator
#14
Re: calling java
Posted 04 October 2008 - 09:50 PM
pbl, on 30 Sep, 2008 - 08:46 PM, said:
new_to_java, on 30 Sep, 2008 - 08:38 PM, said:
Thank you reply.
So your Java APP will have to listen to a socket or something like that. I don't see a language other than Java calling a Java method. Your are kind of lucky with your problem, 1Lacca (European based) should show up soon in your time zone but personnaly I can't see Pascal calling a Java method. He might have an idea
So use java is my last resource. Could you please show me an example java code where a running java app/class start other java class/app and call a methods on my command into it?
Thank you
#15
Re: calling java
Posted 04 October 2008 - 09:58 PM
g00se, on 4 Oct, 2008 - 05:41 AM, said:
If you want to call it from another language, let's say Pascal for the sake of argument, you'll need to create a VM in Pascal then invoke the appropriate method on the emulator
I know how to connect and interact to C/Pascal apps from other C/pascal apps, but I dont know how to connect to a java app using C/Pascal.
Looks like use a java application is my last resource. Like I wrote in an other reply I am considering use java. Could you show me a java code example on start a java application from other java application and talk to it (call a method) no stopping?
Thank you
|
|

New Topic/Question
Reply




MultiQuote




|