I have created a project using Jython (there was no bug in compling it by my IDE)

I also have read the topic named Py2exe help (Ene Uran---Oct 23rd 2006 6:43 pm) and I can tell you that it really helped me so much. But in this project, I cannot create an excutable .exe file using Py2exe.

After running the setup file I also received 2 folders: dist and built. Inside the dist folder I saw 3 files: MainForm.exe file, MSVCR71.dll file and w9xpopen file. So I tried clicking on .exe file to run it ... and what I had to see are: a small window telling me it cannot run and a text file named MainForm.exe.log --- its content is:

Traceback (most recent call last):
File "MainForm.py", line 1, in ?
File "zipextimporter.pyo", line 78, in load_module
File "JyGUI\JyFrame.pyo", line 1, in ?
ImportError: No module named javax.swing

:sad: So what I can see is that it mustn't have imported javax.swing module into the process.

Could someone please tell me how to deal with this problem???

Have a nice day!
Thank you!

My personal suspicion is that Py2Exe does not handle Jython, otherwise it would be called Jy2Exe.

Can you copy module javax.swing into the dist folder and try to run the executable again?

Thank you for your reply but my problem has been remaining...hix hix hix

The problem, I think, is that it can import necessary file in Swing library in to the DLL file.

I am really a python newbie, so if someone knows how to resolve this problem.

Have a good day!

Which .dll file is that?

Hm, I think that you've never used Py2exe. After Processing the compilation using py2exe, you receive 3 files as I told you at the top of this page. It's Dynamic link library file, its function is to reduce the size of .exe file and supply necessary functions in the run of exe file.

I think we can use py2exe in this sense, but I can't solve it.

My problem is still remaining...

thks

MSVCR71.dll is the Microsoft runtime C++ library. I don't think Py2Exe is going to mess with that! You can distribute that file, but you cannot change it or get the wrath of big MS!

Jython compiles Python source code down to Java bytecodes which can run directly on a JVM. You have to use the Java utility corresponding to Py2Exe! Py2Exe only handles Python byte code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.