Install Java on OpenSUSE 12.1

Hello guys,

am just a linux newbie,
Just want to ask about how to install java on OpenSUSE 12.1

am switching from windows to linux, so am not that in to linux yet

any help is much appreciated

Thanks a lot guys

Long Live Linux!!!

Do you mean other than the Java installed by default?

  • Jomar808,

there are Java packages available through the normal software repositories. If the packages you need aren’t on the install media, just go to http://software.opensuse.org/

HTH
Uwe

On 01/30/2012 07:56 PM, Jomar808 wrote:
>
> Just want to ask about how to install java on OpenSUSE 12.1

unless you figured out how to not install Java, there is an open
implementation already installed…the package is openJDK (Java
Development Kit) and it includes (i think) a browser plugin…should
‘just work’ but in reality there are so many different implementations
of ‘Java’ that a (say) bank online program written with the MS Java
devel kit might puke if you try to run it in the openJDK…

what is it you are having trouble with?

it is too often necessary to install the ‘real’ Java (aka: SUN java,
which is kinda easy to install–remove openJDK first)


DD http://tinyurl.com/DD-Caveat
Read what Distro Watch writes: http://tinyurl.com/SUSEonDW

Thanks for the reply guys, where do I check if I have java already installed?
am planning java development on OpenSUSE

they say an open source implementation of java exist, aside from the oracle one?

Thanks a lot masters :slight_smile:

On 01/30/2012 09:16 PM, Jomar808 wrote:
> Thanks for the reply guys, where do I check if I have java already
> installed?

several ways:

1.open a terminal and type/enter


java -version

mine shows:


denverd@linux-os114:~> java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) Client VM (build 20.4-b02, mixed mode)

i’m guessing yours will be the default openJDK…

  1. open YaST Software Management, in the search block type ‘java’ and
    press the “Search” button, then on the right side look and see what you
    have installed (white check mark, black background)…when done looking,
    press the “Cancel” button

there are probably others, but two should do for now…


DD
Read what Distro Watch writes: http://tinyurl.com/SUSEonDW

Am 30.01.2012 21:16, schrieb Jomar808:
>
> Thanks for the reply guys, where do I check if I have java already
> installed?
Open a terminal and type


java -version

you should see something like


java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.4) (suse-0.3.2-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

> am planning java development on OpenSUSE
For that you need also the package java-1_6_0-openjdk-devel you can
install it with yast
>
> they say an open source implementation of java exist, aside from the
> oracle one?
>
That is OpenJDK which is used on openSUSE by default.


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

If you also want the Oracle (sun java) java then there are some great instructions set up Sun Java on Opensuse 12.1.

You can have multiple versions of Java installed, but the one being actively used will be reported via:

java -version

To change versions (as sudo):

update-alternatives --config java

Will give you a list of numbered options to toggle the default java in use by the system.

yup

got java installed

java -version

output:
java version “1.6.0.22”
OpenJDK Runtime Environment (IcedTea6 1.10.4) (suse-1.2-1386)
OpenJDK Server VM (build 20.0-bll, mixed mode)

also I’ve installed java-1_6_0-openjdk-devel and after that, javac is available
I guess java-1_6_0-openjdk-devel is for the compiler?

also what could be a great IDE for java on linux? any suggestions?

also I really want to thank you guys for the warm welcome, this is the first time I got here, and I can’t believe I got answers automatically, this community is **** active!

Thank You so much guys!!!

Long Live Linux!!!

Am 30.01.2012 22:36, schrieb Jomar808:
> I guess java-1_6_0-openjdk-devel is for the compiler?
Yes
>
> also what could be a great IDE for java on linux? any suggestions?
>
Eclipse, I always download it directly from eclipse.org (you just need
to unpack it where you want). Other people use for example Netbeans.


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

used this code

zypper se eclipse

this is displayed

eclipse
eclipse-archdep-platform
eclipse-jdt
eclipse-pde
eclipse-platform
eclipse-source
eclipse-swt

where is the one should I install?

should I do just

zypper in eclipse

many thanks

Thanks a lot masters for the help

Which one is better? OpenJDK or Oracle (Sun) Java?

pros, cons

as per saultdon, I can have both

how can I switch between the 2?

appreciate the help guys!!! :slight_smile:

Am 30.01.2012 23:46, schrieb Jomar808:
>
> Thanks a lot masters for the help
>
> Which one is better? OpenJDK or Oracle (Sun) Java?
>
None, both are implementations of the same language, one free open
source sponsored by oracle, the other proprietary directly produced by
oracle.
You will not notice a difference when you do your own programming.
With the version 7 the openjdk implementation is the official one
http://blogs.oracle.com/henrik/entry/moving_to_openjdk_as_the

> pros, cons
not easy to answer for me, since java is a relatively new language for
me (I use it only a bit less than ten years now in my job, compared to
almost twenty years of C++), so I do not feel expert enough to judge that.


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

can I have both OpenJDK and Oracle (Sun) Java?

how to set up both?

appreciate any help guys :slight_smile:

Am 31.01.2012 02:36, schrieb Jomar808:
>
> can I have both OpenJDK and Oracle (Sun) Java?
>
Yes
> how to set up both?
>
There is a thread which describes it here
http://tinyurl.com/7eopm8s


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram