Solved

eclipse giving error when test program exits

Posted on 2014-11-28
6
133 Views
Last Modified: 2015-06-03
I upgraded my Eclipse IDE version Kepler by downloading the new version (Luna) and replacing the old C:\Program FIles\Eclipse with the new (since there's no installer).

Now when I run a test program which displays a spinner, it runs fine until I close the window to exit the program. Then Eclipse Console Window displays:
Traceback (most recent call last):
  File "C:\Python27_x64\lib\site-packages\py2exe\boot_common.py", line 92, in <module>
ImportError: No module named linecache
Traceback (most recent call last):
  File "boot_com_servers.py", line 4, in <module>
ImportError: No module named win32api
I have no C:\Python27_x64... folder, I have no file named boot_common.py anywhere on my hard drive, nor do I have a file named boot_com_servers.py anywhere on my hard drive. I'm not sure why my Eclipse IDE is trying to run some Python code when I close the test program.

Here's my test code:
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSpinner;


public class Test2 extends JPanel {

	  public static void main(String[] args) {
			JFrame frame = new JFrame();
			frame.setTitle("Test Spinner");
			frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			frame.setSize(230, 90);
			frame.add(new JSpinner());
			frame.setVisible(true);
	  }
}

Open in new window

Test program runningAfter clicking the big red X in upper right corner to close Test windowWhat's this error message all about?
0
Comment
Question by:deleyd
  • 3
  • 2
6 Comments
 
LVL 61

Accepted Solution

by:
gheist earned 333 total points
ID: 40471932
That python cannot import win32api, so you must use setuptools or something to install.
0
 

Author Comment

by:deleyd
ID: 40472140
I don't understand.

Why is Eclipse trying to run Python in the first place?
0
 
LVL 21

Assisted Solution

by:Amitkumar Panchal
Amitkumar Panchal earned 167 total points
ID: 40472246
Please check the following:

1. Check eclipse config and search for python or jython.
2. Also search for a jar in the lib with name like jython.

Share the outcome, so that we can move ahead.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:deleyd
ID: 40485242
I searched everywhere. The only *.py file found is:

C:\Program Files\eclipse\plugins\org.apache.ant_1.9.2.v201404171502\bin\runant.py

No .jar files anywhere with "ython" in the name.
0
 
LVL 61

Assisted Solution

by:gheist
gheist earned 333 total points
ID: 40485245
So install win32api in your python environment and live happy.
Normally eclipse would use builtin jython in absence of external python.
0
 

Author Comment

by:deleyd
ID: 40514408
I tried installing Python 2.7, to see if that would make it happy, but it still complains.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now