How to start a java program on another machine from one on my machine.

During the next few weeks, I will be designing a grid computing system for a research project I am working on. The grid will be written entirely in java using java 2 SE. The question I have is, is there a way for the main program to remotely start the other programs on the other machines? I am very familiar with most networking concepts, but java is not my primary language so I was having trouble tracking down this feature if java even has it. Any suggestions you have would be greatly appreciated.
thanks

The administrators of each machine have agreed to install my java programs so that I may run my software. Worst case scenario I can have them manually start my program on each machine. The grid is to be the backbone of a very large simulation software to simulate around 18 million ISO shipping containers and the boats and ports they are on. The simulation will be used to test several security system designs. Because of the large scale of the problem, the solution has been decided to be a distributed system so that we can spread the load over a large number of systems. I understand the whole start a service on the other machines concept. I am looking for a way to start an already installed java program with as little human intervention as possible. The service idea will work. What I was looking for more specifically was a way to start the java virtual machine and run my code without having to leave a program running on their machine because like i said earlier they are personal machines. anyways if it is not do able I understand. Like I said, java is a second language and I don't yet know its limits or restraints.

Similar Messages

  • How to run a java program in another folder

    Hello!
    I want to run for example the java class file in the path ./sourcecode/javafile.class. It works fine if I do the following:
    cd sourcecode
    java javafile
    but it cannot work if I do:
    java sourcecode/java
    The error it outputs is NoClassDefFoundError.
    Can someone tell me how to run a java program in another folder
    thanks a lot.

    You need to specify the classpath using the -cp flag when running. so instead of
    "java sourcecode/javafile"
    Try
    "java -cp sourcecode javafile"

  • How to start a java program as a start-up service in Linux?

    i sucessfully started a java program by adding a script to /etc/init.d,
    but in the script, i have to type the full path of the java laucher, the environment variables are not loaded on startup, what should be done to avoid the full path in the script? Any one has a similiar experience or got a solution to share?

    I'm replying to myself .... ;-) ahah
    All we need for this purpose is JavaService, at link
    http://www.alexandriasc.com/software/JavaService/index.html

  • Java Program to copy file from one directory to another failing

    Hello All,
    Oracle Applications 12.1.3
    RDBMS: 11.2.0.30
    SQL*Plus: 10.1.0.5.0
    Java beginner here so help is much appreciated.  I'm have some java code that I'm using to copy a file from one directory to another in an Oracle Applications Server.  I notice that when moving to a new instnace I started to get file not found errors.  I think it's because of the directory.  My question is, does the directory in which I trying to pick up the file have to be a DBA_DIRECTORY, or a UTL_FILE directory in order for the java to find the file and move it?
    Here is my code...
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "COPY_FILE_JVS" AS
    import java.io.*;
    public class COPY_FILE_JVC{
      public static void copy(String SourceFile, String DestDir) {
        File source = new File(SourceFile);
        File dest = new File(DestDir);
        File cpDestFile = null;
        try {
          if (dest.isDirectory()) {
              if(source.isFile()) {
                System.out.println("File name = " + source.getName());
                System.out.println("File name dest = " + dest.getPath() );
                System.out.println("File name cpDestFile = " + dest.getPath() + File.separator + source.getName());
                cpDestFile = new File(dest.getPath() + File.separator + source.getName());
              else {
                System.out.println("Directory or File Not Found");
                return;
          BufferedInputStream  br = new BufferedInputStream (new FileInputStream (source));
          BufferedOutputStream  bw = new BufferedOutputStream (new FileOutputStream (cpDestFile));
          int read = 0;
          while((read = br.read()) != -1) {
            //System.out.println((char)read);
            bw.write(read);
          br.close();
          bw.close();
        catch (FileNotFoundException e) {
        e.printStackTrace();
        catch (IOException e) {
        e.printStackTrace();

    I get these messages when calling the java from SQL Plus as follows...
    serveroutput on size 100000;
    dbms_java.set_output(1000000);
    MY_PKG.CopyFile('/home/my_user/set_env.sh','/interface/home'); (this is call to oracle pl/sql package which calls the java.)
    PL/SQL procedure successfully completed.
    Directory or File Not Found
    PL/SQL procedure successfully completed.
    If I change the directory from /home/my_user/ to any directory that is defined in DBA_DIRECTORIES or is a UTL_FILE directory to program works.  Is it perhaps because the java is in a PL/SQL package as seen below?  The PL/SQL program runs as the APPS user and I have issued the following the command grant JAVASYSPRIV to APPS.
    Here is the PL/SQL Package....
    CREATE OR REPLACE PACKAGE BOLINF.MY_PKG AUTHID CURRENT_USER AS
    CopyFile(p_SourceFile IN VARCHAR2, p_DestDir IN VARCHAR2);
    +++++++++++++++++++++++++++++
    CREATE OR REPLACE PACKAGE BODY BOLINF.MY_PKG  is
    CopyFile(p_SourceFile IN VARCHAR2, p_DestDir IN VARCHAR2)
    AS LANGUAGE JAVA NAME 'COPY_FILE_JVC.copy(java.lang.String, java.lang.String)';

  • Running my java program on another machine

    Hi
    I have built my program using the much maligned Borland JBuilder, so being quite proud of my new programe i want to run it on other machines, ie i want to put it on a cd and distribute it.!! So how do i do this, i understand that another machine will have JVM installed however is there somthing similar to .exe. Appreciate this may have been covered before but i think i may be confusing myself.. which aint hard
    in anticipation many thanks
    Nige

    exes? What for? How do you run an exe under UNIX?Something you may very well have to do is grant execute permission on the executable file that was thus created. UNIX and Linux do not automatically grant execute privileges on files the way Winblows does.
    PS.

  • Call a program of another  system from one system

    Hello Gurus,
    I have a module pool in R/3 in which i have a tab  which call
    a progam of another system.
    Actaully a screen is call,
    as the user which i hav to use is a system user i can not use call transtion.
    its gives me a error.
    Dynpro_send_in_background.
    So please me with anothe way of calling the transaction with user type system user.
    points will be surely awared
    aditya.

    Hi  all,
    I know that if i use user type as service or dialog it will work
    with the call transaction.
    But  i have to use usertype as system user, as it is recommanded from security point of view.
    So i need to get that screen from my R/3 system user user type as system user.
    Do any one have any altanative solution to it.
    Thanks
    Aditya.

  • How do you start a java program with more RAM alloaction

    Hi
    can anyone please tell me how to start a java program to start with lots of RAM (RAM size is sent as a parameter), I have seen it somewhere and now I cant remember it. I have a server application to run this way.
    thanks and rgds
    sunil

    see the tooldocs of java: http://java.sun.com/j2se/1.4/docs/tooldocs/tools.html

  • Starting a java program on System boot/startup

    Hi,
    I am trying to find out how to start a java program on system startup which basically spawns a Thread which in turn does some processing.
    Came across windows specific options which help one make it as a service.Making a .bat for windows and .sh for linux could be a option but not sure where to put these in respective OS or whether it is a good option.
    If someone has tried out similar thing please let me know the details for the same.
    Regards
    Raj

    [codes]
    in command prompt
    type edit startupor somename.bat
    then type
    cd C:\Program Files\Java\jdk1.5.0_01\bin
    javac data1.java
    java data1
    and save
    [codes]
    copy startup.bat file
    and click on start-->programs--> startup(rigthclick and open)
    then paste that file into that folder...
    now you ll get that file opened whenever system boots.
    reply if this was usefull;)

  • Compiling one java program by another

    hi ppl
    how to compile a java program by another java program by using javac command.
    that is prog A must compile prog B using " javac B.java" command

    Try com.sun.tools.javac.Main.
    You require JDK_HOME/lib/tools.jar in CLASSPATH.

  • How to start an executable program from a java program ?

    Hi,
    does someone know how to start an executable program from a JAVA program ?
    Thanks, Fred.

    Take a look at the Runtime class.
    -S-

  • How to make a Java program that recognises a function of two variables...

    How to make a Java program that recognises a function of two variables to assign values to that?
    First I will give an example and then do the question.
    Ex1.
    We have any function, eg.y = x ^ 2 + 1 (read 'y' equals 'x' high to the square), a function of the second degree.
    To build the graph of this function attach values to 'x' to find the values of 'y'
    And thus mount the pair ordered (x, y) which represents a point on the Cartesian plane.
    Assigning values to 'x' 'we can build up a table that gives us the pairs ordered:
    We can use any numbers, but arfer interval [-3.3]
    X | y = x ^ 2 + 1
    -3 | Y = (-3) ^ 2 +1 = 10
    -2 | Y = (-2) ^ 2 +1 = 5
    -1 | Y = (-1) ^ 2 +1 = 2
    0 | y = (0) ^ 2 +1 = 1
    1 | y = (1) ^ 2 +1 = 2
    2 | y = (2) ^ 2 +1 = 5
    3 | y = (3) ^ 2 +1 = 10
    We then ordered the pairs:
    (-3.10), (-2.5); (-1.2), (0,1), (1,2), (2,5), (3,10)
    Tabem that can be represented by a table:
    X | y
    -3 | Y = 10
    -2 | Y = 5
    -1 | Y = 2
    0 | y = 1
    1 | y = 2
    2 | y = 5
    3 | y = 10
    Now I begin to explain my doubts.
    See this program:
    Ex2
    * To change this template, choose Tools | Templates
    * And open the template in the editor.
    Encontrando_o_valor_de_y package;
    * @ Author des Soldat Gottes
    Import javax.swing.JOptionPane;
    Public class (Main
    * @ Param args the command line arguments
    Public static void main (String [] args) (
    Int x, y;
    String x1;
    X1 = JOptionPane.showInputDialog ( "We have the function y = x + 1 \ n" +
    "Assign a value for 'x',"); / / receives a value for the function y = x + 1
    X = Integer.parseInt (x1); / / tranforma String in int
    Y = x + 1; / / receives the value of 'x' and calculates' y '
    JOptionPane.showMessageDialog (null, "The value of 'y' is: \ t \ t" + y);
    / / Displays the value of 'y'
    System.exit (0);
    We see that the program receives above a value for 'x' and replaces the function contained in the program, y = x + 1, and so is the value of the variable 'y'.
    In: x1 = JOptionPane.showInputDialog ( "We have the function y = x + 1 \ n" +
    "Assign a value for 'x',");
    The entry is a number and that number is assigned aa ja existing function in the (y = x + 1).
    The question is: would it be possible to come to a function?
    Ex: the program ask: DIGITE THE FUNCTION?
    The USUARIO DIGITARIA A FUNCTION ANY, TYPE: y = x ^ 2 +1
    The program would recognize the function and give numerical values to that function as Ex1, at the beginning of this text.
    And then to find the values of the x and y launch a table.
    It would be possible that?
    By invez of entering with a number so that the program sustitua a function ja existing as Ex2, seen above, entering with a function quaquer (type: y = x ^ 2 +1) for the program atribuisse values to that function and then create a table of values as Ex1.
    I hope it has been easier to understand my doubts now.
    Thank you for your attention!
    God bless!

    rafaelmenezes wrote:
    Thanks for the explanation, could understand what fly said.
    But as it applied to a program?
    How to create a program that recognizes that the entry coefficients?Are you asking about how to parse out the coefficients from the string "3x^4 + 4x^3 - 8x^2 + 5x^1 + 2x^0"? If you define the format to strictly follow that example, this should get you started:
    Strip out the spaces
    Split the String on "x^"
    That should give you [3, 4+4, 3-8, 2+5, 1+2, 0]
    Split each resulting String on "+ | -", preserving the operator as a token so you can apply the correct sign to the coeff.
    That should leave you with [3, 4, +, 4, 3, -, 8, 2, +, 5, 1, +, 2, 0]. Every other number is a coeff, the rest are the degrees.
    You can strip out the +, since those coeffs are already positive, and strip out the - after negating the following number. This is all assuming that you have to write this yourself. There is no doubt already a library or 5 out there that does this for you.

  • How i can call java program in VB2005 ?

    Hi members...
    Please...please...please...
    If any one now how i can call java program in VB.net program and open it ,please i want now the way to do it by details and by examples and step step to do it ,,..
    thanks ...

    If your server does not return to the command prompt, write a java programm which starts your server and returns to the command prompt.
    An example for an application like this:
    import java.io.IOException;
    public class StartApp
    public static void main(String[] args)
    if (args.length > 0)
    StringBuffer cmd = new StringBuffer();
    for (int index = 0; index < args.length; index++)
    cmd.append(args[index] + " ");
    try
    Runtime.getRuntime().exec(cmd.toString());
    catch (IOException ioe)
    System.out.println("Error: command not found: " + cmd.toString());
    else
    System.out.println("Error: missing arguments");
    An example for starting your server with that programm:
    /usr/bin/java -jar ./StartApp.jar /usr/bin/java -jar ./myServer.jar
    It works. Have fun.

  • ASP code to start a Java program (with parameters)

    Hi! All,
    I am trying to write some ASP code which should start a java program. Does anybody know a simple way to do this? Am new to ASP
    Thanks

    It doesn't have anything to do with java.
    Basically you need to make a system call which will start an external application. The external application can be anything including something like "java MyClass".
    So either find an ASP forum/board/newsgroup to ask how to do a system call or read some docs on it.

  • Using a sql trigger to start a java program

    I want 2 create a trigger on an update to a table in SQL Server, that will start a java program, is this possible?
    and if so, how do I do this...?
    thanks

    tried something similar but not exactly, should work though. in the update trigger, in databases such as 8i onwards, use a java stored procedure to code an RMI client that calls the server. implement the server as Activatable and it should start up.

  • How to call a java program in javafx class(Urgent) and even vice versa

    Hi all,
    Here I have two questions:
    1)
    Please let me know how to call a javafx in java program...
    I tried with the following code but it is not working..
    The below is the java program in which I made a call to the Fx program.
    FxMainLauncher.java
    import net.java.javafx.FXShell;
    public class FxMainLauncher {
    public static void main(String[] args) throws Exception {
    FXShell.main(new String[] {"HelloWorld.fx"});
    2) How to call a java program in javafx class
    Here is my javafx program
    import check.*;
    import javafx.ui.*
    var instance = new MyJava();
    //visible:true
    System.out.println("Number is: {instance}");
    Here is my java program
    public class MyJava {
    public static void main(String args[])
    System.out.println("JAVAFX TO JAVA");
    Even this is not working please let me know ASAP
    Thanks in advance,
    V.Srilakshmi

    GOT IT !!!
    I had to change the name of the method in .h file generated by javah command. On doing
    javac -d ../../classes HelloWorld.java
    go to the ../../classes directory (where you have the class file) and do
    javah HelloWorld
    I got a HelloWorld.h file in which I had
    JNIEXPORT void JNICALL Java_HelloWorld_display(JNIEnv *, jobject);
    I added the package name too:
    JNIEXPORT void JNICALL Java_GUI_HelloWorld_display(JNIEnv *, jobject);
    The HelloWorldImp.c file should have the same name (ie with package) and be in the same directory(ie ../../classes)
    compile and build the shared library to get "libhello.so" file
    gcc -c -fPIC -I/usr/lib/j2sdk1.3/include -I/usr/lib/j2sdk1.3/include/linux HelloWorldImp.c
    gives .o file
    gcc -shared -o libhello.so HelloWorldImp.o
    gives .so file
    then run java with the command in my first message. It works.
    Thanks for the reply "thedracle".

Maybe you are looking for

  • Purchase order GR need to post to Quality inspection stock

    Hi all, How to post stock to Quality inspection directly for a PO. Even though in GR i make sure that its posting in Quality inspection, by default it is going to Urestricted stock. How to fix this by posting stock to Quality inspection directly? Tha

  • WRT150N (New) Gateway IP stops responding to LAN and wireless clients. Hangs, stops, loss of service

    WRT150N Firmware Version: v1.51.3 : From LAN and wireless connected devices, Internet connectivity is lost. I try to ping the LAN side gateway IP address from my laptop and desktop, no response. Web management does not work either. Power re-cycle of

  • Domain masking in the status bar?

    Hi, I setup my domain forwarding and masking on Godaddy but when I checked out the website....I noticed the web.mac.com/username was coming up in the statusbar. Is there a way to mask that as well? I just don't really see the point of masking if peop

  • USB headset trouble with Skype

    *I have a pair of "Skype certified" headsets (Typhoon) and a LogiLink USB splitter. When using it with Skype, I can hear fine, but the headset microphone does not work*. I've changed all the preference settings on my computer and with Skype and I've

  • Problem in updating nokia 5800

    can anyone help me with my nokia 5800 i update my nokia 5800 software using ovi suite my current version is 50.0.005, and im updating it to 51.0.006 but in the last step of the updates it says "internal error" "most probably there is non-commercial s