Solution/project file for Java IDE - eclipse

Is there a way to make a double-clickable solution/project file using a Java IDE such as Eclipse or Netbeans, in the same way as the .sln files of Visual Studio?
So that when I move my source code between computers, all I have to do is double-click on the solution/project file and the project will be automatically loaded?

Open eclipse, in Menu file->Import, you can find some useful menu-item to open a java project.
In fact, Some times NO project file you want.

Related

Importing war file in eclipse

I have a WAR file with Java codebase. I need to decompile my war to a project in Eclipse
To do that I install Eclipse Jee 2018-12 and I had clicked in File->import and I selected warFile, and I put my file war
but I have this when I go to src to see code java I have just package
When I click in open type hiererchy i have this
How I can get source file content?
i always prefer to do it outside eclipse. its pretty easy if you just want to view the code.
you can use tools like jdecompiler . just select/open you war file.

How to activate features of EPIC Perl plugin for Eclipse

I just downloaded the EPIC Perl plugin for Eclipse and then opened a Perl script (.pl) contained within an existing C++ project. The editor does not have syntax highlighting or any of the other promised features of EPIC. The only thing that has changed is that the script has a camel icon in the Project Explorer.
I open a different .pl file in a different directory within the same project and it works (syntax highlighting).
How do I activate the features of EPIC for the first file?
I'm using Eclipse Kepler on Windows 7.
(the only thing I can think of is that the first file was open in Eclipse before I installed the plugin, the second file was not. But closing/reopening the file and/or Eclipse does not fix the problem)
Right-click on the the file in the Navigator, choose "Open With" and then "Epic Perl Editor".

Eclipse - why cant it integrate jars in lib folder into project?

I manually copy needed jar files into my project lib folder. Then, I try to add them to build path via "configure build path option". If i choose "add jar", then the lib folder does not show up in the "to choose from" list. So, I am forced to use "add external jars" option instead. But, that option does not make the jars a part of the project even though they lie in the lib folder. After I restart eclipse 2-3 times, the jars are magically integrated into my project.
Why is eclipse behaving this way ? Why can't I do this easily ?
Please help me.
By default, Eclipse dose not detect file change which come from outside, like copy a jar file in lib folder manually.
So after you copied jar files, you have to refresh the project by pressing F5 while selecting your lib folder. I believe that's why eclipse cannot found your jar files.
If you want to solve this problem once for all, you can active "Refresh using native hooks or polling" via
Window -> Preference -> General -> Workspace
However, this might slow down Eclipse if you have a big project with many many files.
UPDATE
As Bananeweizen mentioned, instead of doing all the copied from outside of Eclipse, you can also copied those file into Eclipse, Package Explorer View for example. This way Eclipse will detect and refresh folder automatically.
The way I was taught to add external jars to an eclipse project is to drag the jar file from explorer into the lib folder in eclipse and then on the dialogue eclipse responds with is choose the copy to option and eclipse imports the jar file and copies it to the lib location at the same time.

Netbeans. How to find out referenced libraries (not included in a project code)?

I have a netbeans project: java Web Application.
Some libraries in the project are'nt included in code directory. e.g.
....netbeans\7.1\var\cache\index\s717\java\14\gensrc\javax\mail\MimeMessage
so when I clone the project in other machine the library isnt found, because the netbeans directory is different. Is there a tool that check it? Maybe a netbeans plugin. thanks!
Try right-clicking on the Libraries in your Netbeans Project Browser, and selecting "Add JAR/Folder". From there, navigate to the JAR you want, and select "Reference as Relative Path".

The Java files opened by Eclipse's menu "open file"does not auto-build

Eclipse has a nice feature that builds your codes on the fly.
However, for some reason, I have had a source .java developed in Emacs under some directory, say, ˜/mycode. Now I want to use the auto builds functionality of Eclipse, but I do prefer to develop the .java file under its original ˜/mycode directory. So apparently, I CANNOT use "import" of Eclipse because that means the file will be henceforth developed under some Eclipse Workspace.
This is the reason why I have to use Eclipse's menu's "open a file" to open my file from ~/mycode.
Then the problem comes, no more auto-build for this .java file!! For example, if I write one line like "abcd;;;;;" I will not get this line underlined by the syntax checker of Eclipse.
In summary, I would like to continue developing a code under its original directory, and also benefit from the auto-build functionality of Eclipse. What can i do? Thanks.