Issue with Reinstalling Eclipse After upgrading hard drive - java

I am a programming student that recently upgraded the hard drive in my laptop through a secondary service. This service was able to save and transfer over most files, but was unable to migrate over specific program files.
When trying to reinstall Eclipse I have encountered some major issues and problems I am looking to hopefully get help with.
The first issue is that through the Eclipse installer, when trying to install eclipse it would try to look for the previously used user file and spew out 100s of error messages when this failed. A workaround to get eclipse actually installed was to change the bundle pools to off.
The second and most major issue is that eclipse does not seem to recognize or have any in build libraries, as it does not even recognize what a string is. I have the JDK and JRE installed but when trying to compile is tells me that java has been installed incorrectly (which would make sense given my hack job of installing it).
Any help would be greatly appreciated. I have never had so much difficulty trying to simply install something.

Try deleting .m2 folder present inside C:/Users/<User Name>/.m2 and then reinstall Eclipse.

Related

Eclipse won't load: failed to find a main class

I am trying to download Eclipse onto my flash drive so that it can support itself if I try to use Eclipse on a computer that does not have a JDK/JRE installed and/or I do not have the permissions to install one.
I am able to download it onto the flash drive and run it fine, but the problem arises when I try to make it self-sufficient by downloading a JDK for Eclipse to use on the drive. I have tried many different solutions (yes, I am aware of the abundance of "why is eclipse telling me it cant find main class" questions), but none of them apply to me. I followed this tutorial in my endeavors, but when I run the batch file it comes up with the standard Failed to find a Main Class in "F:\eclipse\\plugins/org.eclipse.equinox.launcher_1.5.200.v20180922-1751.jar.
I know the \\ looks a bit out of place, but I know that's not the problem since I've tried editing the eclipse.ini file to fix the path but it gives the same error (just with F:\eclipse\plugins\org.[...].jar instead)
I'd really appreciate any help anyone could give. Thanks!
Eclipse has required Java 8 or newer since the Neon release, in 2016. Update your version of Java.

STS on MacOS Error: Cannot find main class (I've tried every solution I can find)

I'm relatively new to programming. I recently installed Spring Tool Suite (the only option I found for the Mac install was for a 64bit version) for Mac on my system, and after installing I created a test project using a java main class to sys out "hello world" to the console. Everything was going swell until I tried to compile and run the program. The console spat back out at me "Error: Cannot find the main class TestApp" (Test App was the name of my main class). I checked it for errors, found none. I thought originally that the project was bad, so I deleted it and created a new project with a similar name. This project returned the same error.
I did some research and found that occasionally the .metadata file for a workspace can be corrupted, so I tried deleting that file, and reopening an STS workspace from the folder to regenerate it. This didn't work, so I tried creating a new file and starting a workspace there, then importing my test project into the new workspace. This also returned the same error.
So then I thought maybe my build path had been corrupted, so I checked and it was pointing to the correct files. I verified that the compiler is working and compiling the run, as the generated bin folder had a binary file in the project had a file in it. I tried I tried deleting the run config and starting over. Still no luck.
I tried project=> Clean, then re-running, then tried deleting the .bin file and re-running, which compiled and created a new binary file, but still returned the same error in the console.
I tried an uninstall and reinstall of STS, deleted all of the folders for my workspaces, and created new folders.
I tried fiddling around in the project libraries to see if any dependencies were missing, and found nothing.
I tried starting a SpringBoot app to see if maybe running Maven for dependencies would help somehow?
Someone suggested it may be an issue with my machine being older, and sure it's old, but it's fully updated, has an i5 processor, 16 gigs ram, and a full TB of storage. I would be really surprised if that were the issue.
These were all of the solutions that I could find, and I may have tried a few other things that I can't remember (I've been at it for the whole day now).
Does anyone have an idea what may be going on here? I'm at that point where punching the computer seems like a possibility. If it is my machine, I know that using the Eclipse IDE with an STS plugin may be more lightweight, but I've heard that the plugin is also kind of a pain to work with. Currently I've just uninstalled STS again, and may try installing again if I can find a new solution to try.
After some further research I came across a way to reconfigure JRE's. I'm not 100% sure of what I did to fix it, but after a full reinstall and new repo folder, I went to configure JRE's when creating a project and set both options to v1.8 . It's working now!

Issue Installing java

so i was installing java and my pc decided to shut off before it could finish, i don't have java anymore, and now when i try to open the installer it never opens, i have tried using CCleaner to clean the registry, i have tried installing in safe mode, someone told me to check the checksum to make sure the file isn't corrupted and its not, i have tried the offline and online installers with no luck
i have been trying to solve this for a week with no luck =P was hoping you guys could help
You could try deleting the location it was installing to and then reinstalling.

Correct Java dependencies installed for eclipse ADT development

I have eclipse and the ADT bundle correctly installed on my home PC, and tried to install it on my laptop so I can work on my projects on the go. However, I either didn't set the java paths correctly, or installed them in the wrong place, because I can't get a default project to load without errors.
I have correctly:
-Installed the ADT bundle and launched eclipse without errors
-Created a workspace
-Correctly Installed both the jre8 and jdk1.8.0_05 in the location C:\Program Files\Java
I am very new to Android development, and I feel like I was lucky to set up the Java dependencies correctly on my home PC, no such luck this time from what the error look like...
However, when I try to make a basic "Hello world" project, I immediately get the following error:
The container 'Android Dependencies' references non existing library 'C:\Users\userName\workspace\appcompat_v7_3\bin\appcompat_v7_3.jar'
I have tried adding the library, by checking build configurations, but I don't understand fully whats going on to correctly solve the problem. Here is my workspace:
And lastly, I tried checking the build configurations to see that the libraries are, in fact, missing. Or something like that. I am not sure if I should just try to reinstall java and the jdk.
Build configuration:
Anyway, I'm not sure what I deleted, misplaced, uninstalled, or didn't install, but if anyone could point me to a solution I would be very grateful. If anyone has any other questions on my setup I will try and be as thorough as possible. Thank you!
In my experience I have had issues like this if not running eclipse as Administrator. Make sure that you aren't being blocked here.
EDIT: Please note Chris Stratton's concers regarding running an IDE as Administrator, as seen in the comments below.
EDIT 2: In my more recent experience, I have noticed that if I installed the SDK by copying and pasting the contents of the downloaded, compressed, folder to a destination rather than extracting it first, I would be required to run as Administrator. If this is the case, delete the SDK that you copied out of the compressed folder and simply extract the contents of the downloaded compressed folder. I am running Windows 7 so it is likely that this applies to all Windows 7 and 8 OS's.
In another case, I have also seen issues like this if the JRE is installed second rather than first. In this case, a reinstall of the SDK is probably all that is required.

Error launching first test application: Android Packaging Problem?

Conversion to Dalvik format failed: Unable to execute dex:
wrapper was not properly loaded first
[project]
Android Packaging Problem
I've never worked with Java or eclipse before, I'm following this introductory guide and all searches via google return no helpful results. I'm guessing the problem is I have built Android stuff with eclipse properly but I have no idea, I followed this guide to the letter and everything went as it explains it should.
Any ideas what caused this problem, or is it specific to the guide? If so I'll post on their help page.
I have tried doing project -> source -> clean up, but that didn't fix anything.
Edit:
I went to Project -> Android tools -> Dex bytecode and it reported:
DexDump: missing classex.dex for project. Please compile first.
So I guess that's my problem! Not sure how to solve though.
Go to Project -> Clean
It will rebuilt workspace and fix the errors if any.
As I said, I had the same problem so I tried all the different versions and
then I stopped filling in the SDK-version number
and finally it did not complain anymore about the wrapper.
After that it was totally fine to write the SDK-version when I created new projects.
Hope it works out for you too.
Had the same problem (running on Windows 7). I resolved it by running Eclipse with Administrator privileges.
try to run eclipse under administrator permission. Problem may be resolve.
I think you installed the SDK in "Program Files" folder . So for do something inside, must have administrator permission.
One thing that may help is to create a new test Android project.
In Eclipse, select File → New → Android Project.
Set the project name to "Test3", check Android 2.3 for the build target, type "com.example.android.apps.test3" for the package name, and type "Test3Activity" in the "Create Activity:" text box. The form should look like:
Click Finish.
Expand the entry for "Test3" in the Package Explorer. Navigate to res/values/strings.xml. Double click on the entry for strings.xml:
Set the text content of the string element having name "app_name" to "Test3":
Right click on "Test3" in the Package Explorer and select Run As → Android Application. The emulator should open and after a long while, you should see:
If these steps do not work, then you probably have an error in your installation.
Try it out and let me know.
I had the same problem earlier today. Google was largely unhelpful.
I fixed it by removing the project from eclipse, then re-importing it.
According to this bug report the problem is caused by upgrading to version 9 of the SDK.
Had the same HelloWorld problem with Ubuntu 64 Lucid / Eclipse 3.5.2 from Ubuntu repository. Restarting Eclipse did the trick, though I notice it still fusses about API level requirement when HelloWorld is run.
Running it as Administrator has solved this issue for me..
Had the same problem - occurred after I tried downloading Android platform v2.3.3 (was using 3.1 and 3.2 earlier) and it interrupted in the middle - restarted eclipse and cleaned all projects and rebuilt and the problem went away
At what point in this tutorial/guide are you running into this problem and did you make sure to include your package information in each file or ie com.something.somethingelse at the top of your class or classes?
Perhaps a registry error or maybe even a problem with activity implementation.
Please post your code if this did not start you in the right direction.
Here are a few things to check:
Make sure you have the latest version oF Eclipse (Helios)
Make sure that you have the Android SDK plug-in for Eclipse.
Now if you have done that... Make sure that any classes you add (Each screen you view on Android is a class and is called an Activity) are in your androidmanifext.xml file See http://wrenbjor.com/2011/01/12/the-androidmanifest-xml-file/ for help on understanding this process.
otherwise make sure there are no red x's in your code or it wont work.
If you still have problems post some code and we can try to help.
Had the exact same problem the other night. Upgraded to Helios (3.6) and it went away, quite possibly as a side-effect.
Under windows 7, rather than run eclipse as an admin, change the permissions on the eclipse folder so the creator/owner has full control, and do the same with the folder the android SDK is installed into.
I had installed Eclipse using the files provided by Windows' native ZIP extractor. I deleted the files and took them from 7-Zip instead. Now the error is gone. So maybe using another ZIP extraction tool will help.
Recently got this when failing upgrade using adb-manager with eclipse open (win32). As eclipse was open, upgrade failed. Then returning to my project this problem occured.
Was solved by closing eclipse, restart as administrator and cleaned project.
I had the same problem but I resolved it using following steps(using eclipse helios and windows XP ) :-
Right click on eclipse.exe.
click on Run As...
Uncheck the checkbox before "protect my computer from unauthorized activity".
And it is running for me as expected !
hope it will also run for you.

Categories