0

I have spent 6h+ and finally I've decided to seek the community's help.

I have a Java project on a remote SSH cluster and I have imported it into eclipse using RSE (Remote System Explorer). This project used to be a local project and has many libraries/dependencies. I have configured all of them and all of the paths are accessible on the remote cluster.

I want to run it on the remote cluster using SSH as well (via Eclipse External Tools). I have configured EVERYTHING and have even successfully ran another project. However, right now the problem is that Eclipse does not create even a SINGLE .class file on the remote server!!!

The project does not have any errors (if I just copy its bin folder from my computer to the remote cluster it works) but, since Eclipse does not produce a single .class file, there is nothing to run in its bin folder on the remote cluster.
It's also worth mentioning that for some reason that I don't understand, there is a red x on the projects name in Project Exlorer (indicating error) but there is no such thing on any of the source codes/packages in this project.
The "Build Automatically" option is active and cleaning and building it manually won't work either.

Any help is hugely appreciated as I am really desperate and need to get this thing working. Thanks in advance.

Maghoumi
  • 3,295
  • 3
  • 33
  • 49

3 Answers3

1

I had a similar problem and this solution worked for me: In my java context.xml file in the META-INF folder (local project context), I added path="/myProjectName" and it started building automatically.

<Context path="/jvals" antiJARLocking="true" antiResourceLocking="true">
<Resource name="jdbc/jvals"....
Ginja Ninja
  • 395
  • 1
  • 6
  • 15
0

I was never able to solve this problem and the only thing I could think of was a bug within Eclipse. It seems that because of slow transfer rates to/from cluster, some of the files could not be built as they were partly fetched/stored. I ended up writing a shell script that would transfer the files to the remote cluster and compiled and ran it on there.

If anyone has a better suggestion, I will be very grateful.

Maghoumi
  • 3,295
  • 3
  • 33
  • 49
0

I solve the problem in another way ; go to the remote project in linux ;

cd youRemoteProject/build/classes if your jars is in xxx\lib\a.jar, b.jar

java -cp ".;xxx\lib*" package.package.className

( you must using Java 6 or later, classpath wildcards are a part of the JVM )

phil
  • 620
  • 7
  • 12