Eclipse 3.6 Helios for Ubuntu 10.10 [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have ubuntu 10.10 net book edition installed on my dell studio laptop. I downloaded helios for the eclipse site but when I am not able to run it. I have downloaded eclipse 3.5 from synaptic package manager but I am not able to update eclipse 3.5 to eclipse 3.6. Is der any other way to have updated eclipse? Eclipse 3.6 supports HTML 5.
Please let me know, thanks a lot in advance

Try this:
To install eclipse on ubuntu you need to download it first from http://www.eclipse.org/downloads/
Extract the downloaded file by right click on it and extract here or running the following:
tar xzf dir/eclipse-SDK-3.3.1.1-linux-gtk.tar.gz
Where eclipse-SDK-3.3.1.1-linux-gtk is your eclipse-SDK name with version and dir is the directory of eclipse-sdk.
Now move it to the root directory. Apply the following command to do this.
sudo mv dir/eclipse ~
Now you are ready to configure your eclipse. To do this follow the following step by step...
sudo mv eclipse /opt/
Take care of the permissions:
sudo chmod -R +r /opt/eclipse
sudo chmod +x /opt/eclipse/eclipse
Create an executable in your path:
sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse
sudo gedit /usr/bin/eclipse
Copy the following content and save the file:
#!/bin/sh
export ECLIPSE_HOME="/opt/eclipse"
$ECLIPSE_HOME/eclipse $*
Let’s also make eclipse executable everywhere by creating a symlink:
sudo ln -s /usr/bin/eclipse /bin/eclipse
Create the menu icon:
sudo gedit /usr/share/applications/eclipse.desktop
Type in this content and save:
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true
Run for the first time:
eclipse -clean
You can now start Eclipse by simply typing eclipse in the terminal or from the GNOME menu Applications -> Programming -> Eclipse

At least, you still have the manual install, which leaves your current Eclipse3.5 untouched (allowing you to go back to it if 3.6 gives you too much troubles)
To get your 3.6 download running:
Unzip the download into a directory you have complete control of, usually a directory under your username, preserving folders.
Create a shortcut to the eclipse executable, usually in the resulting "eclipse" folder.
Run the program using the resulting shortcut.
When your new eclipse install starts, point to your existing workspace.
You can continue with both 3.5 and 3.6 installed using the same workspace, or you can remove 3.5 by deselecting it from your software management program (one of several ways).
Alexander Pogrebnyak actually points out in the comment:
workspace cannot round trip 3.5->3.6->3.5.
The usual solution is to keep 3.5 and 3.6 versions of workspace in different directories.
The idea to have one workspace for each version is always the safest route to take, with each of your project imported into each respective workspace.
Note, you have to make sure your java is correctly installed (which should be already good for you, but just in case):
Installing Helios 3.6 on Ubuntu 10.10 is rather simple.
Download eclipse package from eclipse.org and extract it to a folder in your home directory.
The tricky part is setting up java6-jdk from the sun partner repository but there is a easy to follow guide:
basically you have to enable the partner repository, then install java6 jdk with:
sudo apt-get install sun-java6-jre sun-java6-plugin
and then if necessary update your java alternatives with:
# shows a list with available java alternatives:
sudo update-java-alternatives -l
# sets the alternative
sudo update-java-alternatives -s java-6-sun
sudo update-alternatives --config java

The Eclipse version available through the official Ubuntu channels is 3.5 and should not be manually upgraded to 3.6. You probably will not have write permission to do so.
If you must have 3.6 the easiest way is to download the official distribution from eclipse.org, unzip it and run the eclipse binary directly. This also allows you to fully administer it by yourself with upgrades and extra modules.

The Eclipse version available through the official Ubuntu channels is 3.5 and should not be manually upgraded to 3.6. You probably will not have write permission to do so.

There is a PPA available, that should let you upgrade through package management before the packages reach the Ubuntu repos. Sadly, the packages seem broken right now.

Related

How to find the JRE location to use the system JRE in eclipse

I'm trying to set up a java project to use openjdk-11 and all the answers I have found so far have me going in circles. I'm using ubuntu 20.04, so I used the command 'sudo apt install openjdk-11-jre'. The installation seemed to be successful but now I can't seem to figure out the file path to the installed JRE. I thought it would be under /user/lib/jvm/java-11-openjdk-amd64 somewhere. When I point eclipse to that location and try to search for a JRE however it doesn't find anything.
I have found lots of examples with info on how to install but nothing about how to track down the exact file path. Any help would be greatly appreciated.
Update
While I was able to find the JRE location, the root problem turns out to be eclipse. I forgot I had an older version (4.6) open since that is what the project was originally using. Once I switched over to 4.18 I was able to add the java 11 JRE.
Using which will give you /usr/bin/java which won't help as it will be a symlink. You need something like
readlink -f $(which java)
you can use the following:
update-alternatives --list java
will gives you something similar to the below:
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

Can't install Eclipse - "Failed to create the Java Virtual Machine" on Mac

I'm trying to install Eclipse, but I can't get the installer to start. It fails with
"Failed to create the Java Virtual Machine"
How can I resolve this?
Note: I'm on Mac.
Edit the file /Applications/Eclipse.app/Contents/Info.plist
There is a comment for use a particular JVM:
<key>Eclipse</key>
<array>
<!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options,
or add a VM found via $/usr/libexec/java_home -V -->
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk8u192-b12/Contents/Home/jre/</string>
<string>-keyring</string>
<string>~/.eclipse_keyring</string>
</array>
It took me some time to figure this out as well. The main takeaway was eclipse does not support SDK Version 14 (as of eclipse 2020-03). That was not completely obvious to me.
Install a supported version (I used Homebrew to install SDK V8 🍺):
brew cask install adoptopenjdk/openjdk/adoptopenjdk8
If this is the only Java Version you have installed you should be fine and Eclipse should open up. If that is not the case and you have another Java Version installed. You have to tell Eclipse which Version of Java it should be using (see Step 2).
Tell Eclipse which Version to use by editing the /Applications/Eclipse.app/Contents/Info.plist file as described by Juan Ignacio Barisich and Brad Parks. That being the version you installed in step 1.
nano /Applications/Eclipse.app/Contents/Info.plist
# or
open /Applications/Eclipse.app/Contents/Info.plist
<key>Eclipse</key>
<array>
<string>-keyring</string>
<string>~/.eclipse_keyring</string>
<string>-vm</string>
<string>/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/</string>
</array>
Disclaimer: Please bare in mind that those were the steps I took to get eclipse running again. Because I'm nowhere qualified to give a precise answer about this please take a look at the comments in case I got something wrong.
Edit: See Christian Fries answer who pointed out that all java versions 8 to 13 are supported by eclipse.
For me, I had to edit the eclipse-inst.ini file located here:
Eclipse Installer.app/Contents/Eclipse/eclipse-inst.ini
and add the path to my local java VM at the very top of the .ini file, which is here:
-vm
/Users/bparks/jdk/jdk1.8.0_162_x64/bin/java
If the Eclipse Installer.app file is in a DMG, right click on it, and copy it, then paste it into another folder. Then right click on that app file, and choose "Show Package Contents", to get into the files inside the application.
If you've already got Eclipse installed, and find it's throwing the same error, you could try a similar approach by editing the following file for Eclipse:
/Applications/Eclipse.app/Contents/Eclipse/eclipse.ini
On mac, you can get the full path you'd need to your java exe by running the following in a terminal, which will copy the path to your clipboard.
$ echo $(/usr/libexec/java_home)/bin/java | pbcopy
Note: The error "Failed to create the Java Virtual Machine" also exists with Eclipse 2020-03 (under some situations, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=561273) and it is not required to use Java 8 (with Eclipse 2020-03).
For the impatient:
You can run Eclipse or the Eclipse Installer with a given VM without changing eclipse.ini by starting it via a command line:
Open Terminal an run:
open PATHTOECLIPSEINSTALLER/Eclipse\ Installer.app --args -vm /Library/Java/JavaVirtualMachines/NAMEOFJDK/Contents/Home/bin
where PATHTOECLIPSEINSTALLER is the path of the folder where Eclipse Installer is located and NAMEOFJDK is the name of the folder with the JDK (11, 12, 13).
For example:
open Downloads/Eclipse\ Installer.app --args -vm /Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home/bin
In the installer you may select the VM used by Eclipse. Use a compatible VM here and the installer will modify the eclipse.ini for you.
Explanation TL;DR
To clarify this issue:
Eclipse - say Eclipse 2020-03 - runs with Java 11, Java 12, Java 13, but does not run with Java 14. It fails with the message "Failed to create the Java Virtual Machine". This happens for the installer and for Eclipse itself.
You can download Eclipse without the installer from here: https://www.eclipse.org/downloads/packages/
Explanation:
On macOS, if you start a freshly installed Eclipse, it will use the default JVM. The default JVM is obtained by running /usr/libexec/java_home.
This program /usr/libexec/java_home will find the installed JDK with the highest version as default. That is, if you have JDK 14 installed and run Eclipse 2020-03, you will see this error.
Solution
Summarising some other answers here, there are three options:
Once you have removed JDK 14 from /Library/Java/JavaVirtualMachines/ the error will be gone.
If you like to have JDK 14 installed, start the installer with a different JDK via the command line open Path-to-Eclipse-Installer/Eclipse\ Installer.app --args -vm /Library/Java/JavaVirtualMachines/NAMEOFJDK/Contents/Home/bin
You may edit the eclipse.ini (as suggested in other answers) to use a specific JVM.
Referring to Marseille Joseph
https://www.eclipse.org/forums/index.php?t=msg&th=1102885&goto=1823113&#msg_num_13
This worked for me!
Their solution didn't require uninstalling jdk14 or to editing the eclipse.ini file. Instead, do this:
cd /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/MacOS/
sudo rm /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/MacOS/libjli.dylib
sudo ln -s /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/lib/libjli.dylib libjli.dylib
I started facing the same problem in mac suddenly after updating to macOS Monterey, So I just did the following steps:
Then go to Contents/Eclipse/eclipse.ini file and open it with any text editor and you will see the following:
Add below line before -vmargs as shown in above image:
-vm /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/bin/java
This below line will be different for all the users:
/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/bin/java
and you can just get this line copied to your clipboard using this command in terminal:
$ echo $(/usr/libexec/java_home)/bin/java | pbcopy
Similarly will be for STS:
Then go to Contents/Eclipse/SpringToolSuite4.ini as shown below and open with any text editor app.
You will see the following:
Just add the same line that you added for Eclipse in the above steps:
delete all java folder inside /Library/Java
then install a new jdk from
https://adoptopenjdk.net/
which will install at
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk
then try reinstalling eclipse a
I had the same problem in my mac. Here is my solution.
First: I've uninstall all the versions of jdk, because I've try a lot of options.
To do this, you need to go to Library/Java/JavaVirtualMachines
and delete all the folders.
Second: Install jdk 1.8 here is a link to download this version:
jdk 1.8
Third: Install eclipse 2020-03 and thats all.
If you want to use JDK 14, you need to follow this steps:
Open eclipse
Go to Help > Install new software
In the Install window copy the following link in Work with https://download.eclipse.org/eclipse/updates/4.15-P-builds/
Select the third option show in the picture below
Then, click "next" and finish the install
Now you have to change the options, go to Preferences (command + ,) > Java > Compiler and search the version 14. Before this step you need to install jdk 14 (link) Perhaps eclipse would suggest you to change to the correct JREs, for this you need to go to Java > Installed JREs and add the correct version. When you click add you need to choose he JRE type, in my case I use a MacOS X VM and Standard VM, then you have to choose the directory (/Library/Java/JavaVirtualMachine/jdk-14/Contents/Home and click open you could give a JRE Name and finish eclipse will be restart and now you can use eclipse with java 14.
This works for me, I hope you have understood me.
Go to /Library/Java/JavaVirtualMachines
Delete all version except one in use.
Install jdk 8 from brew work for me. You can get the instruction on installing Jdk 8 from HomeBrew here How to install Java 8 on Mac
I met this problem with eclipse-java-2020-03-M2-macosx-cocoa-x86_64, and opendjdk11. The latest eclipse installer at the moment also complained same error.
After I switched back to openjdk8, everything goes well...
For Windows OS:
open eclipse.ini in the Eclipse program folder
add the below lines at the top of the file
-vm
path-to-java-bin\javaw.exe (for example: C:\Program Files\Java\jdk-11.0.10\bin\javaw.exe)
I mounted eclipse dmg file and copied eclipse inside Applications. Then I tried to modify file Info.plist located inside Contents as below, but was getting that this file Info.plist is readonly error. I noticed that I already have read and write permission but still it was giving me that read only error. Then I moved the contents of Eclipse to some other local folder and then edited Info.plist, it did not give me readonly error.
<array>
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java</string>
<string>-keyring</string>
<string>~/.eclipse_keyring</string>
</array>
Finally I am able to open eclipse.

Java swing on eclipse oxygen 4.7.3a?

I am trying to use windowbuilder on eclipse oxygen 4.7.3a on macOS highSierra. it installed fine but every time I try to open the design part it displays this error
Eclipse is running under 0, but this Java project has a 1.8 Java
compliance level, so WindowBuilder will not be able to load classes
from this project. Use a lower level of Java for the project, or run
Eclipse using a newer Java version.
I tried everything. like changing the running enviroment, .jre files, try different JDE. nothing working. any suggestions?
Your only short term solution is to use a Java version <= 9.
Initially WindowBuilder did not work with Java 9 for several reasons. See
Bug 526098 - WindowBuilder fails to work on Java 9.
One of those issues was that the the System Property java.version was unexpectedly just "9":
Please check that you have exactly 9.0 JDK, it worked for me with
9.0.1 until I downgraded target JRE to 9.0, which has unusual System.getProperty("java.version").equals("9")
The fixes to get WindowsBuilder working on Java 9 were only completed on 2/21/18, and based on your error it looks like a similar issue exists when running WindowsBuilder using Java 10. I suggest you create a Bug Report with Eclipse.
See also:
SO Post Eclipse Oxygen Window Builder Error with Java SE 10.0.1 where the solution/workaround was to regress to Java 9.
This Eclipse Forum post where a user is reporting a similar problem to yours.
Uninstall Java Version and Install lower version of Java(8).Support for WindowBuilder is not provided anymore.
How to uninstall current version?(Mac)
Go to /Library/Java/JavaVirtualMachines/ to see current version of java and replace jdk1.8.0_131.jdk with yours.
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk
sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -rf ~/Library/Application\ Support/Oracle/Java
Install Java 8:
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Then:
Right click on your project and go to Properties
Make sure your configuration look like this,
At the top of picture Configure Workspace settings click on it (Uncheck project specification settings) and then see image below
Apply same as in picture Then enable "project specification settings"
Restart Your Eclipse
Done!!

Font 'Arial' is not available to the JVM

I'm working on a Java project that uses Jasperreports. I worked several times in other projects using the same technology, and i had the same problem when trying to print a report in Unix environments.
My project uses:
JBoss 4.2.3.GA
Java 1.6
Jasperreports 4.7.0
The exception thrown is:
net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'Arial' is not available to the JVM. See the Javadoc for more details.
I found a common solution to solve this issue and ir really works:
sudo apt-get install msttcorefonts
However, I want to understand how Jasper works with fonts, and how it searches this fonts installed in Unix environments. Maybe a better question is: how JVM handles native fonts? Can anyone give me a detailed explanation on this subject? How are system fonts made available for the JVM in runtime?
Java asks the OS to provide the fonts. How that works depends on the OS.
http://en.wikipedia.org/wiki/Arial states its is installed on MS-Windows and MAC OSX
If you don't want to go through the hassle of downloading jars and what not, just go to software-center and click install Ubuntu restricted extras. This package will install not only MS Fonts but other supports for applications with restricted copyright.
This works for Ubuntu Systems.
I was also facing the same issue on Jasper 5.0. I have followed the steps below:
Place the jasper-fonts.jar;
Install the missing fonts in the linux;
Restart the JBoss server.
Update for year 2015:
Add this to (or uncomment in) /etc/apt/sources.list
deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
Then run this:
sudo apt-get update
sudo apt-get install msttcorefonts
for OpenSuse
validate the fonts is no aviable on SO
fc-list | grep "Arial"
install the followin rpm
sudo rpm -ivh msttcore-fonts-2.0-3.noarch.rpm
or Download from page:
http://www.mjmwired.net/resources/mjm-fedora-f11.html#ttf
Install the rpm
validate again
fc-list | grep "Arial"
Restart your aplication server
this save my day !
http://jasperstarter.cenote.de/usage.html#Reports_with_custom_fonts
Reports with custom fonts
Jaspersoft Studio has an option to create a jar file of your fonts. Just put this jar file into the jdbc folder of JasperStarter.

Fedora updates make Eclipse forget Java

(Not sure if this is an okay place to ask, but i'll try). After installing some updates in Fedora 16, Eclipse no longer knows how to use Java files. It can't make them, or compile them, or format the syntax. It's just eclipse without any Java whatsoever. I checked the yum.log and it installed about 6 eclipse updates and 2 java updates. A solution I found on the internet was to delete .eclipse and have eclipse regenerate it, but that didn't fix anything. Anyone know what's up?
The problem is documented here:
http://lists.fedoraproject.org/pipermail/devel/2012-January/161092.html
and this is the bug:
https://bugzilla.redhat.com/show_bug.cgi?id=760454
Basically, we were caught between a rock and a hard place and had to break a packaging loop so this broke people's existing installations. Move ~/.eclipse and restart Eclipse and you should be fine.
$ mv ~/.eclipse{,.bakBug760454}
I have faced a similar problem, it would be best in my opinion to remove every package for java and eclipse all together. You can find installed packages with:
sudo rpm -qa | grep keyword
where keyword would be for example 'jre', 'jdk' or 'eclipse'.
Once you find the packages you don't want, remove them with
sudo yum remove packagename
Then I would recommend you to skip default jdk available for linux and install the one provided from the Oracle website: http://www.oracle.com/technetwork/java/javase/downloads/index.html
I have installed version 6 myself as I had some maven problems (m2eclipse) with Java 7.
Download the rpm, install it and set you path to java in .bashrc file.
Check all your installed jre/jdk with
sudo alternatives --config java
or
sudo alternatives --config javac
and set the apropriate option if necessary.
Next, go to the eclipse website and download the latest stable release of eclipse and you should be fine. You can integrate it with the desktop as well so you won't have to start it from the command line every time.
Check all of the available eclipse* packages. "Eclipse" itself is just a plug-in platform with a lot of UI components, it's not a Java IDE unless you also install those plug-ins. It's possible that the packaging was changed in a way that the Java plug-ins were no longer included in the packages you have installed after the upgrade completed.

Categories

Resources