I am trying to add the Javadoc location in Eclipse Helios on OSX Lion 10.7.3. I just installed the Java for Developers 2012-01 from Apple.
I have the following problem: There is no src.jar/docs.jar file in my Java install folder (/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home).
Did they remove it from the installation? What can I do to fix this?
Thanks.
By default the JDK on Mac does not include src.jar.
You need to download and install "Java Developer Package" from Apple Developers.
After installation you will find src.jar under a path similar to this
/Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home
The default "user" downloads of Java from Apple don't include the sources or Javadoc. You can download a special Java Developer package for installation from https://connect.apple.com/. You'll have to register with Apple with an Apple Id, but the free account is enough to download the developer package, no need for a full, costly ADC membership.
The good thing about the developer packages is also that they don't overwrite each other, so you can install multiple versions to test your software with.
As a workaround, mavenise your project, install m2e and let maven download the sources (right click -> maven -> download sources). The advantage being you can download sources for all libraries in additions to the jdk
Related
our company uses the Eclipse IDE with some plugins that are required to start our platform. I want to create a bundle for our Java developers that contains the latest Eclipse Java (Oxygen) with the plugins already installed.
So far I've installed Eclipse with
sudo cask brew install eclipse-java
which created an /Application/Eclipse Java.app.
After installing the plugins within Eclipse with Help->Install New Software the ~/.eclipse/ was created in my home directory.
Is there some way to zip these folders to create an distributable package of eclipse or am I missing other files/directories?
Is it possible to move the plugins in the installation directory as well?
Thanks for your help!
It is not advisable to use any Eclipse distribution that's produced by packaging tools. It's best to download directly from eclipse.org, for various reasons.
As for customizing an Eclipse "package" for distribution yourself, have a look at the Oomph project, which is designed for that exact purpose (and others). Oomph is what produces both the installer and the downloadable packages of Eclipse IDE releases. You can read specifically about Oomph authoring here.
You can use the official eclipse installer. There is an advanced mode to disable the p2 pooling. Then using this mode, everything will go into the eclipse folder. Afterwards you can zip it and give it to others. Of course you are always bound to the CPU Arch still.
I've just installed an Xubuntu 16.04 64bit virtual machine in VirtualBox. I used the Eclipse Neon Installer and picked the CDT edition.
Right after I started Eclipse I also tried to install the PyDev from the Marketplace. Right after the dialog window where you select which sub-components you want to install (for example Mylyn integration) I got
Unable to read repository at http://www.pydev.org/updates/content.xml.
Unable to make member of class sun.security.ssl.SSLSocketImpl
accessible: module java.base does not export sun.security.ssl to
unnamed module #7098b8f8
The underlying JDK is OpenJDK 9 (from the official repositories) and I have also tried switching to OpenJDK 8 (using sudo update-alternatives --config java and selecting the 8th version) with the same poor result. In addition I also have successfully installed PyDev in another machine that is using Xubuntu 16.10 (same architecture).
I was unable to find any hint on what's going on.
EDIT: Updating Eclipse works (I've just updated CDT which for whatever reason was not the latest version).
I guess there's something wrong with the regular site. Perhaps because Source Forge switched to Let's Encrypt.
The best solution I found was to install PyDev from a zip file.
Download the PyDev zip file from Source Forge.
Unzip it, and copy the contents into Eclipse's dropins folder.
Restart Eclipse.
I wasn't sure exactly where the files were supposed to go, so here's the folder layout that worked for me:
eclipse
dropins
Eclipse X.Y.Z
features
many folders
plugins
many folders
Before I got that working, I found another option on this question: use an AWS mirror for the PyDev update site. Unfortunately, the AWS mirror has an old version of PyDev.
I have the eclipse CDT installed, and I would like to install Java development functionality (JDT) on top of my CDT installation. I've been Googling from an hour but I can't figure out how to do this.
What plugin do I need to install? What update site do I need to use?
All versions of Eclipse have a standard base, then a specific set of plugins, depending on the version. All you have to do is go to the Help > Install New Software menu, select the Eclipse update site (e.g. "Galileo - http://download.eclipse.org/releases/galileo"), and under the Programming Languages section, select Eclipse Java Development Tools.
If you don't see the Java Development Tools in the list, click on the "already installed" link on the install page--you may already have the Java tools installed.
Remember to write http:// before the download.eclipse..... if you don't put that it won't work
For Eclipse 2020-06 the weakest precondition seems to be
1.) JDK 11
2.) eclipse.ini has top entries
-vm
<jdk-11/jre-11 path>/bin
3.) JDT appears in "Install New Software" repository http://download.eclipse.org/releases/2020-06 as "Eclipse Java Development Tools"
NOTE: Installation of Java 11 is not required, downloading/extracting ZIP File is sufficient, e.g. if you prefer to continue development with Java 8
Update for Eclipse Release 2021-3
Here, with the JDT-Release JDK 11 or later is already installed
Choose Menu Help->Install New Software,
Select Work With: "2021-03 - http://download.eclipse.org/releases/2021-03"
Filter "Development Tools"
Select "C/C++ Development Tools SDK"
Complete Installation with Next ... Restart Eclipse
Is there any major change in p2 mechanism in Eclipse 3.8? I tried to install Eclipse 3.8 plugins via p2 dropins mechanism but its not working at all. It is not able to resolve the plugins. Plug-in perspective is also missing. Also the bundles.info is not coming up in org.eclipse.equinox.simpleconfigurator.
I suspect that your dropins are failing to install because they have dependencies that are not resolving in your new install. The standard behavior for dropins is to ignore plugins that cannot be installed. The user doesn't get any feedback on the problem. That's one of the reasons that dropins approach to installing plugins is not recommended.
To debug your current problem, try to install the plugins you are trying to install via dropins by using the plugin install dialog instead. You will see a report on why installation cannot proceed and will be able to proceed accordingly.
This section of the release notes should address your question.
API Contract Compatibility: Eclipse SDK 3.8 is upwards
contract-compatible with Eclipse SDK 3.7 except in those areas noted
in the Eclipse 3.8 Plug-in Migration Guide.
You should copy your installed plugins from user .eclipse/org.eclipse.platform_4.2.0_*/plugins and .eclipse/org.eclipse.platform_4.2.0_*/features to /usr/lib/eclipse-4.2/dropins/eclipse/plugins and /usr/lib/eclipse-4.2/dropins/eclipse/features. In win7 filesystem you should find C:/eclipse/dropins and your plugins and features directories in your User directory. It works with 4.3.0 juno build: I20120810-1300
See in Getting started Dropins paragraph
I recently had to migrate to a new machine and re-installed Eclipse.
At the moment, I need to generate JAXB classes from an xsd. I cannot quite remember what I installed, but in my old Eclipse I had the option -rightclick-generate-jaxb classes.
Who knows what I have to install/plug-in to get it back?
I was looking at installing Dali, which seems like it could be right, but I am pretty sure I did not install Dali last time. I also included the jaxb jars in my build path, as last time, so that should be ok.
I am using Eclipse 3.6 and Java SE 1.6.
If you don't have JavaEE:
Help>>Install New Software>>Works with:--All Available Sites--
Search for JAXB
Then select Web, XML, Java EE and OSGi Enterprise Development and install.
After you restart Eclipse you should see the generate option.
A simple fix for this problem - rather than worrying about adding additional plugins or installs - is to install Eclipse IDE for Java EE Developers rather than Eclipse Classic (both to be found here). This comes with the JAXB support and therefore provides the >Generate>Jaxb classes option.
The above methods may work, but actually the options comes from a plugin called Web Tools Platform which comes along with Eclipse IDE for Java EE Developers.
Don't worry about reinstalling eclipse or try out other methods. No matter what eclipse you use simply install this plugin by following the below procedure. You will get the "JAXB Classes" Option on click of "Generate" button.
Help --> Install New Software --> Add
Name : Web Tools Platform
Location : http://download.eclipse.org/webtools/repository/helios
Hint : In case if you are using a different version replace helios with your eclipse version name. I used it as luna. So the path looks like http://download.eclipse.org/webtools/repository/luna
And restart eclipse. Now you will have that option.
(I'm using IBM's Eclipse-based RAD, so I don't know whether this applies to raw Eclipse.)
Have a look at your project Facets (select project, rightClick->Properties, Project Facets) I have the option of selecting JAX/RS.
later: I've checked my plugins and by default I get Dali installed and it does contain some JAX/B-related stuff. I suspect you do need this.
After a lot of research here is what I have done to fix the issue.
Windows> Preferences> Java> InstalledJREs...make sure to point your jre to the jdk directory. I was pointing to JRE and as soon as I changed it to JDK, it started working.
Hope this will help you guys.
I installed this plugin
http://java.net/downloads/jaxb-workshop/IDE%20plugins/jaxbw-plugin.zip
i.e. unzip and copy to eclipse/plugin folder.
It adds an entry "JAXB 2.1 > Run XJC" to the context menu of *.xsd files.
So the menu's not really in the proper place, but it works.
In order to support the standard JAXB APIs in the IntelliJ IDEA Community Edition environment, you need to make some adjustments. One way to implement JAXB technology is to connect the xjc.exe utility included in the JDK toolkit. This utility can be launched at the command prompt, but it is advisable to configure the context menu:
In the Settings window, select Tools | External Tools and press the
"+" button.
In the Edit Toolbox dialog enter:
the name (Name :) of the new Generate JAXB Classes command;
the path to the xjc.exe utility (Program :), which should be selected on the particular computer in the file selection dialog(button "..." )`
parameters (Parameters :) which in our case will be as follows:
$ p $ FileFQPackage $ $ SourcepathEntry $ $ FilePath $
In order for the created command to work correctly, the schema file should be placed in a new package, which will then appear with the generated files.
In the settings window, Tools | External Tools - "Your command name" will appear.
All you need is to open your schema file and run the command.
you may download JAXB Eclipse Plug-In
jaxb eclipse plugin
I had the same issue while attempting to generate java classes from xsd file.
My installed Eclipse is:
Eclipse Java EE IDE for Web Developers
Version: Oxygen.3a Release (4.7.3a)
Build id: 20180405-1200
I solved it changing the workspace default JRE from JRE to JDK in Project Properties / Java Build Path / Libraries
This link describes how the problem arises:
https://www.youtube.com/watch?v=zgblFjA-5Ks
This link explains how to change the default JRE.
https://www.zkoss.org/wiki/Setting_Default_JRE_In_Eclipse
Hope this helps
If you're using Eclipse EE all you have to do is switch your running environment from JRE to JDK and that should fix it. Windows -> Preference -> Java -> Installed JRE -> Add - > (Choose Standard VM) Then Select JDK!
Then Execution Environments under Installed JRE select your JavaSE-1.8 or your version and also select JDK!