Solved

eclipse giving error when test program exits

Posted on 2014-11-28
6
138 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 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java Options in Zimbra Server 2 54
Angular JS Route 3 72
Convert from a json string array to a Java object 3 35
Java: The Public Class Main 4 17
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…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

832 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