Running a single program on several clients

Hi,
I'm making a program which is going to be put on a server. The users will have this server mapped as a network drive (say, P:). For the user to run the program, she/he will run a bat-file (which sets 'PATH' to include JRE (which is also on the server) and starts the program with javaw).
The program takes input from the user (both by reading from user-specified file(s) and by getting data from a JTable edited by the user), generates information in a (temp) file, may save the file, and may send the file to another server.
Storing of files is done on each user's own computer and not on the server (specifying "C:\TEMP" places the file on the computer running the program, not on the server).
My question is this:
When several users run the program at the same time, how will the program act?
What happens if a couple (or more) users try to do the same thing at the same time, i.e. access the same methods at the same time? (For example generate XML from the table or send the generated file.)
I've tried 'playing server' by sharing my program on the internal network and running it on other computers, and it all seems to be working well.
Is there something I should be aware of?
Should I use Threads and/or synchronization?
-negal

yes, i got that. as i said, in this case you need
locks only on the resources that multiple threads
modify (the JTable in your case, and whatever else you
are using).What?!?
There is nothing in the above discussion that suggests that a client server architecture is in use.
There is a computer A which has application code. And a computer B where the code runs. The fact that there is two computers is irrelevant to the question. From the point of view of this architecture the code just a well live on computer B. It makes no difference.
A JTable is a GUI component. Even in a client server architecture a JTable will ALWAYS be independent for every client.
Now the resources that a JTable displays might not be independent but nothing in the above points out that any resources, at all, are shared.
Now if there WAS a server component then that would mean there was an application RUNNING on the server. That is not the same as the application code being stored there.
Now there might be a shared resource in the above when the OP says "send the file to another server." But that is the only possibility of a shared component (as server application.)
Presumably if the OP has a server application (which is NOT what is being discussed here) then they need to provide more information about that. The client, as it is, does not do anything that involves shared resources.

Similar Messages

  • How to run a Applet program in a client/server way

    I have a Applet program, i use the Archive Builder in JBuilder5 to pack my program, then i install the jre1.4 in my windows 2000 . I also configure the Web server successfully. But when i open a browser, it can download the Applet,but it can not find the other classes which are uesd in my program. The browser i used is IE5.0 .
    Thank you!

    check ur archive properties in Applet tag,add it in your html document, such as
    <applet name="applet1" code="urApplet.class" codebase="[your applet relative path of html document on server]" archive="dt.jar,tools.jar"></applet>

  • Is it possible to create a remote controled VI that could be simultaneus pararell executed by several clients?

    Hi,
    first of all, excuse my low-level english.
    i have an aplication that consist in an waveforms analizer, with a main front panel and few sub panels, where data comes from *.tdms files in pc memory.
    I want to develope a remote monitored and controled project that could be used by few clients simultaneus, where they can load their own files in to the programm. It´s possible to run more than one instance of the VI at the same time.
    i´m checking the WEB UI Builder specifications, but i´m not sure if this is possible.
    thanks.

    Hi, Ángeniero,
    it is possible to control an application running on a server by several client computers simultaneously. There are two factors: licenses and reentrant execution. You can read it in the following document:
    http://digital.ni.com/public.nsf/allkb/2E814A22B7660EA786256BD500652F2C
    As regards reentrant execution, this functionality is added from LabVIEW 8.2 and higher, as you can see in this parragraph:
    "LabVIEW 8.20 introduced Reentrant Remote Front Panels which allow multiple users to simultaneously control a VI remotely. For more information on this reentrant functionality, see the Web Event in the related links section."
    All you have to do is marking your VIs as reentrant (File >> VI Properties >> Categoty: Execution). Every client computer will access to a different copy of the VI located on the server memory, so client computers can manage different data in spite of the fact that the server application is the same. You can watch this video for further information:
    http://zone.ni.com/wv/app/doc/p/id/wv-106/nextonly/y
    I hope this helps!
    Un saludo.
    Jesús.

  • I need to run multiple external programs concurrently using RMI objects.

    have a web based solutiion which uses a backend machine for some processing. I have a RMI based Java proram running on the backend machine and the web server talks with this backend machine through RMI. Now, on this backend machine, I need to call some external program using Process s = Runtime.getRuntime().exec(....). Since this is a web application, multiple clients will connect at the same time and I need to run this external program for multiple clients at the same time.
    Here is what I do. I have a separate RMI object bound to registry for each client that connects to the web server. This RMI object implements runnable interface, since I can't extend this class from Thread (it already extends from UnicastRemoteObject). So each time I call upon a method from this object, only one process gets started and other objects need to wait till this process finishes.
    I need to start multiple processes at the sametime so that other clients don't have to wait for this thread to finish.
    Please let me know if anybody has any other solution than installing an application server on this backend machine.
    Here is my code.
    public class iLinkOnlineSession extends UnicastRemoteObject implements Session, Serializable, Runnable
      public iLinkOnlineSession(String sessName, String sessId, String rootLogs, String rootWrks) throws RemoteException
        setSessionId(sessId);
        setName(sessName);
        ROOT_LOGS = rootLogs;
        ROOT_WORKSPACE = rootWrks;
        searchKeys_ = new Vector();
        searchObjects_ = new Hashtable();
        Thread s = new Thread(this);
        s.start();
      public void run()
        System.out.println("running");
      public String checkLogin(String user, String passwd)
        String msg = "";
        String cmd = "iLinkOnlineLogin";
        cmd += " param "+ user + " param " + passwd;
        System.out.println("cmd: " + cmd);
        try
          Runtime run = Runtime.getRuntime();
          Process proc = run.exec(cmd);           // Call to the external program.
          InputStream in = proc.getInputStream();
          Reader inp = new InputStreamReader(in);
          BufferedReader rd = new BufferedReader(inp);
          String line = rd.readLine();
          while(line != null)
            System.out.println(line);
            msg += line;
            line = rd.readLine();       
          int res = proc.waitFor();
        }catch(Exception e)
             e.printStackTrace();
        System.out.println("Msg: " + msg);
        return msg;
      public String searchObject(String user, String passwd, String param1, String paramVal1, String param2, String paramVal2, String param3, String paramVal3, String relLev, String mfgLoc)
        String cmd = "iLinkOnlineSearch";
        cmd += " param " + user + " param " + passwd + " param " + getSessionId() + " param " + logFile_ + " param " + param1 + " param " + paramVal1 +
              " param " + param2 + " param " + paramVal2 + " param " + param3 + " param " + paramVal3 + " param "
              + relLev + " param " + mfgLoc;
        System.out.println("cmd: " + cmd);
        try
          Runtime run = Runtime.getRuntime();
          Process proc = run.exec(cmd);                // External program.
          InputStream in = proc.getInputStream();
          Reader inp = new InputStreamReader(in);
          BufferedReader rd = new BufferedReader(inp);
          FileWriter out = new FileWriter(resultFile_);
          System.out.println("Filename: "+resultFile_);
          BufferedWriter wout = new BufferedWriter(out);
          String line = rd.readLine();
           while(line != null)
            System.out.println(line);
            wout.write(line);
            wout.newLine();
            wout.flush();
            line = rd.readLine();
          int res = proc.waitFor();
          wout.close();
          if(res == 0)
            boolean ret = createResultTable();
            if(ret == true)
              return GlobalConstants.SUCCESS_MSG;
            else
              return GlobalConstants.ERROR_MSG;
        }catch(Exception e)
                e.printStackTrace();
        System.out.println("getting results");
        return GlobalConstants.ERROR_MSG;
      }

    I guess I don't get it.
    RMI servers are inherently multi-threaded, so why are you running separate servers for every client?

  • How to run ABAP programs in another client?

    Hi:
    If one user wants to run his ABAP program that resides in Client 900 with the data in Client 500, can he do it? both the clients reside in the same SAP system (the same physical SAP server).
    If you've some idea about this, please help.
    Thuan Nguyen

    Hi Christoph:
    Thanks a lot for your help on this.
    If the Client 900 is for ABAP development (the user creates ABAP programs inside this client) and the Client 500 stores the data, can the user log in the client 500 and run his ABAP programs in Client 500?
    Thanks
    Thuan Nguyen

  • Date of last run of any program

    Hi Experts,
    Can anyone please provide how to fetch Date of last run of any program.
    I tried for transaction STAD/STAT,did not get desired Results.
    Any table name / FM in this regard will be helpfull.
    Thanks in Advance.
    Regards
    Ullas

    Hi Ullas,
    Not sure of table/FM. But i can give a pointer.
    Create one Ztable with mandt, date and time. Only mandt is key here.
    In ur program once u finish all selection screen validations just query this Ztable.
    SELECT single * INTO wa.
    Here u can get the date and time.(First time there won't be any record).
    In the last statement update this table with current date and time.
    wa-date = sy-datum.
    wa-time = sy-uzeit.
    MODIFY ztable from wa.
    Why i am asking to do it in last is ur program may fail in between. So if it reaches till the end of execution where there are no more statements to be executed MODIFY the ztable.
    So at any point of time u can get the successful execution date and time of the report from this table for the given client.
    If u don't want to happen at client level then u can remove the mandt field from table.
    Hope this may be helpful.
    Thanks,
    Vinod.

  • Attempting to install Forms 6.0.5.0.2 (or 6.0.8.8.0) run-time and 8.1.6 client on sam

    Attempting to install Forms 6.0.5.0.2 (or 6.0.8.8.0) run-time and 8.1.6 client on same NT box.
    1) I attempted to install 8.1.6 client first in c:\oracle\ora81, then Forms 6 in c:\oracle\forms6. The installer (3.3.1.2.4) errors, saying forms 6 does not support a multi-home installation.
    2) Attmpted to install Forms 6 first in c:\orant. Then installed 8.1.6 client in c:\oracle\ora81. After beginning installation (application user) the following Dependency message displays and the installation is canceled: "Installation cannot continue for the follwoing reason(s). [Oracle ODBC Driver is a single Oracle home product. It is already installed in location c:\oracle\ora81. Oracle provider for OLE DB is a single oracle home product. It is already installed in location c:\oracle\ora81. Oracle objects for OLE is a .... Pracle Provider for OLE is a single home ... You can either de-install these products or install the products in the same location as the single home products."
    Click ok and the installation cancels.
    How do I install these two products on the same box?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    We had to upgrade from 7.3.2 to 7.3.4 when we moved over to Forms
    6.0.5.0.2 and it's working fine.
    We are using Net 8 as well.
    Finn Ellebaek Nielsen (ChangeGroup ApS) (guest) wrote:
    : I have problems with Forms 6.0.5.0.2 running against an Oracle
    : 7.3.4 with Net8. When trying to insert or update records I get
    : an FRM-40508: ORACLE error: unable to INSERT record/FRM-40509:
    : ORACLE error: unable to UPDATE record. The Help | Display Error
    : menu item shows statement = "S3AVWU3wo|$6o|" (garbled
    : message), error = "ORA-12663: Services required by client not
    : available on the server" (sometimes it's "ORA-01403: no data
    : found").
    : It works fine against 8.0.5. As far as I'm aware Forms 6 is
    : certified against 7.3.4?
    : Any clues?
    : Thanks for your help.
    : Finn
    null

  • Is it possible to maintain multiple payment formats with a single Program

    Hi,
    Is it possible to maintain multiple payment formats with in a single program.
    For example let us assume that we have created 2 payments formats as 'XX-PAY1' & 'XX-PAY2'.
    When i select the parameter as '1' then 'XX-PAY1' has to run else 'XX-PAY2'.
    if its possible could you please tel us where to define the parameters in Setups.
    Many thanks,
    Zaheer S

    nazzu wrote:
    Hi,
    Is it possible to maintain multiple payment formats with in a single program.
    For example let us assume that we have created 2 payments formats as 'XX-PAY1' & 'XX-PAY2'.
    When i select the parameter as '1' then 'XX-PAY1' has to run else 'XX-PAY2'.
    if its possible could you please tel us where to define the parameters in Setups.
    Many thanks,
    Zaheer SSounds like an Apps question. Start here: https://forums.oracle.com/forums/category.jspa?categoryID=3

  • How to run a java program without Java Compiler

    I have a small project and I want share it with my friends but my friend'pc have not
    Java compiler.
    for example, I writen a application like YM, then 2cp can sent,receive messege. My cumputer run as Server, and my frien PC run as client.
    How can my friend run it? or how to create an icon in dektop tu run a java program..??..
    (sorry about my English but U still understand what i mean (:-:)) )

    To run a program you don't need a Java compiler. Just the Java Runtime Engine. That can be downloaded from the Sun website and comes with an installer.
    You could then turn your application into an executable jar file and start it somehow like jar myYM.
    There is also software that packs a Java program into an executable file. I've never used that but one that comes to my mind is JexePack. It's for free if you can live with a copyright message popping up every time you start the program.
    http://www.duckware.com/jexepack/index.html

  • Unable to run a java program...

    Hi.
    I am trying to run a server program that I have implemented, but I'm having some trouble. When I click on the run button, I get the following pop-up message:
    Could not find the main method. Program will exit!
    On the console it says the following:
    java.lang.NoSuchMethodError: main
    Exception in thread "main"
    Below is the beginning portion of my server class:
    public class JamServer
         public int groupNum = 0;
         int serverPort = 9876;
         private ServerSocket ss;
         //list of client handling threads
         //Vector handlers;
         //list of users
         public Vector users;
         public void main(String args[]) {
         try{
              ss = new ServerSocket(serverPort);
              while(true){
              Socket s = ss.accept();
              User usr = new User();
              usr.setOutput(new DataOutputStream(s.getOutputStream()));
              //users.add(usr);
         new JamServerThread(this,s,usr);
         }catch(IOException e){
              System.err.println("Could not listen on port: "+ serverPort);
              System.exit(-1);
    Does anyone have any idea why it would say it could not find the main method? It's clearly there. Please help!!
    Thanks in advance.

    To further explain, main must be static if you want the JVM to exedute it. Without the static keyword, your main method is simply another instance method which can only be accessed once you have an instance of your class. Static methods can be accessed without instanciating the class. So, the JVM expects to find a method called "main" that is both public and static, takes a String array and returns void.
    HTH

  • How to run a java program in command prompt

    hi i want to run a java program from in command prompt from another directory
    i want to run a file named First in C:\Program Files\Java\jdk1.6.0_07\bin
    so when i give the command
    java "C:\Program Files\Java\jdk1.6.0_07\bin\First"
    it doesnt works it shows
    C:\>java "C:\Program Files\Java\jdk1.6.0_07\bin\First"
    Exception in thread "main" java.lang.NoClassDefFoundError: C:\Program Files\Java
    \jdk1/6/0_07\bin\First
    Caused by: java.lang.ClassNotFoundException: C:\Program Files\Java\jdk1.6.0_07\b
    in\First
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: C:\Program Files\Java\jdk1.6.0_07\bin\First. Pro
    gram will exit.

    but it prints
    C:\>java -cp "C:\Program Files\Java\jdk1.6.0_07\bin\" First
    Usage: java [-options] class [args...]
    (to execute a class)
    or java [-options] -jar jarfile [args...]
    (to execute a jar file)
    where options include:
    -client to select the "client" VM
    -server to select the "server" VM
    -hotspot is a synonym for the "client" VM [deprecated]
    The default VM is client.
    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
    A ; separated list of directories, JAR archives,
    and ZIP archives to search for class files.
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -version:<value>
    require the specified version to run
    -showversion print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
    include/exclude user private JREs in the version search
    -? -help print this help message
    -X print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
    enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
    disable assertions
    -esa | -enablesystemassertions
    enable system assertions
    -dsa | -disablesystemassertions
    disable system assertions
    -agentlib:<libname>[=<options>]
    load native agent library <libname>, e.g. -agentlib:hprof
    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
    load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
    load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
    show splash screen with specified image
    C:\>

  • Error when running the LabVIEW program

    hello...........
    I'm newbie in LabVIEW....I have a problem when i'm running the LabVIEW program...i want to analyse data using the LabVIEW through the real experiment....
    My problem is, there is an Error when i try to start the program...This Error forced me to restart the program several times until it can run.......By the way, i'm using Picoscopes 3206 to connect the LabVIEW program in PC with the real experiment.....
    Here, I'm attached the picture that I snap when the Error occur....
    Attachments:
    error.JPG ‏222 KB

    You have to try to isolate the problem...
    Use 'Diagram disable' or 'Case' structure to run special part of code or try write a specific code to access and manage your equipment.
    Several questions could help: 
    - Are you up to date with your hardware driver?
    - Do you call external ressources (ex: dll)? perhaps with instability
    - Do you properly close connection with your equipment after using? 
    - With your offline mode, do you load all the code, including hardware driver or do you use a special method without no loading the specific code?
    - When you are able to run after many tries, is the program stable? Can you re-start it without exiting LabVIEW?

  • Problem running a Java program

    Hi...I'm developing a CORBA project and I'm using java to implement it. I wrote a Hello World program and I could compile all my files (IDL files and all the generated .java files). But when I try to run my Server program I get the following error message:
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloApp/_HelloImplBase
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
    at HelloStringifiedServer.main(HelloStringifiedServer.java:24)
    Can anyone please help me!
    Thanks in advance

    Sure, here is the Server code:
    // HelloStringifiedServer.java, stringified object reference version
    import java.io.*;
    import org.omg.CORBA.*;
    import HelloApp.*;
    public class HelloStringifiedServer {
    class HelloServant extends _HelloImplBase
    public String sayHello()
    return "\nHello world !!\n";
    public static void main(String args[])
    try{
    // create and initialize the ORB
    ORB orb = ORB.init(args, null);
    // create servant and register it with the ORB
    HelloServant helloRef = new HelloServant();
    orb.connect(helloRef);
    // stringify the helloRef and dump it in a file
    String str = orb.object_to_string(helloRef);
    String filename = System.getProperty("user.home")+
    System.getProperty("file.separator")+"HelloIOR";
    FileOutputStream fos = new FileOutputStream(filename);
    PrintStream ps = new PrintStream(fos);
    ps.print(str);
    ps.close();
    // wait for invocations from clients
    java.lang.Object sync = new java.lang.Object();
    synchronized (sync) {
    sync.wait();
    } catch (Exception e) {
    System.err.println("ERROR: " + e);
    e.printStackTrace(System.out);
    I get the previous error message when I try to run this file. Other files are those generated by the IDL compiler
    PS: Are you familiar with CORBA?

  • How can I install and run a Windows program on my MacBook Pro/?

    How can I install and run a Windows program on my MacBook Pro?

    You have several options.
    1, Use a Virtual Machine like Vmware, Parallels etc... to Create a Virtual Windows Installation and Run your program in there.  A Virtual MAchine will runn in a Window on your Desktop and share your Mac's resources RAM HD space processor. Your MAc desktop will still be available while you run Windows install.
    http://www.parallels.com/
    2. Install Windows on a partition using Bootcamp. It will run a full installation of Windows you can boot into, and run your programs.  The Mac desktop will not available until your reboot the computer and start in OSx instead of Windows.
    https://www.apple.com/support/bootcamp/
    3. Use Wine /  Winebottler to run the Application without the need for a complete Windows installation.
    http://winebottler.kronenberg.org/

  • Can We Run a ABAP Program in Background

    Hi,
    How to run an ABAP Program in Background.
    Points willbe awarded.
    Regards,
    Jayasimha

    Hi,
    <b>Please see this document also
    http://help.sap.com/saphelp_nw04/helpdata/en/fa/096ccb543b11d1898e0000e8322d00/content.htm
    Easy Job Scheduling Using BP_JOBVARIANT_SCHEDULE</b>
    To schedule a job from within a program using the express method, you need only call the BP_JOBVARIANT_SCHEDULE function module.
    The express method has the following characteristics:
    Simplified job structure: The function module schedules a job that includes only a single job step.
    The function module uses default values for most job-processing options. You cannot, for example, specify a target printer as part of the call to the function module. Instead, the job step uses the print defaults of the scheduling user.
    Only ABAP reports can be scheduled. You must use the "full-control" method to start external programs.
    The range of start-time options is restricted. Event-based scheduling is not supported.
    The function module works as follows:
    You name the report that is to be scheduled in your call to the function module.
    The function module displays a list of variants to the user. The user must select a variant for the report.
    You must ensure that the variants required by your users have already been defined.
    The user picks either "immediate start" or enters a start date and start time. Optionally, the user can also make the job restart periodically. The job is then scheduled.
    Example
    You could use the following code to let users schedule report RSTWGZS2 for checking on the status of online documentation:
    call function 'BP_JOBVARIANT_SCHEDULE'
    exporting
    title_name = 'Documentation Check' " Displayed as title of
    " of scheduling screens
    job_name = 'DocuCheck' " Name of background
    " processing job
    prog_name = 'RSTWGZS2' " Name of ABAP
    " report that is to be
    " run -- used also to
    " select variants
    exceptions
    no_such_report = 01. " PROG_NAME program
    " not found.
    call function 'BP_JOBVARIANT_OVERVIEW' " List the jobs that
    exporting " have been scheduled
    title_name = 'Documentation Check' " Displayed as title
    " of overview screen
    job_name = 'DokuCheck' " Jobs with this name
    " are listed
    prog_name = 'RSTWGZS2'
    exceptions
    no_such_job = 01.
    Regards, ABY

Maybe you are looking for