Solved

eclipse giving error when test program exits

Posted on 2014-11-28
6
162 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 62

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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

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 62

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
Suggested Courses

628 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