File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes hard problem: uninstall java 1.4.2.03 in redhat 9 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "hard problem: uninstall java 1.4.2.03 in redhat 9" Watch "hard problem: uninstall java 1.4.2.03 in redhat 9" New topic
Author

hard problem: uninstall java 1.4.2.03 in redhat 9

may Lee
Ranch Hand

Joined: Nov 20, 2003
Posts: 68
I first use j2sdk-1_4_2_03-linux.rpm to install Java 1.4.2.03 on redhat 9. After I want to remove java 1.4 and install Java 1.2, but I accidently remove the folder /usr/java/j2sdk1.4.2/ from my redhat 9 box, so now when I use
rpm -e j2sdk-1.4.2.03-fcs, I cannot remove j2sdk1.4.2.03,
also I cannot reinstall
rpm -iv j2sdk-1_4_2_03-linux.rpm.
how can I remove j2sdk-1.4.2.03-fcs and reinstall j2sdk-1_4_2_03-linux.rpm.
Thanks for any suggestion.
George Brown
Ranch Hand

Joined: Sep 26, 2000
Posts: 919
If you still have the original .rpm files for the version that includes the files that you accidentally deleted, try re-installing them, and include the '--force' option when you do.
The '--force' option, as it says in RH9's man pages for rpm, is the same as using '--replacepkgs' and '--replacefiles' so it should let you re-install what you've deleted.
Once you've re-installed the missing files your system should be in the state it was before the accidental delete, so you should be able to '--erase' them then in whatever order you need to.
HTH.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16134
    
  21

The JDK RPM doesn't do anything fancy. All it does is unpack everything into the /usr/java directory, so it's no major disaster if you deleted that directory. All that's left is to delete the RPM from the RPM database. I think a simple rpm --erase for that package is sufficient (to get the exact RPM name, "rpm -qa | grep -i j2" should do it).
The safest way to RE-install is probably to do an erase followed by an install, though a forced refresh should give the same ersults.


Customer surveys are for companies who didn't pay proper attention to begin with.
may Lee
Ranch Hand

Joined: Nov 20, 2003
Posts: 68
I try both methods:
rpm --erease j2sdk-1_4_2_03.fcs: get error as followings
touch: 'creating /use/jave/j2sdk../lib/tool.pack', no such files or error
... Maybe I don't write the command correctly?
rpm -iv --force j2sdk-1_4_2_03-linux.rpm: is working. Finally I use this one.

Another question: For Java 1.2.2, after I install it, I saw /usr/java/jdk1.2.2/jre, but where is the java plug in of java 1.2.2? I want to link it for Mozilla. But I don't find something similar to /usr/java/j2sdk../jre/plugin/i386/ns610/libjavaplugin_oji.so
Please advise me.
Otherwise, if java1.2.2 doesn't have, I will use the java lug in from java1.4.2.
Thanks for both of you.
may Lee
Ranch Hand

Joined: Nov 20, 2003
Posts: 68
Strange thing, I after I reinstall with
rpm -iv --force j2...rpm first, then use rpm -e j2sd..-fcs
then I still found j2sdk..-fcs by using rpm -qa|grep j2,
In the system log, it is shown as j2sdk..-fcs.i586.rpm
I try rpm --rebiulddb, the error is device is busy.
Why? I cannot remove j2sdk..-fcs?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hard problem: uninstall java 1.4.2.03 in redhat 9