How to run java program from website?

Hello
I'd like to know how to run java program from my web page.
I'd like to push some button in this web page so java program that would be on my server
would pop-up. Can it be done automaticaly upon running this web site? (without any buttons - I just enter website and program pops up).
Cheers

I rather thought about RMI. But I could try servlets. So how it would look like?.
I would make http request in browser (enter address) and program would show up in its window?. And I would not have to change anything in my program?. This program would run then on both boxes?. One remotely and one not?.
But I would have to learn some basics, I've never worked with servlets. Could you suggest some good sites about it?. With ready examples so I could tweak them to my purpose.
Message was edited by:
macmacmac

Similar Messages

  • How to run java programs from a master java program?

    Hello,
    I have several java programs which run from the command prompt. I am seeking help with code for starting java programs from within a java program. For example, a program called master.java works something like this:
    import java.*;
    create connection pool
    create variables and result sets
    start/run slave1.java (var1, var2);
    start/run slave2.java (var3, var4, var5);
    start/run slave3.java (var1, var4);
    end of program master.java
    Each of the slave.java programs will run for up to an hour. I do not want the master.java program to pause for each slave program to stop. Instead, the master program will keep running and multiple slave programs will be running simultaneously with the master program. When a slave program starts, it is on its own. Also, if possible, I would like to have each of these slave.java programs open in a new separate command window, so I can observe each slave program running in separate windows.
    Any suggestions for code or helpful documentation are greatly appreciated.
    Thank you,
    Logan

    Thank you all.
    At the bottom of master.java I have successfully started a batch file with these lines:
    String jcmd = "cmd.exe /c start c:/data/simulations/MsgViewCount2.bat";
    Process proc = Runtime.getRuntime().exec(jcmd);
    But I still cannot get a java program to start. Here is one variation I have tried:
    String [] cmdArray = new String[2];
    cmdArray[0] = "java";
    cmdArray[1] = "slave1";
    Runtime runtime = Runtime.getRuntime();
    Process process = runtime.exec(cmdArray);
    This compiles, and no errors occur, but nothing happens.
    Regarding this comment:
    Why Runtime.exec? Either make the slaves Runnable or
    just call their main() methods.
    Oh, I see. Sepearate output. :PNone of the slave.java programs have any output.
    Thanks again.

  • How to call  java program from ABAP

    Hi Experts,
         My requirement is to call java programs from ABAP. For that i have set up SAP JCO connection by using this link http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/739. [original link is broken] [original link is broken] [original link is broken] Connection gets sucessfully. After this how to call java program from ABAP as per our requirement. Please help me out.
      Also i tried this way also.. but while executing the DOS Command line appear & disappear in few seconds. So couldnt see the JAVA output. Please help me out to call java programs in ABAP..
    DATA:command TYPE string VALUE 'D:Javajdk1.6.0_20 injavac',
    parameter TYPE string VALUE 'D:java MyFirstProgram'.
    CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
    application = command
    parameter = parameter
    OPERATION = 'OPEN'
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    bad_parameter = 3
    file_not_found = 4
    path_not_found = 5
    file_extension_unknown = 6
    error_execute_failed = 7
    OTHERS = 8.
    Thanks.

    This depends on the version of your Netweaver Java AS. If you are running 7.0, you will have to use the Jco framework. The Jco framework is deprecated since 7.1 though. If you want to build a RFC server in 7.1 or higher, it is adviced that you set it up through JRA.
    Implement an RFC server in 7.0:
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
    Implement an RFC server in 7.1 or higher:
    http://help.sap.com/saphelp_nwce72/helpdata/en/43/fd063b1f497063e10000000a1553f6/frameset.htm

  • How to run Java program as Daemon Server in linux

    How to run Java program as Daemon Server in linux
    i would like to run the java program on system start up in a redhat linux system
    can any one provide rc.status file

    http://wrapper.tanukisoftware.org/

  • How to call java program from javascript

    Hi,
    I have an java program which will transform one xml to another xml using XSLT.
    I want to call this java program from Javascript? Is this possible? Please suggest me.
    Thanks,
    Gopal

    is it not possible?
    do i have to refresh the page and read in the values like...
    <%
    String ename = request.getParameter( "EmployeeName");
         session.setAttribute( "ename", ename);
    %>and then call the class from here?
    looking around ive come across ajax but i dont know how to use it and what you need to install and if its compatable with tomcat and jsp?
    is ajax better or not really worth it?
    i have anything up to 100 fields that need saving at one save click

  • Running java program from DOS

    I have just installed JDK 5.0 (update 4) and have tried writing a small demo program. The .class module is created ok but when invoking java I get "Exception in thread "main" java.lang.NoClassDefFoundError. I am running java from a DOS batch file with one command of c:\progra~1\java\jdk15~1.0_0\java %1. A similar batch file is used to invoke javac which works.
    Any ideas what I'm doing wrong? Thanks.

    You can't run a Java program from DOS, in fact you can't even install a JRE under that old operating system as Java requires a 32 bit or 64 bit operating system architecture which DOS never offered.
    But on the off chance you mean a command prompt from Windows...
    Check your classpath, most likely you forgot to add the current directory to that.

  • How to protect java program from hotspot sa

    I tried several methods(eg. custom classloader、jvmti) to protected my java program from decompile. They work well until meeting hotspot sa. "Hotspot sa classdump" is so powerf that it can directly dump class from java process's memory in a non invasive debug mode, which make any protect method useless. Is there any way to protect from "hotspot sa classdump"?

    There's really no secure way to protect code, in the way that you imagine.
    However, your code is most likely not so important that it matters (if it were important, you would already know that it's impossible to give your code away to someone and protect it at the same time).
    Of course if you provide your software as a service, the code is never executed by the client and he can't decompile it. Of course not all software can be provided as a service.

  • How to run java program on clients system when system strats

    hi
    I want to run java program on clients computer automatically when system boots up. plzzzzz help me .......

    You can add the call to the java program to the auto start group (under windows).
    You can't start a client program when the server starts, if that is what you mean.
    Timo

  • How to run Java codes from ABAP

    Hi Gurus,
    I have .JAVA & .CLASS files which connect to the website through HTTPS connection and generates the TEXT file at C:\ by obtaining some data from WEB Site. This java files needs SSL certificate Which has been imported in SAP. How can i run the Java files from SAP R/3, Please help me.
    Thanks
    Ganesh

    hiii
    refer to following link..
    Java from ABAP?
    Re: Calling Java API from ABAP using JCo
    i hope it will solve your problem
    regards
    twinkal

  • How to run java programs on machines without JDK

    I want to make an installer for my java program that would work on machines even without JDK or Java runtime. How should I go?

    Here's another point.
    There is no particular need to "install" anything to run java. You can simply copy the jre to a directory of your choice, and from that directory invioke the JVM as you need it.

  • Run java program from start menu

    Does anyone know how to write a class so that when a user is running my program for the first time they can run an installation file that will put a shortcut to my bat file in the start menu.Know of any place i can get info on setting up an installation class or something similar.
    If you could give me some info would greatly appreciate it,it's my first time doing anything this big and not really sure where to start with writing an installation file

    If your program is just for windows then giving the user an exe instead of a .bat file will help.
    http://www.rolemaker.dk/nonRoleMaker/javalauncher/marner_java_launcher.htm
    Your user will either need to have a JVM installed on their machine or you will need to provide one with the application. If you intend to provide one, the licence doesn't allow you to install it on to the target machine, but you can place the java dir in your directory structure and access the java/javaw command by a relative path (see the help on the above site for that)
    Once you have a directory structure set up for your application, you can use any comercial intall program to give give you a setup.exe file or whatever. if you are providing the VM with your distribution, then the file will at least 14MB plus your class and resource files. If you read the licence agreement for distributing the VM, it tell you what files can and can't be removed from it to make the file a bit smaller. For instance, you can remove webstart because you won't be using that.
    search http://www.download.com/ for installers. I think there are a few ad supported ones if you don't want to pay

  • How to run java program in e-business suite?

    I created a java program to create/update item in e-business suite,but i don't know how to run it.
    Edited by: 919265 on 06-Mar-2012 23:06

    The following metalink notes will helpful for u too
    Java Concurrent Program FAQ [ID 827575.1]
    How To Create a Java Concurrent Program? [ID 827563.1]
    How to register and execute Java Concurrent Program ?in Oracle Applications R11i ? [ID 186301.1]
    Regards
    Mazhar Hussain

  • How to run java program created in Sun Java Studio

    Hi All,
    sorry for easy question. I'm new in java.
    I have created Swing/AWT application with Sun Java Studio. I can run it using Sun Java Studio and it works properly. How to run this application in DOS-promt using "java ....."? I think, I shall define all classpathes but I dont know exactly.
    Enviroment:
    WinXP
    Sun Java Studio (C:\Sun\studio5u1_se)
    SDK (C:\Sun\j2sdk1.4.2_04)
    Application files (C:\Sun\My)
    Thanks.

    change this to yours
    set path=c:\j2sdk1.4.1_01\bin;c:\j2sdk1.4.1_01\jre\bin;%path%
    set classpath=c:\j2sdk1.4.1_01\lib;c:\jdk1.4.1_01\jre\lib;%classpath%
    go to directory where code is
    javac CLASSNAME.java
    then to run it
    java CLASSNAME
    note also look at executable jar files

  • Running Java program from script shell using SSH

    Hello!
    I have this problem: I need to run a java command like: java Prog arg1 arg2 arg3 on i machines, using a shell script.
    First of all, I'm trying to make it work for a single machine. But the problem is when I write the line << ssh user@localhost "java -classpath /a/b/ Prog arg1 arg2 arg3" >> and run the script, it is not able to execute the entire line. Is there a special options for the arguments of my Prog class? I want to mention that between my arguments there is another text file which is read by the Prog and when i run the script says it cannot find that file; Please any ideas for not remain stuck here?
    Thank You in advance!

    Hello! Thank you for being so helpful..
    The part with << is not existent in my script, I've put it just here for quotation.Sorry
    So, from the terminal under Linux I run the command like this: I go to my folder where I have all my .java Classes and I execute the command java Prog arg1 arg2 arg3 . Where arg1...arg3 are arguments which are read from the terminal and then used in my Prog. One of the arguments is a text file, from which Prog.java reads line by line it's content. How can I run the same thing , under a script using SSH? This is basically my question, taking into consideration what I've written in my first post.

  • How to run Conc program from Menu.Pls Help.

    Hi,
    In PO Screen i want to enable the user to run a concurrent request by clicking on a top menu. Say I have a prompt called "Purchase Order", clicking on it should run a Custom concurrent program passing some parameters from PO Screen.Output should be in PDF.
    How do I achieve this?

    Hi,
    You may achieve that using form personalizations.
    Step 1
    Condition: WHEN-NEW-FORM-INSTANCE
    Action: Menu
    Menu: MENUxx or SPECIALxx
    Step 2
    Condition: MENUxx or SPECIALxx
    Action: Builtin
    Builtin Type: Launch SRS Form
    Hope it helps.

Maybe you are looking for

  • Skype Wifi Does Not Connect

    I'm currently in Melbourne at the Bell City hotel. I'm trying to connect to the Skype Wifi I am constantly prompted by. I have $16 in my account but I cannot get a connection. If I join the Bell City wifi point and then try to start Skype Wifi it say

  • Can't import mij pictures

    I have lightroom 4,4. today i wanted to import mij pictures from mij camera (canon 50D) as I did many times before, yet today it didn't work he said: i don't recognise the type. but they are the same as usual just raw pictures. what can I do???? Help

  • Site elements refreshing, dont want that.

    So as I uploaded my site and started clicking around, I notice the background refreshes every time and so do the images and such, how do I stop that? When I originally started doing this, I wanted to use frames for that reason, but thats legacy stuff

  • Encore 2.0 Audio and DVD Player Compatibility

    Hello I've made about 200 dvd's for a dance recital I've edited. This is my first year using 2.0 and have already had 2 people come back saying all they can hear is the applause track, and no music (in premiere, I had an audio timeline with just musi

  • Vision_acquisition

    Hi, I use LabView 2011 on Windows7 machine, I have installed Vision Acquisition Software correctly in my machine, and when I open a project I recibe a Error list with IMAQdx....vi errors. I tryed to reinstall and reapir Vision and the problem continu