 |
 |
 |
 |
| Installation and Live Media Help with Installation & Live Media (Live CD, USB, DVD) problems. |

14th June 2012, 12:28 PM
|
|
Registered User
|
|
Join Date: Jun 2011
Location: GA
Posts: 22

|
|
|
Sun JDK Install Quesiton
Hi, all.
I have a program that requires Sun's Java (JDK) - it explicitly states that it's not fully compatible with OpenJDK. I found several posts on how to install Sun's JDK.
My question is this... do I need to uninstall the Fedora default OpenJDK? I'm currently running Fedora 17, 32-bit.
---------- Post added 14th June 2012 at 07:28 AM ---------- Previous post was 13th June 2012 at 11:34 PM ----------
Answer: Yes you can have multiple java versions installed.
Great guide here:
http://www.if-not-true-then-false.co...-red-hat-rhel/
|

28th January 2013, 05:33 PM
|
|
Registered User
|
|
Join Date: May 2008
Location: Mexico City
Age: 49
Posts: 43

|
|
|
Re: Sun JDK Install Quesiton
Quote:
Originally Posted by R0b0ty
Hi, all.
I have a program that requires Sun's Java (JDK) - it explicitly states that it's not fully compatible with OpenJDK. I found several posts on how to install Sun's JDK.
My question is this... do I need to uninstall the Fedora default OpenJDK? I'm currently running Fedora 17, 32-bit.
---------- Post added 14th June 2012 at 07:28 AM ---------- Previous post was 13th June 2012 at 11:34 PM ----------
Answer: Yes you can have multiple java versions installed.
Great guide here:
http://www.if-not-true-then-false.co...-red-hat-rhel/
|
I have tried to install with the command:
rpm -ivh jdk-7u11-linux-x64.rpm
Preparando... ################################# [100%]
Actualizando / instalando...
1:jdk-2000:1.7.0_11-fcs ################################# [100%]
Unpacking JAR files...
rt.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_11/jre/lib/rt.pack
jsse.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_11/jre/lib/jsse.pack
charsets.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_11/jre/lib/charsets.pack
tools.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_11/lib/tools.pack
localedata.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_11/jre/lib/ext/localedata.pack
What's next?
|

28th January 2013, 06:13 PM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,126

|
|
|
Re: Sun JDK Install Quesiton
Quote:
Unpacking JAR files...
rt.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_11/jre/lib/rt.pack
jsse.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_11/jre/lib/jsse.pack
charsets.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_11/jre/lib/charsets.pack
tools.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_11/lib/tools.pack
localedata.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_11/jre/lib/ext/localedata.pack
|
This is normal output from the Sun/Oracle JRE/JDK rpm install. You can safely ignore those "Error:" lines.
What does "java -version" report now?
If it's still reporting the openJDK java, you'll need to run the "alternatives --config java" command to make the Sun/Oracle java your default. You might want to run "alternatives --display java" first, to insure the Sun/Oracle java got installed into alternatives.
---------- Post added at 01:13 PM ---------- Previous post was at 01:01 PM ----------
This guide should work for the JDK package as well as the JRE package, just the rpm package names are different.
|

30th January 2013, 01:28 AM
|
|
Registered User
|
|
Join Date: May 2008
Location: Mexico City
Age: 49
Posts: 43

|
|
|
Re: Sun JDK Install Quesiton
I have done all this, and still having a message indicating
"No existe una aplicación instalada para los archivos «ejecutable».
¿Quiere buscar una aplicación para abrir este archivo?"
"There is no apprilcation installed for the file..."
or something like that
I have included some outputs to make it more informative, sorry for the extension.
Code:
root@localhost Linux]# rpm -ivh jdk-7u11-linux-x64.rpm
Preparando... ################################# [100%]
Actualizando / instalando...
1:jdk-2000:1.7.0_11-fcs ################################# [100%]
Unpacking JAR files...
root@localhost Linux]# alternatives --display java
java - el estado es manual.
el enlace apunta actualmente a /usr/java/latest/jre/bin/java
/usr/java/latest/jre/bin/java - prioridad 20000
esclavo keytool: (null)
esclavo orbd: (null)
esclavo pack200: (null)
...
La 'mejor' versión actual es /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java.
[root@localhost Linux]# alternatives --config java
Hay 3 programas que proporcionan 'java'.
Selección Comando
-----------------------------------------------
+ 1 /usr/java/latest/jre/bin/java
* 2 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
3 /usr/lib/jvm/jre-1.5.0-gcj/bin/java
[root@localhost Linux]# alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 20000
[root@localhost Linux]# alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 20000
[root@localhost Linux]# alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/latest/jre/lib/amd64/libnpjp2.so 20000
[root@localhost Linux]# alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000
[root@localhost Linux]# alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 20000
[root@localhost Linux]# alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_11/jre/bin/java 20000
[root@localhost Linux]# alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.7.0_11/jre/bin/javaws 20000
[root@localhost Linux]# alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/jdk1.7.0_11/jre/lib/amd64/libnpjp2.so 20000
[root@localhost Linux]# alternatives --install /usr/bin/javac javac /usr/java/jdk1.7.0_11/bin/javac 20000
[root@localhost Linux]# alternatives --install /usr/bin/jar jar /usr/java/jdk1.7.0_11/bin/jar 20000
[root@localhost Linux]# alternatives --config java
Hay 4 programas que proporcionan 'java'.
Selección Comando
-----------------------------------------------
+ 1 /usr/java/latest/jre/bin/java
* 2 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
3 /usr/lib/jvm/jre-1.5.0-gcj/bin/java
4 /usr/java/jdk1.7.0_11/jre/bin/java
Presione Intro para mantener la selección actual[+], o escriba el número de la selección: 4
[root@localhost Linux]# java -version
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
[root@localhost Linux]# javaws
Java(TM) Web Start 10.11.2.21-fcs
...
[root@localhost Linux]# javac -version
javac 1.7.0_11
[root@localhost Linux]# alternatives --config javaws
Hay 2 programas que proporcionan 'javaws'.
Selección Comando
-----------------------------------------------
*+ 1 /usr/java/latest/jre/bin/javaws
2 /usr/java/jdk1.7.0_11/jre/bin/javaws
Presione Intro para mantener la selección actual[+], o escriba el número de la selección:
[root@localhost Linux]# alternatives --config javac
Hay 2 programas que proporcionan 'javac'.
Selección Comando
-----------------------------------------------
*+ 1 /usr/java/latest/bin/javac
2 /usr/java/jdk1.7.0_11/bin/javac
[root@localhost Linux]# export JAVA_HOME="/usr/java/jdk1.7.0_11"
Is there something lacking?
|

30th January 2013, 04:04 AM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,126

|
|
|
Re: Sun JDK Install Quesiton
It appears you have everything setup OK. You would need to add the line export JAVA_HOME="/usr/java/jdk1.7.0_11" to your user ~/.bashrc and/or /root/.bashrc file to make it persistent.
You may need to disable the icedtea-web browser plugin in your browser so it doesn't conflict with the libnpjp2.so plugin. You could also just "yum erase icedtea-web" assuming you have it installed.
|

30th January 2013, 09:20 AM
|
|
Registered User
|
|
Join Date: May 2008
Location: Mexico City
Age: 49
Posts: 43

|
|
|
Re: Sun JDK Install Quesiton
Quote:
Originally Posted by PabloTwo
It appears you have everything setup OK. You would need to add the line export JAVA_HOME="/usr/java/jdk1.7.0_11" to your user ~/.bashrc and/or /root/.bashrc file to make it persistent.
You may need to disable the icedtea-web browser plugin in your browser so it doesn't conflict with the libnpjp2.so plugin. You could also just "yum erase icedtea-web" assuming you have it installed.
|
Thanks Pablo, how do I export this value to the mentioned files?
can I copy and paste into the files?
I which section?
I am trying to start XMind: a Java application based on Eclipse
Last edited by obsidiana; 30th January 2013 at 10:27 AM.
Reason: adding information
|

14th February 2013, 08:03 PM
|
|
Registered User
|
|
Join Date: May 2008
Location: Mexico City
Age: 49
Posts: 43

|
|
|
Re: Sun JDK Install Quesiton
I still don't have it working
__________________
Thanks in advance for your valuable help
Best regards: Marco A. Rios - Mexico City
Acer ASPIRE 2920 | Intel® Core™2 Duo CPU T7300 @ 2.00GHz × 2 (64-bit) | Graphics: Intel® 965GM | RAM=2GB
|

25th March 2013, 07:28 PM
|
|
Registered User
|
|
Join Date: May 2008
Location: Mexico City
Age: 49
Posts: 43

|
|
|
Re: Sun JDK Install Quesiton
Please, I still have not working Java in my system, there are a lot of very important things I cannot do, can someone help me?
"Java" doesn't appear as an "application to open" the programs I need, for example XMind and ArgoUML.
__________________
Thanks in advance for your valuable help
Best regards: Marco A. Rios - Mexico City
Acer ASPIRE 2920 | Intel® Core™2 Duo CPU T7300 @ 2.00GHz × 2 (64-bit) | Graphics: Intel® 965GM | RAM=2GB
Last edited by obsidiana; 25th March 2013 at 08:46 PM.
|

25th March 2013, 07:31 PM
|
 |
Formerly known as"professorrmd"
|
|
Join Date: Mar 2011
Posts: 2,627

|
|
|
Re: Sun JDK Install Quesiton
Did you try using openJDK and see if your programs work?
This is the package name - java-1.7.0-openjdk.x86_64.
__________________
Fedora 18 x86_64 XFCE - Thinkpad T520 | Intel Core i7 - 2630 QM | NVIDIA NVS 4200m | 16 GB RAM | 500 GB HDD |
Fedora 19 x86_64 XFCE - Thinkpad T500 | Intel Core2Duo P8800 | 6 GB RAM | 500 GB HDD |
The Linux Documentation Project
|

25th March 2013, 07:38 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 4,979

|
|
|
Re: Sun JDK Install Quesiton
Rather than the ifnot true line, try the mjmwired guide (linked at the top of the page among the setup guides. )
http://www.mjmwired.net/resources/mj...-f18.html#java
That has always worked for me
|

25th March 2013, 07:42 PM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,126

|
|
|
Re: Sun JDK Install Quesiton
Although this guide is for installing Oracle's jre in F17, it can be adapted to install the jdk package. Perhaps it can help you.
|

25th March 2013, 09:06 PM
|
 |
Registered User
|
|
Join Date: May 2006
Location: Caracas, Venezuela
Posts: 1,828

|
|
|
Re: Sun JDK Install Quesiton
Obsidiana:
All apear to be good.
Get a console or terminal and go to directory wher .jar file is:
example:
cd /home/obsidiana/whatever
Then type:
java -jar whateverfile.jar
Tell us if it works
If you want to see what java are you using try:
java --version
HTH
__________________
Pietro Pesci Feltri
PowerBook 15" G4 and
MacBook Pro 17" Intel Core 2 Duo
Intel I5 Desktop
|

26th March 2013, 06:31 AM
|
|
Registered User
|
|
Join Date: May 2008
Location: Mexico City
Age: 49
Posts: 43

|
|
|
Re: Sun JDK Install Quesiton
Thanks to you, all,
I have no "jar" file, the file used to startup the application is named "XMind" with no extension
when I try to open file, it appears an error message indicating it doesn't exist an installed application for the file(s) "executable"
---------- Post added at 03:16 PM ---------- Previous post was at 03:04 PM ----------
I have Eclipse running and the following java program is selected:
/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
(obtained with the
alternatives --config java
command
whenever I select another program, "Eclipse fails to start
---------- Post added at 11:31 PM ---------- Previous post was at 03:16 PM ----------
Quote:
Originally Posted by smr54
|
Thanks,
I have followed the tutorial, and now I have installed the newest java runtime, I have selected it (option 5)
But still, my Fedore doesn't recognize Java programs.
I even don't see an option in Nautilus to associate Java with the file
__________________
Thanks in advance for your valuable help
Best regards: Marco A. Rios - Mexico City
Acer ASPIRE 2920 | Intel® Core™2 Duo CPU T7300 @ 2.00GHz × 2 (64-bit) | Graphics: Intel® 965GM | RAM=2GB
|

26th March 2013, 08:01 AM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449

|
|
|
Re: Sun JDK Install Quesiton
You can click on a jar file in your file manager, then from its menu, there should be a "Open With..." entry. Select that and type into the form "java -jar" and it will associate *.jar files with "java -jar" . From that point clicking on a jar file, for example "xyz.jar" will run:
I got that to work in KDE with Dolphin File manager. But one problem with that is that it won't pass any special arguments to the main class. Usually java apps use a front end script (named "runprogram" in my example below) to give you a place to add and edit the arguments, then it runs something like:
Quote:
#!/bin/sh
# runprogram
# DEBUG=0
DEBUG=1
JAVA="${JAVA_HOME}/bin/java"
exec "${JAVA}" -jar program.jar "${DEBUG}" "$@"
|
by running "runprogram argument1 argument2"
So just clicking on "program.jar" in the file manager would not have a way to correctly pass the option "DEBUG" nor the arguments lined up in "$@" which here would be "argument1 argument2". But sometimes all you need is: java -jar filename.jar so that would be fine
Last edited by marko; 26th March 2013 at 09:03 AM.
|

26th March 2013, 08:34 AM
|
|
Registered User
|
|
Join Date: Oct 2010
Location: Canberra
Posts: 551

|
|
|
Re: Sun JDK Install Quesiton
Probably the XMind object is a shell script that sets up and runs the java stuff.
If you can run:
in the directory containing it and post the results here we might be better able to assist.
__________________
Don't tell me "The sky is the limit" when there are footprints on the moon.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 07:40 (Friday, 24-05-2013)
|
|
 |
 |
 |
 |
|
|