How to make a java program run as a background process.

</pre>
writing a client server application.
a program is supposed to run on a the client right from the time the client turns on the computer till the computer is turned off.
the catch is the client should all the time be unaware of the program running in his computer, no dos prompt window, no icon on the taskbar,etc. can i convert it the class file into an exe file through software and put the exe filename in autoexec.bat. But then i think that the dosprompt window will open up on starting, but the client should see nothing.
please help
</pre>

</pre>
Thanks Daniel and jesper,
could not really fully understand what you mean.
creating a batch file is okay, but do you configure it
to run in a an hidden mode.
Also I have no idea of how to make a window
service.can you please elaborate a bit
</pre>

Similar Messages

  • 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.

  • HT201365 how do i turn off programs running in the background?

    how do i turn off programs running in the background?

    i double tapped home button, swiped up and nothing happened. what is screen shot.  I even tried swiping up on each icon, still did not close app  cannoyt get anything on internet  too many apps running at once

  • How to make a java program, that can be used by c++ application

    I'm developing a Java web application (WEBapp), but I have also a c++ program.
    C++ program must use WEBapp method to communicate on the web.
    How to make a Java public function that accept value, elaborate, then return the resul to c++ application?

    jschell wrote:
    You have C code.
    You have Java code.
    The two must communicate.I have a c++ program, and a Java program.
    C++ program wants to communicate on the web (send text), and I'm trying to add this functionality to it creating a Java program.
    NOW THE PROBLEM? How c++ program can use java-program (in local) to send data on the web?
    You can just JNI to communicate either from java to C++ or from C++ to java. That is direct communication in that there is a single process involved. Thus you will no longer have a java application and a C++ application but rather a single application.I don't know JNI, i found http://java.sun.com/docs/books/jni/ and I think is too difficult to implement?
    You can use files or sockets to communicate. Using sockets allows for any number of additional protocols including the previously mentioned web services. Those methodologies would allow more than one application to exist.I developed yesterday a java-side-interface using socket (in local host 127.0.0.1). So the c++ program must write or read to/from the socket to comunicate to java (then the java program send data on the web).
    Finally it might be the case that you have a C++ application which you cannot modify. In that case then you MUST use whatever input/output mechanism that it supports. There is no choice. And until you have fully determined what those mechanisms are it is pointless to discuss a solution.I can modify the application, but I don't have developed it. The c++ application use a third-part dll (taken from SKYPE) to comunicate on the web: I have to remove the dipendence from this dll, and add the java program: java program must substitute the dll. It must be non-invasive to the c++ program. DLL calls can be "send(data)" or "receive(data)" or similar.
    For this do you think that JNI is a must, or I can use soket on local host?

  • How to make an ABAP program run for a specified number of times ?

    assalamoalikum all!!!
    Can some 1 plz tell me that How can I make my ABAP program run ONLY for 2 times (after it went in production etc)
    AND when the program runs for 2 times It then gets hanged/Locked foreever.
    Suppose my program is:
    REPORT twice002.
    write ' I will run only twice bye bye'.

    Well, I guess the only full proof way is to create a custom "Z" table which will hold the counter, in your program you would update this table every time the program runs. In this same program before updating the counter, you would retrieve the counter and check if it is = 2, if so, then write a message and RETURN.
    Regards,
    Rich Heilman

  • How to make a java-program to a exe file runing on windows?

    i kown that there were many topics on this problem.
    i want to kown how many kinds method to do this i can use now!
    i met a java-program can run on windows,but i don't find ant *.class
    files and *.jar files.it's extended file type is ".ese".
    thanks very much

    There are commercial products that allow you to do this (e.g. InstallAnywhere from http://www.zerog.com).
    One issue is that you have to decide whether you want to bundle a JRE with your program or not. If you do (and you should, in these days of XP shipping without any VM of its own), your program will be a minimum of about 9MB + whatever you actually add as part of your program :-).
    In any case, this is not a trivial undertaking.

  • Can a java program run as a system process?

    Hi,
    I need to know if a java program can be run as a system process. I don't want it to be run as a user process. Is there any way at all?

    Tomcat is such a program.
    If you want to write a program that runs like a daemon (Unix) or a Windows service (Windows), use the Jakarta Daemon Framework (no, it is not an Indonesian devil) that was used to write Tomcat. Check http://jakarta.apache.org/commons/daemon/

  • How do I shut down programs running in the background on the new os for iphones

    Just uploaded the new ios 7 for my iphone 4s. 
    I have several apps running in the background, when I push the com butten twise it shows me the apps running in the background but I cant' get them to turn off.  I tryed holding my finger on it for several moments like the old ios but nothing works.  Help Please.
    fran.

    Double-click the home button. It will bring up the multitasking set up. Any apps you want to close just hold on the thumbnail and then swipe up.

  • How to make a java program that will give you the list of files in the dir

    How can you make a program in java that will list all the files in a directory with out useing the File,FileWriter,FileReader,InputStreamReader,FileInputStream,RandomAccessFile etc. classes

    What is with these instructors? So far today I have
    seen
    Do something 100 times, but don't use a loop
    Format numbers, but don't use NumberFormat
    and now this.
    What are these people trying to teach?
    Java??? I don't think so.Perhaps it is because these instructors are learning Java at the same time as their students. They are only one chapter ahead of the students. :(

  • Make a java program run by clicking an icon

    Hi,
    i've created a program in java, but how can i start such a program in windows like a normal program?
    I only know how to start it from inside JCreator, but i heard you could use a .bat file to do this.
    Does anyone knows more about this?
    any help would really be appreciated!!

    If the dos box disapears too fast, try
    java Main
    pauseYou can start applications whith doubleclick which have a window (they are started with javaw instead of java).
    1. step:
    Write a simple class in a package (e.g. "test"):
    // HelloWindow.java
    package test;
    import javax.swing.*;
    public class HelloWindow extends JFrame {
         public static void main(String[] args) {
              new HelloWindow();
         public HelloWindow() {
              super("Hello");
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              JLabel lab = new JLabel("Hello");
              getContentPane().add(lab, "North");
              setVisible(true);
              pack();
    }and compile this class.
    2. step:
    Write a text file HelloWindow.man:
    Main-Class: test.HelloWindowThe line has to end with a NEWLINE (RETURN).
    3. step:
    Now you have following files:
    anyDirectory
      |--- test
      |      |--- HelloWindow.java
      |      |--- HelloWindow.class
      |--- HelloWindow.manGo in the console into the directory "anyDirectory" and write
    jar cfm Hello.jar HelloWindow.man testNow there should be a file "Hello.jar" in this directory.
    You can start your application with doubleclick on this jar-file!

  • How do you shut off programs running in the background

    The programs you use keep running. You used to be able to totally close them. How do you now?  I hate ISO7!

    Tap the HOME button twice and then swipe up to delete each one. 
    I was sooooo frustrated until i learned this.

  • How can I delete any programs running in the background?

    When I try deleting any open programs in the background, I double click on the home button to bring them up. I hold the icon down, expecting to see the little red delete button and the icon wiggle but nothing is happening.

    Double-tap on the Home button. You will see an image of the app above the actual icon. Slide the image up to kill it.

  • How do I turn off programs running in the back ground  for iOS7?

    How do i turn off programs running in the background using iOS 7?

    *iOS 7 closing running apps*
    Double-tapping the Home button will bring up the running apps icons along with an app screenshot "card" above the icon. Tap-drag the app's -card- (NOT the icon) up and off the screen.

  • How to execute unix command from the Java program running on Windows

    Hello,
    I need to
    1. Execute a unix shell script from a Java program running on the Windows.
    2. I also need to capture the output of this shell script in my program.
    Please suggest me how to achieve this.
    Thanks in Advance.

    Hi...
    Something is missing here
    If you want to execute a shell script in windows that not posible unless you find or develop a unix shell script parser for windows.
    But if you are trying the execute a unix shell script on a remote unix computer from your java program running on a windows platform you can do that by logging on to the UNIX terminal which is running on port 23 I think.
    You can test this using telnet tool on windows
    just type on command prompt
    telnet <ip of the unix pc> <port number this case 23>
    you should get the unix terminal. If that works you can do the same through java or you can directly conect to port 23 of that pc using sockets that way your program will be platform independant

  • How can I make a program run in the background?

    I'm working on a custom console program. I plan to have the commands as seperate applications and create a server/client relationship so they can communicate with each other. However whenever I call a command I don't want to have a console window pop up, flicker out, etc. I want it to look like it's one complete app. So I'm wondering how can I have the app run in the background?

    If you're using a unix system, use the "&" argument (or character, what is its name anyway?) at the end of the command line.
    I think you can use javaw in the MS-Windows world.

Maybe you are looking for

  • How do I sync a new Iphone 4S when I already have an Iphone on the same account?

    I told it that it was a new phone, but it grabbed my existing name and downloaded the data.

  • NiScope EX Multi Record vi program

    Hi, I have a question in niScope EX Multi Record.vi program. I was not explaining it well in my previous mail. That is why people can not answer my question. This time, I will explain clear. Attached "abc" is my prgram with niScope EX Multi Record.vi

  • Java3D multi threads

    hi, I'm a new user of java3D, and I've to create a 3D world, with animations and interactions. I read the turorial, of course, but I think i've to create a multithreads application. That's the reason why I'm searching a such example, which I don't fi

  • Error when exp clob file

    EXP-00056: ORACLE error 3120 encountered ORA-03120: two-task conversion routine: integer overflow

  • Hibernate fails with open source radeon driver

    I have set up hibernate properly and it worked on Catalyst. Today I switched to the open source driver and I can't put my computer in hibernate or hybrid sleep mode. When I try, both of my monitors turn off then immediately turn back on with a comple