Showing posts with label Eclipse. Show all posts
Showing posts with label Eclipse. Show all posts

Sunday, April 26, 2020

Failed to Update EclEmma Tool for Eclipse

I have the following Eclipse installed,

Eclipse IDE for Enterprise Java Developers.

Version: 2020-03 (4.15.0)
Build id: 20200313-1211

When I attempt to update Eclipse, I encountered the following error,

An error occurred while collecting items to be installed
session context was:(profile=C__Applications_eclipse_latest_eclipse, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.eclipse.eclemma.core,3.1.3.202003132300
No repository found containing: osgi.bundle,org.eclipse.eclemma.doc,3.1.3.202003132300
No repository found containing: osgi.bundle,org.eclipse.eclemma.ui,3.1.3.202003132300
No repository found containing: org.eclipse.update.feature,org.eclipse.eclemma.feature,3.1.3.202003132300

The solution to this problems is to update it via EclEmma's update channel at http://update.eclemma.org/. We can use the two methods to realize this solution,
  1. Update EclEmma via adding an Eclipse repository for EclEmma
    1. Click the "Help" menu
    2. Select the "Install New Software" submenu
    3. Click "Add" button to add a new repository
    4. In the popup windows, enter a name of the repository, e.g., EclEmma, and enter the URL, http://update.eclemma.org/
    5. Confirm it by clicking at the "Add" button on the popup window
  2. Update EclEmma via Eclipse Marketplace
    1. Click the "Help" menu
    2. Select the "Eclipse Marketplace" submenu
    3. Search "EclEmma" in the "Eclipse Marketplace"
    4. Eclipse should now show "EclEmma for Java Code Coverage" as "installed"
    5. Click at "installed", and then click at "update".

Saturday, October 5, 2019

Eclipse Complains "ImportError: DLL Load failed"

When I ran a Python program in a PyDev project in Eclipse, I encountered the following error:

ImportError: DLL load failed: The specified module could not be found.

It turns out that the PATH (or path in UNIX systems) in environment variable does contain the path where the DLL files required by the package imported in the Python program are in. Knowing this, I resolve it by adding the path to the environment variable.

Instead of adding it to the system path environment variable, I added it to the Eclipse "run-as" configuration, e.g., right-click on the Python program we want to run, select "Run As", click on "Run Configuration", click on the "Environment" tab, click at the "Select" button, check the "Path" variable, bring up the edit dialog window, and add the DLL path value to the existing value.

I am using Anaconda3 in a Windows 10 host and installed it at C:\Applications\Anaconda3. In this case, the DLL path value I added is C:\Applications\Anaconda3\Library\bin

Friday, October 6, 2017

Get Rid Of Eclipse Warning Messages on JavaFX API

When I was writing a Java program with JavaFX API, Eclipse complained loudly although the application runs smoothly since JavaFX is part of Java 8. The warning messages are very annoying. An example message is as follows,

Access restriction: The type 'Application' is not API (restriction on required 
library 'C:\Applications\Java\jdk1.8.0_144\jre\lib\ext\jfxrt.jar')

Since a picture is worth 1000 words, below is a screen shot showing the messages,




To get rid of the messages, the easiest way, perhaps, is to install the e(fx)clipse plugin for Eclipse.  To install it, one may follow the steps below,

  1. Start Eclipse. The rest of steps are operations on Eclipse.
  2. Select "Help" from the menu
  3. Select "Install New Software"
  4. On the "Available Software" pop-up window, select "All available sites" for the "Work with:" field.
  5. Type "e(fx)clipse" as the filter text or/and check "e(fx)clipse" under "General Purpose Tools" 
  6. Select "Next" or "Finish" to install it.  Following the instruction to accept the license term and restart Eclipse


After Eclipse restarts, the warning messages should go away.



Sunday, August 14, 2016

PyDev in Eclipse Cannot Locate multiprocessing.Process

I am using PyDev with Eclipse. Recently, I found that PyDev complains that it cannot find multiprocessing.Process when it analyzes the code, as such, it marked "Process" as a symbol that cannot be resolved in a statement as below, although I can run and debug the script without any problems,


    from multiprocessing import Process


A discussion at Stackoverflow comes to rescue and provides the following answer,


"If you're using Eclipse and PyDev you need to include 'multiprocessing' as a forced builtin for the python interpreter."

The question becomes, how may we add a forced builtin? The answer is in this PyDev manual page, that is,
  1. Go to: window > preferences > PyDev > Interpreter - (Python/Jython/IronPython).
  2. Choose the interpreter you have installed in your computer.
  3. Select "Forced Buildins", and choose "New", finally, add "multiprocessing".



Wednesday, May 20, 2015

Pinning Eclipse to Windows Taskbar

Typically, one may pin an application to the Windows taskbar (i.e. Windows 7 or Windows 8 Taskbar), by right-click the application's icon on the taskbar and choosing "Pin this program to taskbar". However, this method appears not to work for recent version of Eclipse.  This threat at superuser.com provides a few solution to it. The method I follow and that works for me is.,

  1. Locate the Eclipse executable, i.e., eclipse.exe
  2. Right-click on eclipse.exe and choose "Create shortcut" to create a shortcut for eclipse.exe.
  3. The shortcut will be named as "eclipse - Shortcut". Rename it as "eclipse"
  4. Right-click on the shortcut and choose "Properties"
  5. Add a command line argument to "Target" for the shortcut resembling
    
    -vm "C:\Program Files\Java\jdk1.7.0_55\jre\bin\server\jvm.dll"
    

    Note that you must change "jdk1.7.0_55" to match version of your JDK.

  6. In Windows 8.1, search "system environment variables" and choose "Edit system environment variables". Add your JDK's bin path to the PATH environment variable, e.g.,
    
    C:\Program Files\Java\jdk1.7.0_55\bin
    

    Note in the above, change "jdk1.7.0_55" to match version of your JDK.

  7. Launch Eclipse by double-clicking on the shortcut
  8. Once Eclipse pass the choosing Workspace stage and fully loaded, right-click the eclipse icon on the taskbar, choose "Pin this program to taskbar"
Although the thread at superuser.com provides a few solutions to pin Eclipse to the taskbar, many point out that once Eclipse fully loaded, two Eclipse icons will appear on the taskbar. The solution allows me to pin Eclipse on the taskbar and leads to only a single Eclipse icon on the taskbar once Eclipse is fully loaded.

The above solution is hinted in a post of the threat. The post also points to a relevant Eclipse bug report and the report also helps me to come out the solution.

By the way, pinning a program results a shortcut is created in the directory of

%USERPROFILE%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar