I have a problem that drives me really crazy.
I am using Ubuntu 14.04 and installed eclipse without its installer but compressed file. Now I am trying to connect eclipse to all my source code - .c, .cpp, .java, etc but I cannot see the 'eclipse' from Open With - Other Applications - Show Other Applications in nautilus.
I have tried to add '%f' or %F' but didn't work at all.
Is there any solution?
It sounds like the problem is that your File Manager (Nautilus?) has no "Open, With" context menu.
If so, this link might help:
https://askubuntu.com/questions/458281/ubuntu-14-04-nautilus-has-no-menu-file-edit-etc-dont-exist
Run dconf-editor, navigate to org > gtk > settings > file-chooser, then untick show-hidden.
See also:
Ubuntu Fix: Add Program to List of Applications in “Open With” When Right-Clicking Files in Nautilus
If this doesn't work, please specify:
Which Ubuntu desktop you're using (Gnome 3?)
Which file manager GUI you're using (Nautilis? Nemo? Other?)
Whether or not you see an "Open With" context menu at all; and, if so, what options are available
PS: Installing the .zip file should be OK.
OP found the solution and posted this as the answer (in his question, so it was moved into a dedicated answer):
I walked through the post over and found out I had another eclipse.desktop in ~/.local/share/applications. Once I deleted it, then the system successfully load the settings from /usr/share/applications.
Related
Recently i have been working with a project that requires Java 1.1 version. But whenever i try to run the
jdk-1_1_8_006-win.exe file , I have been receiving a message as shown below.
Image showing error:
After clicking ok on that:
I have seen one answer in stack overflow like
Get the Java installer files.
Execute jdk-1_1_8_010-windows-i586.exe When the error dialog is
displayed, open C:\USERS(User Name)\APPDATA\LOCAL\TEMP\~EXB0000 (Do
not click the OK button at this time) Copy all files to another folder
Click the ok button Download the tool and execute it.
Download Is3Engine.zip (ReactOS's InstallSheild Engine 3.0) Extract
Is3Engine.zip (containssetup.exe) Move setup32.exe to the copied Java
installers Execute setup32.exe
But the issue here is I am unable to find an Folder called APPDATA in my PC.
FWIW, this isn't due to AppData not being there; if it wasn't, your system would break in all kinds of weird ways. It's hidden and system, because messing with it can break it, but it's still there; you can change Explorer's settings if you really want to see it.
This error is because 16-bit software can't run on 64-bit Windows, and out of sheer inertia, the use of 16-bit installers continued all the way into the early 2000s. Windows x64 has workarounds for a few common ones, like Installshield and NSIS, but anything other than that will instantly fail.
There's really nothing you can or ideally should do other than installing it on a VM of an older system that it was meant to run on.
I tried the other solutions but they didn't worked, so please don't just say "It's a duplicated so now you have to open this link." Because I tried them.
I have Windows 8.1 and I installed Java 8 JDK some days ago, now I unistalled it because I've had some problems with it (like the PATH for cmd was not set), and after unistalling it I tried to open the Java installer, after the UAC popup nothing happen. I tried opening the installer "sandboxed" with the program "Sandboxie", the Installer opened 2 services, after a few seconds another service opened and then every service closed.
I have no error, no logs, nothing.
P.S.
I tried downloading again the installer 3 times, nothing changed.
Edit:
JRE Installer doesn't start either.
Edit:
I'm actually in safe mode with internet connection and the installer still don't want to run... I don't know what to do now...
I tried with "sfc /scannow" and it said there was no problem, I tried "DISM.exe /Online /Cleanup-image /Restorehealth" too, no problem got reported.
Edit:
I tried running the installer with a Guest account, nothing changed. Anyway I found a solution.
I searched for everything that contains "Java" in C:\ and I found some value (that could have prevented Java Installer from running because it thought Java was already installed), I deleted them (carefully, don't just delete everything on your computer, that's not the way.)
Now I tried launching the installer and.. Here we go! Finally I can install it.
Thanks to anyone who tried to help me, I appreciate it.
In my case problem was in C:/Users folder. Initially my OS language was not English, after changing, it causes some errors. I couldn't install jdk, couldn't run some desktop tools. After looking for the solution, I could found it. My user name in Users folder had non English letters. So, I changed name of user and it solved my problem:
https://superuser.com/questions/890812/how-to-rename-the-user-folder-in-windows-10
You should add java in Path:
Open the System Properties.
Find the Advanced Tab in the Properties Window. Click Environmental Variables.
Scroll down in the System variables and find the PATH variable.
Select the PATH variable and click the Edit button.
Add the Java installation path to the PATH variable (dir_java/bin)
And also create system variable JAVA_HOME
What antivirus are you using?
If your av has some kind of process viewer that you can use to see when it starts and when it terminates and if it is marked a suspicious. Here is a screenshot from my av. I use comodo image here
If your av doesn't have this feature, try turning it off during the installation. Remember to turn it back on after you're done
Whenever I unpack dmg installer I see image containing launcher something like - "Installer - spring-tool-suite-3.6.0.CI-B1808453-e4 ". After I try to launch this installer the loading indicator hangs a little, disappears and nothing happens. I am being forced to migrate to Mac OS due to work environment. I can't even launch the installer.
I suspect this is due to default Apple Java (whatever that means I am not OS X expert) being deleted on this laptop and JDK8 is on the home path.
ALE:~$ echo ${JAVA_HOME}
/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/
Well, this forces me to migrate to IntelliJ, but I can't just believe that because of someone else fashion I can't do the work usual way...
Any hint? I don't even get error message..
Had the same issue - download .tar.gz instead of .dmg distribution. There (sts-bundle/sts-3.X.X.RELEASE/STS.app) you'll have STS.app it should run.
Since there is an interest around the question I will post the valid solution. Now what I did which caused an error - deleted default mac os java, and installed java 8 as HOME. Now Eclipse (STS, JasperSoftStudio or whatever) which was installed using dmg will look up the java not anywhere near your HOME directory. (even if it is inside Library as it should be).
Solution: Go to eclipse distribution directory (typically under applications) find the launcher, right click on the launcher, "show package contents", go to MacOS folder, open the .ini file(will have different name for different distributions) and locate -vim entry which statically points to some mac os location attempting to find java lib which is not there and never should be. Make sure your java home path is set, as now it will start to behave normally and look up home path.
If this still did not fix the issue, attempt to delete workspace folder if left from previous installation(or rename it) and play with Locked/Unlocked on the launcher properties. However the last two options are rather dances around the fire to summon spirits. The first suggestion should work 100%.
Make sure the error we are solving is something like: "Unable to locate plugin bla bla" in the error log.
All the best.
I'm trying to accomplish a very basic task and somehow can't seem to find how... I would like to have my Eclipse environment set in a way that I can get help and documentation on any standard class/method in the JDK, like I used to do a few years ago with Eclipse on Windows, where having the cursor on a class name (e.g. PrintWriter), and clicking Ctrl+F2 would open up the Java documentation for the PrintWriter class.
Here's my environment:
Running OS X version 10.6.6.
Just downloaded and installed the Java Developer Package for Mac OS X 10.6 Update 4 from connect.apple.com
I have Eclipse Galileo installed.
Under /Library/Java/JavaVirtualMachines I have a file named 1.6.0_24-b07-334.jdk, which seems to be the new JDK I just installed. However, it's a single file, not expanded into directories and files. Right-clicking it and selecting "Show Package Content" shows me that deep inside it contains the files docs.jar and src.jar. However, not sure what I should be doing with the 1.6.0_24-b07-334.jdk file - should I leave it as is, or perhaps expand it to a full directory structure?
Under Eclipse Preferences, Java/Installed JREs I have JVM 1.6.0 (MacOS X Default) selected. However, the path points to /System/Library... and not to /Library...
Anyway, in Eclipse, putting the mouse over a class name, I get a brown dialog with a short explanation of the class. However, I don't know how to open up the full java documentation of the class. Also couldn't find anywhere in Eclipse a place to indicate where to take the java documentation from, nor which hotkey would bring the java documentation up.
I apologize for the many details, I'm just assuming they may be necessary to get a good answer.
Thanks!
/A
I've had the same problem — previously I had been able access Java documentation and source directly in Eclipse, but that disappeared after one of the Java updates from Apple last year.
My solution was to manually add the source and Javadoc to the JRE definition in Eclipse. Here's how:
Navigate to Preferences --> Java --> Installed JREs
Select your preferred JRE and click Edit...
Select the classes.jar library (should be the first one in the list) and click Javadoc Location...
Click Javadoc in archive
Set Archive path to /Library/Java/JavaVirtualMachines/1.6.0_24-b07-334.jdk/Contents/Home/docs.jar
Set Path within archive to docs/api
Click OK
now, optionally, you can set the source code too...
With classes.jar still selected, click Source Attachment...
Set Location path to /Library/Java/JavaVirtualMachines/1.6.0_24-b07-334.jdk/Contents/Home/src.jar
Click OK
In fact that 1.6.0_24-b07-334.jdk package is actually just a folder; it is treated as a single file by OS X but you can access its contents directly if you know the right path. What if you don't know what path the enter? You can browse the contents from Eclipse if you know this trick:
While attaching source code or Javadoc in Eclipse, click on the External File... or External Folder... button etc to bring up a Finder window
Navigate to your Java JDK folder (usually /Library/Java/JavaVirtualMachines)
You should see a list of your JDKs, for example 1.6.0_22-b04-307.jdk and 1.6.0_24-b07-334.jdk)
Press / on your keyboard to bring up the Go to the folder dialog box
Delete the / from the dialog box, and start typing the name of JDK you want to navigate. You can press Tab to autocomplete the name if you like.
Click Go
You are now browsing the contents of the JDK package; you can now click through to Contents/Home etc where you should see appledocs.jar, docs.jar, src.jar and other goodies.
For everyone finding this StackOverflow-Post and not finding the src.jar:
Apple removed it from the SDK and it's not supplied by default, however you can download it from Apple self at:
http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wo/5.1.17.2.1.3.3.1.0.1.1.0.3.9.3.3.1
http://danbim.blogspot.com/2011/01/java-for-mac-os-x-106-update-3-and.html
P.S. Apple account is required (free registration)
To bring up the Java documentation in Mac, move your mouse to the desired class, then click SHIFT+FN+F2.
By the way, you can find out the shortcut key from Preferences -> General -> Keys -> type "Open Attached Javadoc". Here's my screenshot:-
Under /Library/Java/JavaVirtualMachines I have a file named 1.6.0_24-b07-334.jdk, which seems to be the new JDK I just installed. However, it's a single file, not expanded into directories and files. Right-clicking it and selecting "Show Package Content" shows me that deep inside it contains the files docs.jar and src.jar. However, not sure what I should be doing with the 1.6.0_24-b07-334.jdk file - should I leave it as is, or perhaps expand it to a full directory structure?
From what I remember from Mac OS (I had to use one two years ago for some months) I think this is not really a "single file", it only looks so in the file manager application. Look if you can navigate inside it in the file-chooser dialog of eclipse where you can select the docs.jar for your documentation.
I was having a similar problem, and was having trouble accessing the Apple Developer page to download a local copy of the docs.jar. I went to Preferences > Java > Installed JREs > Edit, and then looked at the "Javadoc Location..." value for the jars. The Javadoc URI was still set to "http://java.sun.com/javase/6/docs/api/". When I changed it to "http://docs.oracle.com/javase/6/docs/api/" the tooltips started showing up again. Of course, this will only work when you are online.
I have downloaded Java API documentation from http://www.oracle.com/technetwork/java/javase/downloads/index.html#docs and have supposedly attached it to Eclipse using the
Window->Preferences->Java->Installed
JREs->Edit->"Select rt.jar"->Javadoc
Location
And the location has been accepted and "Validates" just fine. However, for the life of me, I can't get Eclipse to show the Javadocs in the tooltip whene I hover over an item (for example in the declaration of an ArrayList). I have also restarted Eclipse in attempts to get it to work
What am I doing wrong?
To use offline Java API Documentation in Eclipse, you need to download it first. The link for Java docs are (last updated on 2013-10-21):
Java 6
Page: http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-doc-download-355137.html
Direct: http://download.oracle.com/otn-pub/java/jdk/6u30-b12/jdk-6u30-apidocs.zip
Java 7
Page: http://www.oracle.com/technetwork/java/javase/documentation/java-se-7-doc-download-435117.html
Java 8
Page: http://www.oracle.com/technetwork/java/javase/documentation/jdk8-doc-downloads-2133158.html
Java 9
Page:http://www.oracle.com/technetwork/java/javase/documentation/jdk9-doc-downloads-3850606.html
Extract the zip file in your local directory.
From eclipse Window --> Preferences --> Java --> "Installed JREs" select available JRE (jre6: C:\Program Files (x86)\Java\jre6 for instance) and click Edit.
Select all the "JRE System libraries" using Control+A.
Click "Javadoc Location"
Change "Javadoc location path:" from "http://download.oracle.com/javase/6/docs/api/" to "file:/E:/Java/docs/api/".
It must work as it works for me. I don't need Internet connection to view Java API Documentation in Eclipse anymore.
For offline Javadoc from zip file rather than extracting it.
Why this approach?
This is already answered which uses extracted zip data but it consumes more memory than simple zip file.
Comparison of zip file and extracted data.
jdk-6u25-fcs-bin-b04-apidocs.zip ---> ~57 MB
after extracting this zip file ---> ~264 MB !
So this approach saves my approx. 200 MB.
How to use apidocs.zip?
1.Open Windows -> Preferences
2.Select jre from Installed JREs then Click Edit...
3.Select all .jar files from JRE system libraries then Click Javadoc Location...
4.Browse for apidocs.zip file for Archive path and set Path within archive as shown above. That's it.
5.Put cursor on any class name or method name and hit Shift + F2
Eclipse doesn't pull the tooltips from the javadoc location. It only uses the javadoc location to prepend to the link if you say open in browser, you need to download and attach the source for the JDK in order to get the tooltips. For all the JARs under the JRE you should have the following for the javadoc location: http://java.sun.com/javase/6/docs/api/. For resources.jar, rt.jar, jsse.jar, jce.jar and charsets.jar you should attach the source available here.
Old question, but I had current problems with this issue. So I provide you my solution.
Now the sources and javadocs are inside the jdk. So, unzip your jdk version.You can see that contanins a "src.zip" file. Here are your needed sources and doc files.
Follow the path:
Window->Preferences->Java->Installed JREs-> select your jre/jrd and press "Edit"
Select all .jar files, and press Source Attachement.
Select the "External File..." button, and point it to src.zip file.
Maibe a restart to Eclipse is needed. (normally not)
Now you should see the docs, and also the sources for the classes from jdk.
I went through the same problem and I did not find some of the above answer useful because they are old and with new JDK 1.8 , documentation section has
been moved to src.zip in JDK folder (C:\Program Files\Java\jdk1.8.0_101 ) .
Now I tried everything from above and it was showing me the same problem if I press ctrl and click on (for example String or System) in my program I get the Source not found.
Now you can do this, go to the folder where JDK (C:\Program Files\Java\jdk1.8.0_101) is installed and try to unzip src.zip. Here you might face an issue as sometime due to administrative rights on this folder it would not allow you to unzip this src.zip. For solving the issue , copy src.zip and paste in any other folder ( example Desktop) and then create a folder src and unzip in it.
Now copy this folder back to JDK 1.8 folder**(C:\Program Files\Java\jdk1.8.0_101).**
Now just go to eclipse and open any program and press ctrl and click on any external objects or anything (for example String or System) .You will get Source not found , Now Click Attach source -> External Location -> External Folder and add your src location (C:\Program Files\Java\jdk1.8.0_101\src).
Now you are good to go , I tried and it worked for me.
All the above folder location are from my system , so It might be different for you.
Go to your JDK installation. (C:\Program Files\Java\jdk1.8.0_66 for me).
Unzip the src.zip file (becomes C:\Program Files\Java\jdk1.8.0_66\src\ for me).
In the Eclipse editor window: CTRL + Click on a java.lang library class. (something like String).
Eclipse will complain Source not found and tell you that you don't have the source.
Click Attach source -> External Location -> External Folder.
Find your source folder (C:\Program Files\Java\jdk1.8.0_66\src\ for me).
Click OK -> OK.
Enjoy.
Likely a problem with the path that you specified in Javadoc Location. It is pretty finicky. Make sure that it points at the root of where the javadoc starts. It could be a few directories down in the zip you've downloaded.
I have had a similar issue and looks like that the culprit was the space in the path to the archive (e.g., C:\Program Files\java\jdk). After moving the archive to another directory without spaces in path it started to work.
Instead of attaching JavaDoc attach JDK src.zip
Choose one class you want to view its documentation and press Ctrl+click over it, the Javadoc page will inform you that there is no Javadoc file attached and bellow will see a button named "Attach File". Press that button and browse to the directory where JDK is installed, normally for Win is C:\Program files\Java\jdk_xxx and inside this folder there is a src.zip file - sleect it and press OK and all is done - you already have Javadoc attached.
For OpenJDK 8 on Linux see: https://askubuntu.com/questions/755853/how-to-install-jdk-sources
The way that worked for me is:
The default src.zip is a symbolic link pointing to a non-existing folder ...
sudo apt-get install openjdk-8-source this adds this folder
locate "src.zip"
Eclipse: Window --> Preferences --> Java --> "Installed JREs", edit and point to src.zip (or open any JRE class like for example HashMap and attach source)
You should now see the JavaDoc when opening JRE classes via Ctrl+Shift+t, previously this was not possible, Eclipse may have got a docs from the default URL on mouse over methods but this requires a stable internet connection.
Ensure "Preferences" -> "Java" -> "Editor" -> "Hovers" -> "Combined Hover" is checked.
I just had to dig through this issue myself and succeeded. Contrary to what others have offered as solutions, the path to my happy ending was directly correlated to JavaDoc. No "src.zip" files necessary. My trials and tribulations in the process involved finding the CORRECT JavaDoc to point at. Pointing a Java 1.7 project at Java 8 Javadoc does NOT work. (Even if "jre8" appears to be the only installed JRE available.) Thus, I beat my head against the brick wall unnecessarily.
Window > Preferences > Java > Installed JREs
If the JRE of your project is not listed (as happened to me when I migrated a jre7 project to a new jre8 workspace), you will need to add it here. Click "Add..." and point your Workspace at the desired jre folder. (Mine was C://Program Files/Java/jre7). Then "Edit..." the now-available JRE, select the rt.jar, and click "Javadoc Location..." and aim it at the correct javadoc location. For my use:
For jre7 -- http://docs.oracle.com/javase/7/docs/api/
For jre8 -- http://docs.oracle.com/javase/8/docs/api/
Voila, hover tooltip javadoc is re-enabled. I hope this helps anyone else trying to figure this problem out.
if you are using maven:
mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true