Why can't I install Eclipse? - java

I am trying to install Eclipse.
> desktop-file-install eclipse.desktop
> Error on file "eclipse.desktop": Key file does not start with a group
>Name=Eclipse
>Type=Application
>Exec=/opt/eclipse/eclipse
>Terminal=false
>Icon=/opt/eclipse/icon.xpm
>Comment=Integrated Development Environment
>NoDisplay=false
>Categories=Development;IDE;
>Name[en]=Eclipse
What is wrong?
My Ubuntu version is 10.04 but I do not know if that plays any role here.

You need to add
[Desktop Entry]
to the top of your file--it's the group name that command is looking for.
See here for more information about desktop entries.

In order to install Eclipse you only need to have a working JDK installation and the unzip the eclipse bundle and finally execute eclipse.
To install OpenJDK from ubuntu repositories you can do this.
sudo apt-get install openjdk-6-jdk
OpenJDK7 does not seem to be in 10.04 repositories.
You can always install Oracle JDK manually but perhaps you should think about upgrading you ubuntu installation to the latest LTS release.

Try This option.
change permission for eclipse dir sudo chmode -R 755 -R /opt/eclipse.
Java Home
open gedit /home/[user]/.bashrc
Add that two line at the end .
export JAVA_HOME=/path/to/jdk1.(xx version)
export PATH=$PATH:$JAVA_HOME:$JAVA_HOME/bin
Update
As mentioned by #Allison
You need to add [Desktop Entry]

Related

Error: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-8-oracle/jre/bin/java when i run gradle command in terminal

I am working in Ubuntu 16.04. I need to install gradle and the gradle is installed when i checked with sudo apt list --installed command but when i use gradle -version command it shows the following error,
JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-8-oracle/jre/bin/java
In sudo vim /etc/environment file,
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"
http_proxy="http://username:password#IP:port no/"
https_proxy="https://IP:port no/"
ftp_proxy="ftp://IP:port no/"
I don't know where i made mistakes. Please help me.
Thanks.
On a 64bit openSuse 64 42.1 box;
readlink -f $(which java)
provided;
/usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/jre/bin/java
But;
export JAVA_HOME=/usr/lib64/jvm/jre-1.8.0-openjdk
is the path that worked and allowed java emulator to run.
So i think we have to manually browse our file system and see what path to choose.
Today I faced this problem. I am using the default java that comes with your linux distro (so in my case, linux mint).
$ whereis java
This command gave me
java: /usr/bin/java /usr/share/java
So, I opened /user/bin. There was a link to Java. I right clicked it and selected follow original link. This lead me to /usr/lib/jvm/java-11-openjdk-amd64/bin/java.
So now that I know where this java is, I opened my .bashrc file, and edited the JAVA_HOME.
So for my case,
## My Custom variables
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH
This solved the problem.
Now if you are using some other java (say you downloaded from oracle and extracted the zip file ...), then you have to add that location. So for example, if your java is in /home/user/.sdkman/candidates/java/current, then
export JAVA_HOME=/home/user/.sdkman/candidates/java/current
export PATH=$JAVA_HOME/bin:$PATH
I see a mismatch. In your enviornment file the JAVA_HOME is set to "/usr/lib/jvm/java-8-openjdk-amd64/" and your mentioned that the error that you got relates to the JAVA_HOME as "/usr/lib/jvm/java-8-oracle/jre/bin/java"
If you JAVA is really installed in /usr/lib/jvm/java-8-oracle directory, then you need to ensure that the JAVA_HOME is set to that directory. And also your PATH reflects $JAVA_HOME/bin in it.
I typically install Oracle JDK/JRE separately in a separate directory such as /usr/local/jdk1.8.0 etc.
check the jvm installtion folder from Files
eg : /usr/lib/jvm/java-12-oracle
then in terminal run sudo nano /etc/environment and add the line
JAVA_HOME="/usr/lib/jvm/java-12-oracle"
Then open terminal and run
export JAVA_HOME="/usr/lib/jvm/java-12-oracle"

install Java on ubuntu 15.10

I'm installing Java on Ubuntu 15.10
when I typed sudo add-apt-repository ppa:webupd8team/java
The result
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 95, in <module>
sp = SoftwareProperties(options=options)
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
self.reload_sourceslist()
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
self.distro.get_sources(self.sourceslist)
File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources
(self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Ubuntu/xenial
How to fix it? thank you
Just use sudo apt-get install openjdk-8-jdk if OpenJDK also meets your needs (and most probably it will if you aks about "installing Java")
For OpenJDK 8, you should then be able to find your Java executable in /usr/lib/jvm/java-8-openjdk-amd64/bin/java
Why You Going Trough The Hard Way ? .
Just Open Ubuntu Software Center And Search For JDK And Click On Install Button . So Easy
check your sources.list file in /etc/apt/sources.list and make sure the file is not changed or broken .
It looks like that PPA doesn't have anything for Ubuntu 15.10.
I use java-package to convert the tarball from Oracle to a .deb package.
PS. this question is better suited for askubuntu
Well, you need to check if you are behind a proxy??
So you need to set the https_proxy environmental variable to your custom setting, for example:
export https_proxy=http://myproxy.domain.net:8080/
after that, you can run the commnad "sudo add-apt-repository ppa:webupd8team/java"
I don't know why the add-apt-repository doesn't use the proxy settings for apt.
Open Applicaction -> Accessories -> Terminal
Type in the command line as below:
sudo apt-get install openjdk-8-jdk
Type in the command line as below:
apt-cache search jdk
(Note: openjdk-8-jdk is symbolically used here. You can choose the JDK version as per your requirement.)
For "JAVA_HOME" (Environment Variable) type command as shown below, in "Terminal" using your installation path:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
(Note: "/usr/lib/jvm/java-8-openjdk" is symbolically used here just for demostration. You should use your path as per your installation.)
For "PATH" (Environment Variable) type command as shown below, in "Terminal" using your installation path:
export PATH=$PATH:/usr/lib/jvm/java-8-openjdk/bin
(Note: "/usr/lib/jvm/java-8-openjdk" is symbolically used here just for demonstration. You should use your path as per your installation.)
Check for "open jdk" installation, just type command in "Terminal" as shown below:
javac -version

How to install Netbeans IDE in linuxmint?

I am new to Linux.I dont know how to install Netbeans IDE in LInuxmint.
Please write your answers in steps.
Go to NetBeans website and download install script. Web app will determine what you are running, you need to pick which bundle you want. When you finish download do
$ chmod a+x jdk-8uXY-nb-8_0_2-linux-x64.sh
and execute it. It will install everything for you. XY is current version of JDK.
Follow these steps in terminal,first install jdk and then install these things
1)chmod +x ~/Downloads/jdk-8-nb-8-linux-*.sh
2)cd ~/Downloads && ./netbeans-8.0.2-linux.sh

How do I install the Rappture Java bindings on a HUB built from the Open Source recipe?

I have followed the instructions for installing a HUB using the Debian package approach. I’ve installed Java on the VM and have it running in a workspace. Now I would like to install the Java bindings for Rappture. Is there a recipe?
used new version of rappture with java bindings. I’ve tested the following installation steps and it should go well.
First, change the /etc/apt/sources.list file. Find the lines pointing to our repository at packages.hubzero.org and change the ‘lenny’ to ‘buck’. ‘buck’ is our testing repository. Don’t change any of the lines for the standard debian repositories.
Next run: apt-get update
Now remove the old version by running: dpkg —purge hubzero-rappture then run: ls -la /apps/rappture You will still see a dated directory for previous version of rappture but it won’t do any harm if you leave it. If there are any links left in that directory then remove those since they’ll cause the new install to fail.
Lastly, run the command: apt-get install hubzero-rappture and your new version should be installed.
To test the new rappture, start a workspace and copy the directory /apps/rappture/examples into your own local directory. Then cd into that the local copy of the directory and run the command: ./demo.bash fermi This will run several version of the fermi demo one of which will be a java version.

Not finding opencv jar after installing with homebrew

After installing opencv 2.4.8.2 with homebrew, I can't seem to find the jar file in /usr/local/Cellar/opencv/2.4.8.2/share/OpenCV
I'm using Mavericks, any ideas?
Probably you forgot to specify --with-java parameter
brew tap homebrew/science
brew install opencv --with-java
After compiling a jar file is in the path
/usr/local/Cellar/opencv/2.4.9/share/OpenCV/java/opencv-249.jar
I solved the question by installing ant (and the other dependencies of opencv) using homebrew and then using cmake to install opencv instead of homebrew. I downloaded opencv from the website then used the following commands:
cd opencv-2.4.8/
mkdir build
cd build/
cmake -DBUILD_SHARED_LIBS=OFF ..
cmake -G "Unix Makefiles" ..
make -j8
The jar will pop out in the following directory:
opencv-2.4.8/build/bin/opencv-248.jar
I had this issue and tried with the --with-java option and it didn't work.
I had to edit the formula (brew edit opencv3) and insert this options myself:
option "with-contrib", "With contrib"
option "with-java", "With java"
Just above the dependency declarations.
You will also have to ensure that -DBUILD_opencv_java=ON is in your args. Note that the value is set to ON not OFF
After you've done this. Uninstall opencv then install it again.
The error could just be because -DBUILD_opencv_java is not enabled. Enable it using brew edit opencv3

Categories

Resources