Keep running jar file background Centos - centos

I use jar file that listen to socket and other users connect to this file
When i run jar file in putty tools and leave it (close it) and clients can connect to it
But after a day,clients cannot connect to it and i have to run it again
I try login into Centos with VncViewer and open terminal and run jar file
Is it possible if i use VncViewer?

Related

how to run vscode live share from the command line

Is there a way to launch vscode live share from the command line? I want to use it to edit files on a remote machine to which I can connect via ssh.

How to download a remote file using ftp-simple in VSCode

How do I download a file from a remote server using ftp-simple? I'm using VSCode. I'm open to recommendations on sftp extensions that work with VSCode.
Thanks.
First you have to connect FTP server using this then open your looking file and save it to your computer. or after connecting to FTP server, you can refer to your file's location using this and find your target file.
First you have to connect FTP server using this then open your looking file and save it to your computer. or after connecting to FTP server, you can refer to your file's location using this and find your target file.

Remote Java Development using IntelliJ or Eclipse

I have some code that only runs on a remote Ubuntu box with a gateway in between. Every time I have make some changes I have to make the change in my local Mac and push it to git and rebuild it on the box to see if it is working. Was wondering if there is a way to configure IntelliJ or Eclipse to modify code directly on the remote box and have it running there with debug etc. so that I minimize on the roundtrip?
The solution may be to mount the remote filesystem in your local machine.
Then run the IDE off the remote file mount in the local system.
That way, the IDE will access all the files as if it is local.
The IDE can connect to the process running in remote machine.
Also the IDE can remote debug the JVM easily.
Here is the how to of mounting the remote file system locally
https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh

How To download a file from webserver to your computer?

I'm back connected with a Freebsd server [netcat ] And There is a File On /tmp That i want to download it but
Its can't be browsed with My Browser So there is any ways to download it ?
because i don't have access to others folders . Just /tmp
You can use fetch(1)
eg. fetch https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js
or download wget with
pkg install wget
and use wget
eg. wget https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js
If you have an account on the server and the ssh daemon is running you can use scp. From a terminal emulator (e.g. xterm) you can do % scp freebsd.server.org:/tmp/file .. Of course replace freebsd.server.org with the correct name of the host.
If you're on windows, you could also use a graphical program such as Winscp.
If you have SSH installed on the server, you can use any SSH client out there. For Windows, WinSCP is a good option but if you run *nix OS with Gnome, Nautilus can do the same natively.

How to do remote debugging in Eclipse CDT without running `gdbserver` manually on the target every time?

Before each debugging cycle I have to run gdbserver on remote target (Linux). So I was thinking to make script that would call python program that would connect over ssh and would run gdbserver.
I cant find any options to run command before debug and I also try to change .gdbinit file but I am unable tu run python script whit that. Since I am using crosscompiler I cant to get other gdb whit such support.
You don't need to run Python to invoke an external command from GDB. This (in .gdbinit) should work:
shell ssh remote-host gdbserver :12345 /path/to/binary/on/remote &
target remote remote-host:12345
If you do need more complicated ssh setup and need Python for that, you can certainly get it with
shell python your_script.py
If you can't get any external program called from your gdbinit, I see one way of doing it within Eclipse that might work (I didn't tested) but it is not really straightforward...
Create an External Tool configuration that launches your gdbserver program (Python or whatever command line script)
Create a C/C++ application launcher that launch your application to debug
Create a launch group that will call the two previously configured configurations.
Launch the group in debug mode
Eclipse 4.7.0 can connect to SSH and launch gdbserver automatically with the automatic launcher set when creating a new debug connection, without the need for any custom scripts.
I have explained the setup in great detail at: Remote debugging C++ applications with Eclipse CDT/RSE/RDT