A question about the Eclipse IDE

  • #1
hagopbul
376
39
TL;DR Summary
reviewing my undergraduate physics classes and having a problem with eclips
hello :

i am reviewing my undergraduate physics classes , during my free time , taking a look on CS106 from stanford programming mythology , but i dont know how to use the eclips program , for example when i write a code using that provided in the course , the libraries seems missing from eclips ? thus creating a problem when trying to compile

what is the solution to this problem

Best regards
H
 
Technology news on Phys.org
  • #2
Eclipse is more of a programming tool that has integrated an intelligent editor that monitors your code and highlights errors the moment you make them. The errors highlighted depend on the programming language you're using. As an example, in Java or C/C++ you must define a variable's type as in:

Java:
int main() {
  
  int x,y,z;
  
  x=1;y=2;z=3;
  
  println(x,y,z);
  
  return 0;
}

However, in python you can simply say:

Python:
x=1; y=2; z=3

print(x,y,z)

Another example is the IDE semicolon checks.

In Java, a semicolon denotes the end of a statement. The IDE will highlight a line without a semicolon at the end. However, a semicolon is a multi-statement separator on the same line in Python.

The Eclipse IDE and others like Netbeans or IntelliJ combine the power of a syntax-highlighting editor with basic language checks, a program compiler, a program debugger, and optionally a source code management system (Github, SVN, CVS...) for code sharing and version control to dramatically speed up the application development process.

Knowing these features of the IDE is a good job skill you should foster.

It's an excellent tool to master. Personally, though, I think NetBeans is the better IDE as many essential plugins come with the initial installation. In contrast, with Eclipse, there are many choices, and often, a good plugin switches from being a free plugin to a subscription-based plugin.

There are several videos and books on how to use Eclipse:







---

Regarding the missing libraries, if this is Java, you could build your code by creating a Maven project and adding dependencies for the missing libraries. Maven is a build tool integrated into Eclipse that gets the requisite libraries from the Maven online repository.

As you get deeper into using Eclipse, you will be learning about many of these other tools and how they work. It can be pretty daunting, but hang in there. It's a great skill to have once you master it.
 
  • Informative
Likes berkeman
  • #3
One other thing is that there are two install editions for Java:
- full software development kit install, aka Java SDK edition (for developers)
- java runtime environment install, aka Java JRE edition (for people who only need to run java code)

The runtime environment is a pared-down environment that lacks some of the tools and libraries in the developer install.

The Eclipse Maven plugin can help you find missing libraries by constructing and maintaining the pom.xml file (see Wikipedia entry below).

https://en.wikipedia.org/wiki/Apache_Maven

It can do many things and initially looks overly complicated, but in software project development, you'll realize it's hard to live without it.

One caveat: Maven uses a repository of libraries uploaded by other open-source developers. Malware and crypto-mining code have been found in the repository from time to time that could compromise your work. Some developer shops use local repositories to mitigate this problem.
 
  • Informative
Likes berkeman
Back
Top