0

I don't have eclipse installed. I have a Java project with an eclipse folder in it.

Can I simulate pressing the Run button in eclipse, without installing eclipse.

I want to run this project.

I am on macOS. It's a pretty huge project, I am not sure how to compile the source correctly. I also don't know what external dependencies this project has.

theonlygusti
  • 11,032
  • 11
  • 64
  • 119
  • You need to compile the classes by yourself and launch the main class – azro Dec 06 '18 at 16:18
  • If you just want to run the code verbatim, what's stopping you from compiling it and running it either through the command line or another IDE (like IntelliJ or NetBeans)? – Makoto Dec 06 '18 at 16:18
  • 1
    Possible duplicate of [How do I run a Java program from the command line on Windows?](https://stackoverflow.com/questions/16137713/how-do-i-run-a-java-program-from-the-command-line-on-windows) – azro Dec 06 '18 at 16:19
  • if your project is based on maven or gradle you can run them by ./gradlew or ./mvn – Mohsen Dec 06 '18 at 16:19
  • @Makoto don't have another IDE. Don't know how to correctly compile it. – theonlygusti Dec 06 '18 at 16:20
  • @Spara it's not based on either although I wish it was – theonlygusti Dec 06 '18 at 16:20
  • "_I also don't know what external dependencies this project has._" - figuring that out is a key first step - you're not going to be able to compile without knowing all the dependencies. – Krease Dec 06 '18 at 16:25
  • @Krease how do I figure that out from the eclipse folder – theonlygusti Dec 06 '18 at 17:04
  • An Eclipse project folder can be recognized by the `.project` file it contains. A Java project contains also the file `.classpath`. Your `eclipse` folder is not Eclipse-specific. Please let us know what is in the folder. – howlger Dec 06 '18 at 22:26
  • @howlger a `.classpath` file and a `.metadata` folder, and two folders each with `.project` files in their top-levels (as well as `.settings`, `.classpath`, and some other folders) – theonlygusti Dec 06 '18 at 23:04
  • What is in the `.classpath` and `.project` files? – howlger Dec 06 '18 at 23:09

1 Answers1

1

Without an external build tool to help with building the application like Gradle or Maven, you're going to have to download a copy of Eclipse and run it from there. You'll also need to take the time to ensure that you convert your project to either a Maven or Gradle-based project so that you can build it independent of what IDE you're using.

Makoto
  • 104,088
  • 27
  • 192
  • 230