Help - Search - Members - Calendar
Full Version: Java program installation
MandrivaUsers.org > Advanced Topics > Command Line, Kernel and Programming
dnr01
Can someone give me the proper use of the command line to install java programs. I believe I have the latest jave as I recently downloaded and installed it from their website. This is what I get when I run java -version

openjdk version "1.7.0-internal"
OpenJDK Runtime Environment (build 1.7.0-internal-b24)
OpenJDK Client VM (build 1.7.0-b24, mixed mode)
[ml@localhost ~]$

Any help would be appreciated. I am running 2008.1.

Thanks


[moved from Installing Mandriva by spinynorman - welcome aboard smile.gif]
neddie
There isn't a single way to install a java program, and some you don't even have to "install" at all. Some you can just install like any other rpm from the "add software" tool in Mandriva.

Some java programs come with an installer, some don't. If you tell us which java program you'd like to install, we can try to help.

But it looks like you have a java runtime installed, so you can use that to run any java program you've downloaded. Usually this is done with the command
CODE
java ClassName
where "ClassName" is the name of the class you want to launch. Or if the program is packed in a jar file, you can do
CODE
java -jar myjavaprogram.jar

But usually any program you install via rpm will have a shell script or something to launch it, just look at each program's instructions.
dexter11
The latest stable java is Java 1.6 update 7 AFAIK. What you downloaded must be a developer version.
theYinYeti
I don't know what this OpenJDK is, but were I you, I'd use either Sun JDK 1.6 or "IcedTea" 1.7.

Yves.
Reiver_Fluffi
QUOTE (theYinYeti @ Jul 21 2008, 11:17 AM) *
I don't know what this OpenJDK is, but were I you, I'd use either Sun JDK 1.6 or "IcedTea" 1.7.

Yves.


IIRC in some distro's OpenJDK is IcedTea
scarecrow
QUOTE (Reiver_Fluffi @ Jul 21 2008, 01:44 PM) *
IIRC in some distro's OpenJDK is IcedTea

I think he is using Sun's odd quasi-open (and half baked) java implementation:
http://openjdk.java.net/
AFAIK it still has issues, I'd rather use the non-gpl (but still free) Java 1.6 update 7.
Anyway: How do you try to run your jars? The proper usage is like
CODE
java -jar foo.jar

(replace foo with the actual applet name).
dexter11
IDÉZET(theYinYeti @ Jul 21 2008, 12:17 PM) *
I don't know what this OpenJDK is, but were I you, I'd use either Sun JDK 1.6 or "IcedTea" 1.7.

Yves.

In Nov 2006 Sun opensourced the parts of Java which was in its property that's OpenJDK. After this the Java community started to rewrite the missing parts. A year ago Sun and RedHat created the IcedTea project which was aimed to create a GPLv2 only OpenJDK which passes the TCK test created by Sun.
RedHat announced on the last RedHat summit conference that it happened. So from now on Java = OpenJDK.
Meanwhile work hasn't stopped. IcedTea7 is on the way which will be the same as OpenJDK7 on the source level.

This means to me that OpenJDK = stable version and IcedTea = development version.
farquar
Type java to get the options for running java programs.

Greg2
This is just to clarify that the OP is using IcedTea:
CODE
[greg@apus ~]$ rpm -qa |grep java
timezone-java-2008c-1.5mdv2008.1
java-1.7.0-icedtea-1.7.0.0-24.614.2mdv2008.1
openoffice.org-java-common-2.4.0.4-2mdv2008.1
java-1.7.0-icedtea-plugin-1.7.0.0-24.614.2mdv2008.1
java-access-bridge-1.22.0-0.0.1mdv2008.1
[greg@apus ~]$ java -version
openjdk version "1.7.0-internal"
OpenJDK Runtime Environment (build 1.7.0-internal-b24)
OpenJDK Client VM (build 1.7.0-b24, mixed mode)
dnr01
Thanks for all your help guys.[size
pmpatrick
Also be aware that some java apps will not run with the open source version of java installed by default in mandriva. See:

http://mandrivausers.org/index.php?showtopic=55924&hl=

especially ianw's post re setting the default version of java to use when you have both the open source and sun versions installed.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.