I have accidentally deleted a Java file from my Eclipse workspace.
Can i recover that? It's not in the recycle bin.
Check this page: How to restore deleted files in Eclipse
Suppose you have deleted any file by mistake. No need to worry. Deleted files can be restored from the history.
How to Do:
Right click on the project and open the context menu. And go for the menu item "Restore from Local History...".
I think local history can help you.
Just recreate the same file in same location.
Right click >
Replace With > Local History....
Select the appropriate file data
from history.
yes...
Right Click on Project in which u want to restore those files...
Right Click > Restore From Local History > (Select files) > Restore
only "Compare With" --> "Local History" did it for me. shows dates as well. (thank god!)
Related
When I create this new class Quake and try to write some code in it ,it displays the following message,
and when I try to run it Android Studio automatically delete the class Quake.
Can someone explain me why is this happening and how to resolve it ?
You're in Packages view and putting all your files in the wrong folder. Switch to Project view (left hand, top side toggle). Under app, you should see a folder called src -> main -> java -> com.example.prateek. That's where all your class files should properly be to avoid autodeletion.
This happens due to incorrect Source folder mappings done by some mistake.
In order to resolve the same, please go to
Project Structure -> Project Settings -> Modules.
Select the Module that has this issue and select the Sources Tab
On the Right Hand Side you will find Add Content Root pane. Please Check if the Source and Test Folders are mapping to the correct root and there is no other mapping present apart from the valid root mapping [For eg src for Source Folders and tst for Test Source Folders.]
Delete any unwanted mapping present in either of them. Apply and Re sync the project.
Issue should be solved now.
i am using eclipse for android programing and now i need to view SQLite database in the emulator.
I followed these step:
Download .jar file
Place the plugin .jar file in your Eclipse plugins folder (e.g. /usr/lib/eclipse/plugins)
Restart Eclipse
Start up an Android Emulator w/ Debugging in Eclipse
Switch to the DDMS Perspective in Eclipse
Go to the 'File Explorer' tab to locate your device's database file
Navigate to: e.g. 'data -> data -> com.myproject -> databases -> myproject
Now when i try to Open the database file in Questoid i can't select it!
(see screen shot)
same advice?
From your screen shot there, the database does not have a "." (read: period) in the file name & extension area.
Improper: mydatabaseDB
Proper: mydatabase.db
Once the database shows the proper extension (and is a proper SQLite database), then Questoid will (I use the plugin all the time in Eclipse (Juno version)) then show the "active" button (not disabled like in your screen shot). When looking for latest database entries (what was just added into the database), I then click once again on the toolbar icon as you show there, in the upper right of the screen. I then go to the Browse Data tab for that view, then choose the table from the database I want to view the fields from.
I hope this helps.
Happy coding...
I had the same problem with "sqlitemanager": only .db-Database files are accepted.
This is the solution:
Download this Questoid SqLiteBrowser: http://www.java2s.com/Code/JarDownload/com.questoid/com.questoid.sqlitebrowser_1.2.0.jar.zip
Unzip and put it into eclipse/dropins (not Plugins)
Try following these steps:
1) Close Eclipe
2) Remove the .jar from /usr/lib/eclipse/plugins.
3) Place the .jar in /eclipse/dropins and let Eclipse try to install it for you.
4) Start Eclipse.
you can always use sqlitebrowser externally . You will have to pull your databse everytime from ddms though .
The file has to end with .db extension, so the answer is to name your database as this sqlite browser expects it to be.
Another way of fixing it is to find a year old version that does not have this constraint.
Please use the extension ".db" in lowercase, please don't try with these extensions .SLQLITE, .BD, .DB, .SQL, or similar or without extensions.
Regards,
In an IDEal world I should be able to filter by pattern or at least file extension.
I never want to open .java files in Open Resource, there's a separate window called Open Type for that.
I saw this, but it's not a general solution: How do I hide .class files from the Open Resource dialog in Eclipse?
I cannot simply mark the .java files as derived, because they're not!
Go to
Project -> Properties -> Resource -> Resource Filters -> Add
There you select: Exclude All, Folders, All Children (recursive)
Name Matches: .java
That should do the trick.
regards, kayz
What worked great for me is
Open the Open Resource dialog (Ctrl + Shift + R, or Navigate > Open Resource)
Click the kebab menu (the three dots icon, top right of that dialog)
Click on the Select Working Set
Select all checkboxes under the Selected Working Sets
Click on the OK button
Et voila - now I see only 1 match instead of 8 as
I am trying to edit the java.security file in windows. When I add an entry to it and try to save, it says 'Access Denied'. How do I change the permissions to this file.
I have also tried by making notepad to Run as administrator but it didn't work.
Please help.
Try this and say if it works. It worked for me while opening hosts file.
http://www.labnol.org/software/edit-hosts-files-as-administrator/13673/
edit:
The relevant information from the linked page:
Step 1. Open your Windows start menu, search for the notepad application and then right click the notepad icon.
Step 2. Choose “Run as administrator” and then, while inside notepad, browse to folder (java.home\lib\security\java.security).
You can now edit and save that file in the same folder without any issues. To recap, the trick is that instead of directly opening a protected file in the associated application, you run the application first as an administrator and then open the file inside it.
1) Copy original java.security file to desktop.
2) Edit the file there and save it.
3) Copy the file to %JAVA_HOME%/\jre\lib\security
4) Replace the original file with modified one.
I need to change the name of my application, so people who download and install it can see the name but I don't know where to do it.
What file do I need to edit?
you must right click on your project in Project window [ctrl + 1] and choose rename option for
renaming your project name.
if your project is mobile Project you must right click on project name , select properties options and then on Application Descriptor edit MIDlet-name value.
If you use gradle:
BuildScripts/Project/settings.gradle
rootProject.name = 'yourprojectname'
If your project is Maven based, you can either add/update the application name in pom.xml (found in Project Files folder) or go to File >> Project Properties and add/update the application name.
Open "project.xml" file under nbproject folder inside the project folder of the one you want to change the name.
it is in the tag <name>.
Just change it and that is it.
open project.properties in dir nbproject
look up to manifest.midlets and change the name after MIDlet
Rightclick on the project node and select rename.
If you want the folder of the project also to have the new name or whatever that wasnt renamd then :
1.in build.xml in text editor find old name and replace with new one. Its place is: C:\NBProjectsFolder\OldName\build.xml Save that.
2. Remove all cash situated in , e.g.: C:\NBProjectsFolder\OldName\build\gwt-unitCache.
3. Find in C:\NBProjectsFolder\OldName\nbproject\private private.xml file and edit it in a text redactor by renaming old name within the file. Save that.
Do all the changes when the Netbeans was closed.
After opening the Ntbeans it may ask to reimport the project and all files you changed will be recognized/recreated automatically