Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Processing in Eclipse Issuse

Options
  • 11-10-2006 11:23pm
    #1
    Registered Users Posts: 1,987 ✭✭✭


    This is the below code im trying to run, im trying to get processing working in eclipse, i have all the right Jar's and Dll's imported!???:
    import processing.core.PApplet;
    
    class Circle extends PApplet
    {
    	float x = 300;
    	float y = 300;
    	float w = 20;
    	float h = 20;
    	
    	public void setup()
    	{
    		size(600,600);
    		frameRate(30);
    	}
    	
    	public void draw()
    	{	background(0,0,0);
    		ellipse(x,y,w,h);
    	}
    	
    	public static void main(String args[])
    	{
    		PApplet.main(new String[] {"Circle"});
    	}
    }
    
    and this is the error i have:
    java.lang.IllegalAccessException: Class processing.core.PApplet can not access a member of class Circle with modifiers ""
    	at sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
    	at java.lang.Class.newInstance0(Unknown Source)
    	at java.lang.Class.newInstance(Unknown Source)
    	at processing.core.PApplet.main(PApplet.java:6446)
    	at Circle.main(Circle.java:23)
    
    i also get this warning:
    Severity and Description Path Resource Location Creation Time Id
    The serializable class Circle does not declare a static final serialVersionUID field of type long Collision Circle.java line 3 1160605469014 128


Comments

  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    What does PApplet look like?

    Without seeing that class I'm taking a guess.

    PApplet is Serializable but has the serialVersionUID marked as hidden in some way.

    Or as the code shows doesn't have it.

    Try adding...

    public static final serialVersionUID = 12345


  • Registered Users Posts: 1,987 ✭✭✭Ziycon


    When i got home and imported everything ran it the application worked fine! Still have the warning but it does'nt give me and error! Stange one!

    Thanks anyways Hobbes!


Advertisement