Java A question about the Eclipse IDE

  • Thread starter Thread starter hagopbul
  • Start date Start date
  • Tags Tags
    Eclipse Libraries
AI Thread Summary
The discussion addresses issues with using Eclipse IDE for coding, particularly regarding missing libraries when compiling Java code. A suggested solution is to create a Maven project within Eclipse to manage dependencies and obtain the necessary libraries. The conversation also highlights the advantages of Eclipse, such as its integrated tools for syntax highlighting and debugging, while noting that other IDEs like NetBeans and Visual Studio Code may offer better user experiences and plugin support. Additionally, there are concerns about the potential risks associated with using Maven's online library repositories. Overall, mastering Eclipse and its features is emphasized as a valuable skill for developers.
hagopbul
Messages
397
Reaction score
45
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
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
  • Like
Likes DaveE, harborsparrow and berkeman
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
  • Like
Likes harborsparrow and berkeman
Another insight is that developers tend to use Microsoft's Visual Studio Code Editor over other IDEs. It has a lot more support and plugins.

https://code.visualstudio.com/

I began by using Eclipse at one company but later switched to NetBeans because it offered a GUI editor for Java applications and was the preferred editor at work, featuring many built-in plugins. It always seemed that Eclipse plugins would turn into paid options once the developer gained some traction with Eclipse's.

Now, I tend to use MS Visual Code Editor. It works well on all platforms, including Windows, MacOS, and Linux, and it handles line terminations between Windows (CRLF) and Linux (LF) even in a mixed Windows+WSL environment.
 
  • Like
Likes harborsparrow and pbuk
jedishrfu said:
Another insight is that developers tend to use Microsoft's Visual Studio Code Editor over other IDEs. It has a lot more support and plugins.
Yes, the World has moved on substantially since CS106A: Programming Methodology at Stanford used Eclipse, or Java. It now uses Python and the PyCharm IDE. PyCharm is excellent for Python, but obviously not as versatile as VS Code (which was not as mature when I believe this course moved to Python in 2019).

The version of CS106A on the Stanford Engineering Everywhere website is from 2007 - good luck getting anything from there to work in 2025!
 
  • Like
Likes harborsparrow
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top