How do you restore from a old __jb_bak__ or __jb_old__ file

穿精又带淫゛_ 提交于 2019-12-11 05:34:04

问题


How can one get the backed up file from an old jb_bak or jb_old intellij file. I recently found the jb_bak of a deleted file(.java) which wasn't recoverable using Local History how can I get this file back to its original state from the jb_bak


回答1:


Just change the extension of the file to the required one. If it is a backup of .java, changing the extension to .java should work.

These files are produced by safe write, when IntelliJ first saves contents to a temp file and then renames it.




回答2:


How I finally solved it: wasn't able to recover the original file from the jb_bak or jb_old though. I downloaded easus data recovery wizard

and specified my project's jar production in order to recover the deleted class outputs(since my src class files were overwritten already) i.e. C: \ IdeaProjects \ Yuppies \ src \ main \ resources \ Jars \ out \ production \ Jars \ yars \ ...

Yars was the folder containing my classes @src

For anyone who runs into this similar problem you may want to try checking the following paths as it applies for your project(my project's name was Yuppies ) if the above doesn't work or if you want to compare results above with these so you can get the copy of your file with the largest size/the most recent update:

C:\IdeaProjects\ Yuppies \target\classes\Jars\out\production\Jars\ yars \ ...

OR

C:\IdeaProjects\ Yuppies \target\classes\ yars \ ...

If that doesn't work try checking if intellij built a jar of the original class @

C:\IdeaProjects\ Yuppies \target\classes\Jars\out\artifacts\ ...

and see if you can decompile the jar file.



来源:https://stackoverflow.com/questions/54047457/how-do-you-restore-from-a-old-jb-bak-or-jb-old-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!