This site requires JavaScript, please enable it in your browser!
Greenfoot back
Conor_Begley
Conor_Begley wrote ...

2014/4/13

Problem with running Greenfoot game on a webpage

Conor_Begley Conor_Begley

2014/4/13

#
I've tried uploading a Greenfoot programming on a website, but when I try locally, I get the error message "nullPointerException". When I try running it on a web server it the states "classNotFoundException " . The file works perfectly in Greenfoot and when you share it to a jar file. I'm not sure what the problem is. Any advice is appreciated. Thanks
davmac davmac

2014/4/14

#
Are you running into this bug perhaps? Try renaming the scenario so there are no spaces (or other 'strange' characters) in the name.
Rishav_Agarwal Rishav_Agarwal

2014/4/14

#
hey , the same problem occurs with me sometimes when in open other user's scenario to play....there i cannot change the name so what to do??
davmac davmac

2014/4/14

#
Rishav_Agarwal, can you be more specific please. Which scenarios, and exactly how are you opening them? If they are on this site they should work fine.
Rishav_Agarwal Rishav_Agarwal

2014/4/14

#
http://www.greenfoot.org/scenarios/11288 its saying "IllegalArgumentException".......white spaces not allowed!
Rishav_Agarwal Rishav_Agarwal

2014/4/14

#
Also can you please help in the following discussion please..... "http://www.greenfoot.org/topics/6014"
Rishav_Agarwal Rishav_Agarwal

2014/4/14

#
Same problem with the following scenario: http://www.greenfoot.org/scenarios/5069
davmac davmac

2014/4/14

#
http://www.greenfoot.org/scenarios/11288 its saying "IllegalArgumentException".......white spaces not allowed!
When does it say that? When I run it, it seems to be fine. The other one seems to be fine as well.
Rishav_Agarwal Rishav_Agarwal

2014/4/14

#
As soon as i open that scenario , it shows error on top left corner. Then a dialogue box appears showing the message which i said.
Conor_Begley Conor_Begley

2014/4/14

#
Are you running into this bug perhaps? Try renaming the scenario so there are no spaces (or other 'strange' characters) in the name.
I tried removing the space and I still get the error, though the java console says "0" which means I should "set trace level to <n>" but I'm not sure what that means....
davmac davmac

2014/4/15

#
Hmm. It works for me. Try clearing your java applet cache.
davmac davmac

2014/4/15

#
Also, if that doesn't work, could you please post the full stack trace?
Rishav_Agarwal Rishav_Agarwal

2014/4/16

#
What is stack trace?
davmac davmac

2014/4/16

#
See this link. A stack trace looks something like:
1
2
3
4
Exception in thread "main" java.lang.NullPointerException
        at com.example.myproject.Book.getTitle(Book.java:16)
        at com.example.myproject.Author.getBookTitles(Author.java:25)
        at com.example.myproject.Bootstrap.main(Bootstrap.java:14)
The 'IllegalArgumentException' should appear at the top of the stack trace.
davmac davmac

2014/4/16

#
Conor_Begley:
I tried removing the space and I still get the error, though the java console says "0" which means I should "set trace level to <n>" but I'm not sure what that means....
Could you post a link to the scenario, wherever you've uploaded it?
You need to login to post a reply.