8

I am new in Scala, so sorry if the question is absolutely obvious.

I have an Eclipse Photon installed on my computer. Would like to edit Scala code and produce runnable jars. The tricky part is that I don't have internet access on my computer (Centos7).

I bear in mind two potential issues/questions:

  1. Downloading the plugin manually: I know, that Scala IDE plugin for Eclipse enables running Scala code/producing jars (like https://medium.com/devilsadvocatediwakar/how-to-install-scala-plugins-in-eclipse-in-ubuntu-13e53ffe3f39). Installing it from the GUI is rather straight forward. Is it possible to download a plugin bundle manually (not from GUI), move it to target computer and finally install it?
  2. Compiling code into jars: assume that the point 1 is done. SBT or Maven requires some dependencies (e.g. Yoda time, Spark libraries) to produce specific jars - does it cause, that all the dependencies shall be moved and installed manually also?
Tomasz
  • 610
  • 4
  • 22
  • 2
    Yes you can. [For installing a manual plugin](https://stackoverflow.com/questions/31553376/eclipse-how-to-install-a-plugin-manually) - [here you can find the zip of the ScalaIDE](http://scala-ide.org/download/current.html) - and finally, use the [maven repository](https://mvnrepository.com/) to search and download the dependencies JARS... However, is this really your personal computer? or some kind of deployment server? - Also, as an ex-user of the ScalaIDE I would recommend you to try a different, newer IDE. For example, I just switched the last week from Eclipse to VSCode with metals. – Luis Miguel Mejía Suárez Jun 11 '19 at 14:23
  • Thank you Luis for an answer. This is not my personal computer, so i was forced to use Eclipse (personally prefer InteliJ). Repositories in jars - manual download and file transfer will be required? – Tomasz Jun 11 '19 at 14:50
  • 4
    Yes, you would need to download the **JARs** of each dependency / library you require and them add them to your local repository. That would change if you are using **Maven** or **SBT** or **Mill** or **Eclipse** itself, you can google for each of them. However, if that is not your personal PC, but rather some kind of machine where you are supose to execute the code, why not simply built an **Über-JAR** _(using `sbt-assembly` for example)_ of your code in your personal pc and then execute it in that machine? That would be a lot simpler. – Luis Miguel Mejía Suárez Jun 11 '19 at 14:55
  • Ok. I have already tried, with success, to use sbt-assembly, move the full jar and then run the code. Probably it's the easiest solution. Thank you for the engagement, Luis. Pleas post your ideas as an answer to the question. Think, that an issue is solved. – Tomasz Jun 11 '19 at 15:02

1 Answers1

0

The answer was provided by the Luis Miguel Mejía Suárez in comments:

Yes you can. For installing a manual plugin - here you can find the zip of the ScalaIDE - and finally, use the maven repository to search and download the dependencies JARS... However, is this really your personal computer? or some kind of deployment server? - Also, as an ex-user of the ScalaIDE I would recommend you to try a different, newer IDE. For example, I just switched the last week from Eclipse to VSCode with metals.

Freiheit
  • 8,408
  • 6
  • 59
  • 101
Tomasz
  • 610
  • 4
  • 22