Ziplok

Learn and discover simple things.

  • Home
  • More About Cyrus

How to run an application in Linux without quitting from a remote?

October 30, 2007

Sometimes we need to log in to Linux from a remote using putty or SSH Secure Shell because we have an important application to upload to a server and it would be better also to run this application in the server because we want a faster connection and a faster machine.

Say for example, I have a Java application that accesses an Internet connection and I want this application to be uploaded in the Linux server because I want a faster connection compared to my PC. Then we open an ssh to transfer this file (application) to a server. And we want this application remains running when we logout from the server.

So, some of us will think that this code will work,

java -jar InternetScript.jar &

Yes, this perfectly works but it will also quit when you logout from your Linux.

We have a better solution for that problem. We can add nohup to our previous command.

nohup java -jar InternetScript.jar &

Try it. Good luck!

Posted by Blink
Filed in Linux
Tagged: daemon, java, Linux, nohup, process, putty, remote login, ssh
2 Comments »
  • Top Posts

    • What do you mean by static in Java?
    • A Simple Game of Life in Java
    • How to update a file in Java?
    • How to write a simple internet/web robot in Java?
    • How to setup a headless application in Linux?
    • How will you type a text into the input file element in Selenium?
    • XPath Checker Y Regular Expression Tester
    • How to configure GWT 1.4 on Fedora 8?
    • How can I boot my Fedora 8 because I reinstalled my Windows XP?
    • How to run an application in Linux without quitting from a remote?
  • Recent Posts

    • A Simple Game of Life in Java
    • Finite State Transduction and Formal Machines
    • Programming Languages
    • Hybrid theme works perfectly on my Linux Box
    • XPath Checker Y Regular Expression Tester
  • Categories

    • Blogging
    • Computer Science
    • Fedora 8
    • GWT
    • Internet Robot
    • Java
    • Language
    • Linux
    • Programming
    • Sample
    • Web Test
    • windows
  • Recent Comments

    PHP Johny on How to write a simple internet…
    Blink on A Simple Game of Life in …
    Chris on A Simple Game of Life in …
    Blink on A Simple Game of Life in …
    Oscar on A Simple Game of Life in …
  • Album

    • My Picasaweb Album
  • Blogs

    • Couen
    • fsckin w/ linux
    • Lantot Java Blogs
    • My Poetry and Literature
    • Obra Ni Juan
    • Stephen on Drupal
  • Tags

    about:config append bot class class methods class variables command daemon dual-boot explore2fs ext2fs file FileWriter firefox headless application htmlunit ImageMagick import input java Linux mashup methods nohup object post process Programming putty remote login robot selenium sourcecode source code spider ssh startx static type variables web web robot windows wordpress Xvfb
  • Blog Stats

    • 55,515 hits
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.com
Theme: Emire by Phu. Blog at WordPress.com.