Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8074745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:45:23+00:00 2026-06-05T14:45:23+00:00

In my case I’m trying to import a Java class on Jython. In my

  • 0

In my case I’m trying to import a Java class on Jython. In my project I’m using the Eclipse IDE with a plugin of Model-Driven Development. I was trying import the class at Eclipse but I’m getting the same follow error, but I set my java project as a Pydev project and create a bin folder that own the .class files, what I think that is the right thing to do. So, I start trying import it by my hand at terminal with the interactive Jython and I get the same follow error, by the way, I’m using this resource:

import sys
sys.path.append('/home/hudson/eclipse-projects/new/New/bin.jar')

Whats funny is that when I tried with another .class file, from a different project, I can get it easy.

The error:

>>> sys.path.append(' /home/hudson/eclipse-projects/new/New/bin/org/yakindu/sct/runtime/java/newtest/newtest.jar')
>>> import NewTestCycleBasedStatemachine
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named NewTestCycleBasedStatemachine

I’ve been trying to import the .jar from different directories, just for testing, but still can’t get it.
First of all, I need the solution for the Eclipse, because its a must for the plugin that I need.

So, What could it be?


After I set my Java project as a PyDev project what are the steps specifically? I need to pre-compile my project, compress my project to .jar and add this folder?

I tried import like this

from NewTest import CycleWindow

and get this:

sys-package-mgr: processing modified jar, ‘/home/hudson/eclipse-projects/new/New.jar’
sys-package-mgr: skipping bad jar, ‘/home/hudson/eclipse-projects/new/New.jar’
Traceback (most recent call last):
File “/home/hudson/eclipse-projects/new/Test/src/MainClass.py”, line 1, in
from NewTest import CycleWindow
ImportError: No module named NewTest


I’ve been tried import modifying the pythonpath and etc. For example I can import a SWT Class at my Jython Class but cant import my project. I’m doing the same thing for both:

/home/hudson/Downloads/swt.3.7.2-gtk-linux-x86(1)/swt.jar

/home/hudson/eclipse-projects/new/New/bin.jar

I am beating my head against the wall!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T14:45:26+00:00Added an answer on June 5, 2026 at 2:45 pm

    Instead of adding things to sys.path by hand, you should be able to configure the project (right-click project > properties > PyDev PYTHONPATH) to add the jars/folders you want.

    See: http://pydev.org/manual_101_project_conf2.html

    If this doesn’t solve it, please add more information on how you’re setting the PyDev configuration, how your java classes are structured and how you mounted your java build path (screenshots appreciated for those).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Case i'm trying to write a GWTTestCase for a certain class, used as a
Case 1 in question: I have been trying to have a pure 64-bit development
class Case( models.Model ): created = models.DateTimeField() modified = models.DateTimeField() STATUS = ( ('Active',
Case in point : I've got a handle to a window (for instance, using
Case One Say you have a little class: class Point3D { private: float x,y,z;
Simple case of trying to prove I can convert NSString to NSDate . Create
Given: case class FirstCC { def name: String = ... // something that will
case class Test(kind: Int) { val ifX = if (isX) is X else not
Case A Say you have 2 classes Model and Settings . Settings contains nothing
Case: I have a model ( ride_request ) in ride_request there are two fields

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.