Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Processing in Eclipse Issuse

  • 11-10-2006 11:23PM
    #1
    Registered Users, Registered Users 2 Posts: 1,991 ✭✭✭


    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, Registered Users 2 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, Registered Users 2 Posts: 1,991 ✭✭✭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