I am following the eclipse set up from MIT's software construction course1. The installation yields an error and I am not sure how to fix this (pictured below)2. The URL yielding an error returns a 404 error, so I don't know if their site is down or an issue with the package I'm using from MIT. Any advice is appreciated!
Error Message From Eclipse
It seems the update site recently moved to a new location.
If you don't want to contact the course staff directly, you could raise an issue against the relevant GitHub project, suggesting they update the setup file.
In the short term, you should be able to download the file to disk, change the URL (look for a line like <repository url="https://checkstyle.github.io/eclipse-cs/update"/> and change the URL to https://checkstyle.org/eclipse-cs-update-site/) and use the "Browse File System" button in the Eclipse installer instead of pasting the remote URL.
Related
My Eclipse works fine, but now, periodically a message box comes up saying
Code Recommenders cannot download its model repository index
What does this mean?
If you go to "Preferences"/"Code Recommenders"/"Models" you will see some Repository URL's listed. In my case it is http://download.eclipse.org/recommenders/models/photon/.
But when you call that URL you will get a 404 since the site has been archived in July 2019.
So this URL beeing invalid causes the Error. Since the URL is not available is seems save to silently ignore it, as beeing suggested in the error-dialog.
As beeing said in the Reviews on eclipse Marketplace the project is archived due to lack of comitting developers. And you may find an archived last version here: https://repo.eclipse.org/content/shadows/releases.unzip/org/eclipse/recommenders/stable/
As written in the other answer, Code Recommenders has been archived due to lack of active maintainers, see this forum post.
Therefore when the plugin tries to download the models it fails because the site does not exist anymore, and you will see the following error dialog:
While you could choose to ignore this download failure in the future, I am not sure if Code Recommenders actually does anything without its models (please correct me if I am wrong), so at this point you could also uninstall the plugin.
OR, you could download the models manually:
Download the archived data of Code Recommenders: https://archive.eclipse.org/archived_projects/recommenders.tgz (9.7 GB!)
Extract recommenders/downloads/models/photon
In Eclipse: Open "Window" > "Preferences" > "Code Recommenders" > "Models"
Remove the existing download.eclipse.org entry
Add a new entry with a file URI pointing to the folder you extracted earlier. Note that you have to percent escape the URI, e.g.
C:\Program Files\eclipse\recommenders becomes file:///C:/Program%20Files/eclipse/recommenders
Click the "Apply" (and Close) button
Note however, that since you downloaded the files locally and there is no active development, you won't get recommendations for new Java features.
I don't want any of you to have to download 10 gigabytes like in #Marcono1234's solution, so I re-uploaded version-specific code recommender models to mega.nz and shared them here.
Download the code recommenders
For Eclipse Juno users: https://mega.nz/file/tuRFGYQD#zB_mq6XwO7nupLqMDRWQRnnhD3-FAgT3ijtDQyGvjFE
For Eclipse Kelper users: https://mega.nz/file/NjxXFYyb#uwpP3zxESL02prgTimhDL35xPXMnDkbDwzrhJG1rcgc
For Eclipse Luna users: https://mega.nz/file/02g1DASB#3GSzaKtFSGsxhdnNx2aX47DoD22ZZ6aUu9eXTUvoxKg
For Eclipse Mars users:
https://mega.nz/file/xnQDTQLC#wmA0cfL_ChVHuQ9r0Mo_Js3ef_eDyg2yU6Z2_JTUPbE
For Eclipse Neon users: https://mega.nz/file/siBF1QYC#aVfX3-FS5sNfLmRqCPg6eUaovQPpEkMqIPWugv3E3qk
For Eclipse Oxygen users: https://mega.nz/file/9nAjUITQ#BpQ4HagdlrfZOelW8jqVgJWI-5QlA38JLCGpGoMbWpc
For Eclipse Photon users: https://mega.nz/file/oq5klCBR#vB8f0vmPH3gaYGwkw7U1SVThW5IxKMuvhBughN-sJi4
Extract it to any folders you want (in my case, c:\workspaces\eclipse\recommenders)
In Eclipse: Open "Window" > "Preferences" > "Code Recommenders" > "Models"
Remove the default entry
Add a file URL to the path you extracted your code recommender model. In my case, it's file://workspaces/eclipse/recommenders.
Click the "Apply" (and Close) button
Enjoy!
I have been working on creating a simple Java desktop app using the RESTful API for Business Objects and have run into an issue. Whenever I run my app in Eclipse in works fine; whenever I export it as a 'Runnable Jar' and select the Library handling option 'Package required libraries into generated JAR' it works fine. However, whenever I try to export it using the Library handling option 'Extract required libraries into generated JAR' I get the following error after running the app:
java.lang.NoClassDefFoundError: Could not initialize class com.businessobjects.bcm.BCM
I have the 'bcm.jar' file added under a 'res' Source Folder and have it added to the Build Path. At one point I added all the JARs under the 'SAP BusinessObjects' java folder, and external folder, but it still throws the error. The problem stems from this line of code:
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(userID, password, CMS, auth);
Would anyone know why I am getting said error? I really want to use the Extract option as it will improve performance as my app becomes larger. Any help resolving this issue would be greatly appreciated :)
EDIT: I would be happy to provide clarification or further detail upon request!
Seems this was introduced in SP04 and SAP has no intent of fixing it as the RESTful API wasn't designed to be used with Desktop apps.
Have you included the cryptojFIPS.jar? Leaving it out can cause the error.
so I have my Xamarin.Android project which contains several libraries. When I try to build I receive an error which says "java.exe" exited with code 2.
After some hours of google research I found out that I could enable Multidex.
According to the blog entry of Jon Doublas I did the steps mentioned.
http://www.jon-douglas.com/2016/09/05/xamarin-android-multidex/
According to the blog entry Android API Level > 21 handles Multidex itself.
Well my experience is that it does not. I am building on API Level 25 and get the same error again and again with the same information.
The steps in the article do not help. It seems like Xamarin.Android does not support Multidex.
It seems like you have to handle Multidex by yourself but I haven't found any solution which is working. Dos anybody found a solution which works?
I am using Xamarin 4.6 and Visual studio 2017.
Found the answer after about 20 hours of searching in my project..
So here are the steps to resolve the problem "java.exe" exited with code 2
1) Change the MainDexClasses.bat as described in the link:
http://www.jon-douglas.com/2016/09/05/xamarin-android-multidex/
2) Make sure you have enabled Multidex Option in your Android Application! Have a look at the .csprj file if Multidex is set to true (in my case it wasn't even if I enabled Multidex)
3) Add the following part in your AndroidManifest file
<application android:name="android.support.multidex.MultiDexApplication"></application>
This will tell your Android project to actually use the Multidex-Option given.
After a clean and build I was able to run my application as it is.
After finding this question and #Daniel_97s answer I was able to solve this error only by adding multidex to the project without changing MainDexClasses.bat:
Check the option in Project Options:
Add MultiDexApplication to Android Manifest:
<application android:name="android.support.multidex.MultiDexApplication"></application>
Note I was getting this error code 2 on Visual Studio for Mac and on Windows the same app was building successfully. (why?)
The solution in my case was to disable the "Sign the .APK file using the following keystore details". Because the keystore location and/or password was incorrect, java.exe exited with code 2.
I only go to option > Build > Android Build and check Enable Multi-Dex it will resolve
My .csproj file had an entry for the KeyStore that was no longer valid, even thought right-clicking the project and inspecting the properties indicated that I had pointed it to the new location.
Within .csproj look for all instances of <AndroidSigningKeyStore> and update accordingly.
I've struggled with this issue for quite a long time. I found source of the error in signing - as I cloned project repo from company TFS, Android csproj file had entries for KeyStore settings and location. I didn't have the keystore and the location on my drive was invalid. Visual Studio is then unable to sign the app while deploying and instead of some sort of FileNotFoundException it gave me just java exited with code 2. So...
tl;dr: Go to android project properties, select package signing a uncheck "Sign the apk file..." (which changes csproj <AndroidKeyStore>true</AndroidKeyStore> to false) and voila, you can now run your solution.
Reassign the path of the keystore worked for me
==EDIT 01==
Double click on Android Project > Android Package Signing
On the Keystore path, don't know why but apparently the path was wrong, I re-select the .keystore file again from the same path, and the error "exited with code 2" went away and I was able to Archive for release
Disable sign the .APK file using the following keystore details as #Klemikaze
I had this error when switching from VS Mac to VS Windows.
Here the topic Switching From VS Mac To VS Windows got “java.exe” exited with code 2
The issue was comming from the Android.csproj and the Keystore Path.
It was set to my Mac Path even if I changed it on
VSWindows AndroidProject => Properties => Signin
So I removed this lines on Android.csproj (edited with third text editor):
<AndroidKeyStore>True</AndroidKeyStore>
<AndroidSigningKeyStore>YourMacPath/Alias.keystore</AndroidSigningKeyStore>
<AndroidSigningStorePass>Password</AndroidSigningStorePass>
<AndroidSigningKeyAlias>Alias</AndroidSigningKeyAlias>
<AndroidSigningKeyPass>AliasPassword</AndroidSigningKeyPass>
On debug & release Part.
Then you can edit them on VS Windows.
Hope I helped someone.
See ya
In my case this was link to the "Sign the .APK file using the following keystore details" option as Hein Andre Grønnestad mentioned.
The location was not correct.
I wanted to put a path that could work for everyone at work so I used $HOME/Library/... instead of /Users/Me/Library/...
The problem is $HOME doesn't mean anything special for java so the keystore file could not be found.
Solution: use relative path or absolute path without $HOME variable or ~
For me, it was a problem with my Keystore. Follow this link to enable diagnostics. This will give you a more detailed error message in the output window. If it says that your keystore failed to verify, you will have to fix your keystore. This solved the problem for me.
In my case solved the problem by signing the .APK whit the values signed into the keystore that we configured to create the APK file in Release mode.
I taked the Microsoft example in here
and here I put the same values
That way a solved my problem with
"java.exe" exited with code 2
But the real information problem was in output:
Failed to load signer "signer #1"
java.io.IOException: Invalid keystore format
At the moment I don't find the real solution to this problem but, this works.
Please Update your Visual Studio to Latest version, if you are still using an old version.
If you think there is no solution then go and enable the Multidex
In my case the one of keystore details was wrong, after saving-> cleaning -> building process it worked.
Try reset the keystore <AndroidSigningKeyStore> or change to false the key
>
<AndroidKeyStore>true</AndroidKeyStore>
Only to check. But remembering that it needs to be set to true.
After Clean and Rebuild the solution.
For me it turned out I had Eclipse Temurin JDK installed and that was being used. In VS Tools>Options>Xamarin I changed the path to Java Development Kit Location to from the Eclipse path to C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot.
Maybe more importantly, I discovered Eclipse Temurin JDK was being used by running:
msbuild /bl /t:"Restore;SignAndroidPackage"
in my solution dir and then opening the resulting msbuild.binlog and clicking on the few errors and a path with Eclipse stood out. Your problem may be different but finding it this way may be the key to solving it.
EDIT: My settings don't stick after closing and reopening VS 2019. At this point I started using VS 2022 and don't have the issue.
Note: Multi-dex is enabled.
After 5 hours of looking or an answer, this is the conclusion I've found -
Enable diagnostic MSBuild output within Visual Studio, so you can see more details about your error:
Click Tools > Options...
In the left-hand tree view, select Projects and Solutions > Build and Run
In the right-hand panel, set the MSBuild build output verbosity dropdown to Diagnostic, Click OK
Clean and rebuild your package. Diagnostic output is visible within the Output panel.
If your error shows "java.io.IOException: Invalid keystore format", you are probably using an outdated Java sdk file, so do next:
Open Visual Studio and update the Java Development Kit Location to
point to the new JDK under Tools > Options > Xamarin > Android
Settings > Java Development Kit Location:
Be sure to restart Visual Studio.
My experience is...
I updated the following elements:
Xamarin.Android.Support.Design
Xamarin.Android.Support.v4
Xamarin.Android.Support.v7.AppCompat
Xamarin.Android.Support.v7.CardView
Xamarin.Android.Support.v7.MediaRouter
from 26.1.0.1 to 28.0.0.3
Then, after it started the issue with:
"java.exe" exited with code 2 Xamarin.Android project.
I just ticked the Enable Multi-Dex inside the Android project property. I am using VS 2017 in windows system.
I have some problems with opening a SAN switch in Webtools (Java version 8 Update 31).
The first problem was a failed to validate certificate
This was fixed by following the instructions on this site
However, then I got following error:
Which was solved by adding these 3 entries to the site to the exception site list (the last one is the only one necessary I think)
http://i.p.address/*
http://i.p.address/switchExplorer.html
http://i.p.address/
But now I get following error:
your security settings have blocked an application from running due to missing a “permissions” manifest attribute in the main jar web tools
The solution seems to be adding the URL to the exceptions but I have already done that in the previous step..
Open the "Mission Control Panel" of java.
If you cannot find it, have a look in the bin folder of your jdk installation, the executable should be called jcontrol.
Run it, open tab "Security", Button "Edit Site List" and add your URL to the Exception Site List. I.e. https://10.0.0.1 is all you need.
Use oracle java if you use linux and somehow miss jcontrol from the openjdk package.
Afterwards you should be able to start the .jnlp (or however you want to start the applet) of your desire.
I was trying out the sample project using libGDX(a clone of Flappy Bird) in Eclipse. This is the link to the tutorial - http://www.kilobolt.com/day-2-setting-up-libgdx.html.
In the step 18(please visit the link), when I clicked the "Run as Java Application", I am getting error alert box with message "LoadLibrary failed with error 87:The parameter is incorect". What could be the reason?
ok even though i didn't understand the reason, just got the solution from here http://aerotekit.com/win8-1-loadlibrary-failed-error-87-parameter-incorrect. This is an issue with windows 8.1 (my assumption) and it can be solved by editing the registry. Copy-pasting the solution below:
Copy this code into a text file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4d36e968-e325-11ce-bfc1-08002be10318}\0000]
"OpenGLVendorName"=hex(7):61,00,74,00,69,00,6f,00,36,00,61,00,78,00,78,00,2e,\
00,64,00,6c,00,6c,00,00,00,61,00,74,00,69,00,6f,00,36,00,61,00,78,00,78,00,\
2e,00,64,00,6c,00,6c,00,00,00,00,00
Now save the file and change the extension from .txt to .reg. If you are unable to edit the extension you may have to go into your folder options and make the extensions viewable.Note: The next step has you edit a registry entry. I recommend that you make a registry backup before proceeding. While this is unlikely to cause any issues, it is better to be safe than sorry.
After you have the .reg file on your desktop just double click it and it will run.
Restart your computer.
I got the same error when I was trying an example from book. I changed the jdk used in eclipse from 64 bit to 32 bit and this error was gone.