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

2016/7/6

UserInfo isStorageAvalible() not working

trimil trimil

2016/7/6

#
In my scenario UserSample , I call the isStorageAvailable() method. If it returns true, I display the text "Storage Available", but if it returns false I display "Storage Not Available". When I run it in my browser, it always says "Storage Not Available" even though I am signed in and it worked in the Greenfoot program
danpost danpost

2016/7/6

#
Unfortunately, that is correct. The newer versions of java have tightened security of access to out-of-local-network files. This means that the UserInfo class is currently useless to those that have upgraded to the newer version. However, I myself, who has not yet upgraded to the newer version, opened said scenario and it tells me that 'Storage Not Available' even though I am signed in. Therefore, I would say that there is probably something with your code that is wrong. Show the code or re-upload with the source available for more assistance on this matter. EDIT: I tried to open my Private Messaging scenario and it asks me to log in when I already was. This tells me that either the link is down on the greenfoot side or it has been terminated by the greenfoot team.
trimil trimil

2016/7/6

#
Thank you :D
davmac davmac

2016/7/7

#
EDIT: I tried to open my Private Messaging scenario and it asks me to log in when I already was. This tells me that either the link is down on the greenfoot side or it has been terminated by the greenfoot team.
As it happens the storage server program wasn't running, ever since a recent upgrade of the server operating system. I have restarted it now.
trimil trimil

2016/7/7

#
It is still displaying "Storage Not Available".
danpost danpost

2016/7/7

#
trimil wrote...
It is still displaying "Storage Not Available".
My scenario is okay now, so it must be your code. However, you still have not published the source of your project.
trimil trimil

2016/7/7

#
The source is published now :D
danpost danpost

2016/7/8

#
trimil wrote...
It is still displaying "Storage Not Available".
I am now showing "Storage Available" on your scenario. Like I said before, if you have upgraded to a fairly recent version of java, it will not work for you.
trimil trimil

2016/7/8

#
Okay.
Super_Hippo Super_Hippo

2016/7/8

#
I am using Java 8 and it does work too. Follow the steps in this discussion if you are using Java 8 too: http://www.greenfoot.org/topics/8200/
trimil trimil

2016/7/8

#
Thank you so much! My scenario is now located here.
Super_Hippo Super_Hippo

2016/7/9

#
I don't know if it's just me, but I only get a white screen.
danpost danpost

2016/7/9

#
Super_Hippo wrote...
I don't know if it's just me, but I only get a white screen.
You might try another browser -- I am currently getting a black window with text; however, the window is reduced in size and I needed to scroll to both center positions to view the text.
trimil trimil

2016/7/9

#
I am working on both of those problems.
You need to login to post a reply.