Missing java file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Missing java file

lvu621
Hi all,

I'm a computer science teacher and my students had to make a Java project for me 2 weeks ago. There is one student who encountered a problem, though. She handed in only one class, even tho I expected two. The other file was a Java main class without any code in it (except for the - empty - main method). The student says she wrote the code for the other class too, so I wonder if I could retrieve this code in any way.

A few more facts: she says she never saved either one of the classes, so I don't know why one would still be there and the other one wouldn't in that case. The only way I think the file could have gotten lost, is because she discarded it by accident when she closed off Netbeans OR I closed down the computer while Netbeans was still open and it never got saved. She never ran the program either, so there is no .class files that I could decompile.

Two questions about this. One: can she prove in any way that she did write the code (so that I can allow her to make the project again and get better marks)? Two (even better if this is possible): is there any way I can retrieve the code? Since the file was never saved, it wasn't deleted either, so that I don't think it's in the Local History, as I read elsewhere on this forum. In addition to that, the project was made 2 weeks ago, so I assume the Local History on that would be gone anyway!

Thanks for your advice/help/...




Reply | Threaded
Open this post in threaded view
|

Re: Missing java file

Simon Roberts-4
I suspect "the dog eat it". NetBeans prompts for saving anything that's been changed. If she's truly that incompetent she deserves to fail anyway.

Just my $0.02, of course.


On Dec 9, 2017 02:38, "lvu621" <[hidden email]> wrote:
Hi all,

I'm a computer science teacher and my students had to make a Java project for me 2 weeks ago. There is one student who encountered a problem, though. She handed in only one class, even tho I expected two. The other file was a Java main class without any code in it (except for the - empty - main method). The student says she wrote the code for the other class too, so I wonder if I could retrieve this code in any way.

A few more facts: she says she never saved either one of the classes, so I don't know why one would still be there and the other one wouldn't in that case. The only way I think the file could have gotten lost, is because she discarded it by accident when she closed off Netbeans OR I closed down the computer while Netbeans was still open and it never got saved. She never ran the program either, so there is no .class files that I could decompile.

Two questions about this. One: can she prove in any way that she did write the code (so that I can allow her to make the project again and get better marks)? Two (even better if this is possible): is there any way I can retrieve the code? Since the file was never saved, it wasn't deleted either, so that I don't think it's in the Local History, as I read elsewhere on this forum. In addition to that, the project was made 2 weeks ago, so I assume the Local History on that would be gone anyway!

Thanks for your advice/help/...




Reply | Threaded
Open this post in threaded view
|

Missing java file

priya465
In reply to this post by lvu621
In NetBeans there is a History of All Objects used in a project that can be restored:

1. Right click on the folder/directory that the files had been deleted
2. Choose Local History – Restore Deleted
3. Select the File(s) you want to Restore
4. Done
I hope this solution helps...




Reply | Threaded
Open this post in threaded view
|

Missing java file

lvu621
In reply to this post by lvu621
Problem is the files weren't actually deleted. They were never saved, though, so I guess they would have to have been discarded. When I try to mimic that situation and do what you suggested Netbeans says "There are no deleted files under that folder".




Reply | Threaded
Open this post in threaded view
|

Re: Missing java file

geertjan.wielenga@oracle.com
You’re encouraged to move to the Apache NetBeans mailing lists as soon as possible, ask your questions and discuss any concerns, etc, there and to not write to the @netbeans.org mailing lists anymore.

https://cwiki.apache.org/confluence/display/NETBEANS/How+to+Participate

See the announcement here:

https://jaxenter.com/netbeans/january-1st-2018-end-netbeans-org-mailing-lists


Geertjan Wielenga | Principal Product Manager
Phone: +31620320056 | 
Oracle Developer Tools

ORACLE Netherlands | Hertogswetering 163-167 | 3543 AS Utrecht | Netherlands


Oracle is committed to developing practices and products that help protect the environment

On 11 Dec 2017, at 21:01, lvu621 <[hidden email]> wrote:

Problem is the files weren't actually deleted. They were never saved, though, so I guess they would have to have been discarded. When I try to mimic that situation and do what you suggested Netbeans says "There are no deleted files under that folder".