Intellij IDEA: Run Scala REPL Console on a remote machine. - scala

I am wondering if it is possible to run Intellij's scala console process on a remote machine.
The Problem
I am developing a scala application on my local machine, but it needs to run on a remote machine.
What I am hoping for, is to launch the console process (that executes code) remotely and connect the console view/editor in IntelliJ to it - naturally with access to the local classes I am developing. I.e., this is a setup that is a little similar to launch an process remotely and then connecting the debugger.
A little background
The application (which builds on Spark) needs to talk a lot with servers that are on the same network as the remote machine. Running the console process on the remote machine will help a lot with port/hostname/proxy configurations. It will also improve performance, but that is secondary in this problem.
I have ssh access to the remote machine, so it is easy to setup proxies/ssh-tunnels.
Hope you can help :)

Why not just use the Terminal tab in IntelliJ, SSH to the machine, and use SBT from there? I do this all the time.

Related

Host user tasks used on remote SSH side

Background:
At work I develop either in a virtual machine on my Windows laptop, or in a desktop workstation via a remote desktop app. Both environments are Ubuntu.
I have recently started to enjoy using VSCode, with the Remote SSH plugin. But I have to manually copy my setup .vscode/ folder to each project. I work actively in 10-20 projects, which makes this a bit of annoying.
All projects have the same setup and file structure, and both environments are setup the same. It feels like I could automate this more.
Using 3rd party tools is not applicable for me, since I cannot install whatever I want. Native support is important.
Question:
Is there any way for me to setup VSCode settings and tasks on my hosting Windows machine, but use them on the remote side after starting an SSH session of VSCode?

eclipse neon remote debug

I just installed the latest version of eclipse neon. I previously used eclipse mars. But due to other issues that should be updated in eclipse Neon I changed to this version.
I develop a program for a ARM Linux system on a Windows computer, so using a cross-gcc and doing remote debug using gdb/gdbserver from eclipse. I first made a connection using the remote systems perspective using ftp for file transfer and ssh for the shell. This worked fine and I was happy with this.
But in Neon it seems to be changed because the connection that I made in the Remote Systems explorer can't be selected anymore when you use C/C++ Remote Application Debug. When you look at the connection listbox I only see local connection and not the remote systems anymore. When I create a new connection from the debug configurations dialog I can only choose serial/telnet/ssh but when I choose ssh it doesn't work. I can make the connection and open a command shell, so ssh works. But when it wants to transfer the file to my target it is using sftp appearently (looking at the error log) but I don't have this on my target.
When I transfer the file manually to my target (using the remote systems perspective) the debugging works fine but of course I want to transfer the file automatically when I start a debug.
My question is if indeed this connection management is changed that you can't choose anymore the systems that you defined in the remote systems explorer?
Or do you need install a specific plugin?
The current configuration possibilities are very limited and also the debugging of the issues is limited.
Other solution is that I have scp installed on the target. Is there a way to change from sftp to scp?
Thanks.

Build and debug a project on a remote server via SSH with Eclipse

Unfortunately, I do not find a solution for my problem in this similiar question.
I have a server with special hardware and a special (GNU-compatible) toolchain. I can only access this server via SSH.
Now I try to set up a development system with Eclipse. Is it possible to set-up a configuration to be able to build and debug via SSH as if the program would run on my local computer? And if yes, could you tell me a little bit about it? ;-)
Provided your server is a Linux machine running a X server, you may want to look around SSH -X.
Install Eclipse on your server
Install an X11 environment on your client (e.g. for Windows: XMing)
Connect to SSH with the -X option (e.g. for Windows, there is a checkbox on Putty)
Launch Eclipse from the ssh connection.

jconsole cannot connect to local processes on my new Mac Air

I'm stumped. On my old Mac, Jconsole couldn't connect to local JVMs. I thought I had done something to mess up system configuration. Then I got a new Mac. The first thing I did was download a jdk, install it and check to see if jconsole could connect. It could.
Then I pulled over users and applications from my old mac using my Time Machine backup drive except my system files. Still worked.
But I found that odd things were happening with my development environment. In eclipse, I could start my Jboss server, but eclipse never recognised that the Jboss server had started. So, I could never add or delete war files to it through eclipse.
Also, the jboss instance could not connect to my localhost PostGres database even though the ds file clearly gave localhost as the host to connect to.
I fixed these problems by giving my new Mac the hostname the old Mac had had.
But now I am back to not being able to connect to my local JVMs through jconsole.
This affects not just jconsole, but jprof as well so I'd like to get it fixed.
jconsole can see the JVM processes. It just times out when I try to connect.
I also tried connecting to localhost: by writing a java class that slept for five minutes and running it with the following command line:
java -Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false
but I cannot connect to localhost:9010 or :9010 either.
My guess would be this is some network configuration problem, but any help would be really really appreciated.
Thanks,
George
I had similar issues with timeouts. Looking at the packets being sent, it seems that jconsole was trying to connect via an external interface and being blocked by the firewall.
I added
JAVA_TOOL_OPTIONS=-Djava.rmi.server.hostname=localhost
to my environment to ensure all java processes used localhost instead of an external interface for RMI (which is what jconsole is using for connections)

Pydev: Running Eclipse/Aptana debug server on command-line

I've found many informations on how to setup an Eclipse/Aptana remote debug server with the GUI.
Is there a way to launch it from command-line ?
There must no need of a GUI in the whole process.
My goal is to setup a remote debug server on a server machine accessed only by command-line.
Thanks.