1

I've made a mistake by:

"sudo rm -rf /usr/share/java"

Now, every check version by

"java -version"

the output messages is:

"Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar

Error opening zip file or JAR manifest missing : /usr/share/java/jayatanaag.jar

Error occurred during initialization of VM agent library failed to init: instrument"

My question:

How can I solve it for check java -version?

Update (1): by apply "sudo apt-get install --reinstall oracle-java6-installer", the output:

:~$ sudo apt-get install --reinstall oracle-java6-installer

[sudo] password for evergreen:

Reading package lists... Done Building dependency tree
Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded. Need to get 0 B/21.0 kB of archives. After this operation, 0 B of additional disk space will be used. Preconfiguring packages ... (Reading database ... 256954 files and directories currently installed.)

Preparing to unpack .../oracle-java6-installer_6u45-0~webupd8~8_all.deb ... oracle-license-v1-1 license has already been accepted Unpacking oracle-java6-installer (6u45-0~webupd8~8) over (6u45-0~webupd8~8) ... Processing triggers for gnome-menus (3.10.1-0ubuntu5) ... Processing triggers for desktop-file-utils (0.22-1ubuntu3) ... Processing triggers for bamfdaemon (0.5.1+15.04.20150202-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for mime-support (3.58ubuntu1) ... Processing triggers for shared-mime-info (1.3-1) ... Unknown media type in type 'all/all' Unknown media type in type 'all/allfiles' Setting up oracle-java6-installer (6u45-0~webupd8~8) ... Installing from local file /var/cache/oracle-jdk6-installer/jdk-6u45-linux-x64.bin Removing outdated cached downloads... Unpacking... Checksumming... Extracting... UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu). creating: jdk1.6.0_45/ creating: jdk1.6.0_45/db/ creating: jdk1.6.0_45/db/bin/ inflating: jdk1.6.0_45/db/bin/ij
.....................................................................................................................................................
Creating jdk1.6.0_45/jre/lib/deploy.jar

Done. ......................................................................................................................................

update-alternatives: using /usr/lib/jvm/java-6-oracle/jre/bin/unpack200 to provide /usr/bin/unpack200 (unpack200) in auto mode

update-binfmts: warning: current package is oracle-java6, but binary format already installed by openjdk-7

Oracle JDK 6 installed Oracle JRE 6 browser plugin installed

xxxxx@xxx:~$ java -version

Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar

Error opening zip file or JAR manifest missing : /usr/share/java/jayatanaag.jar

Error occurred during initialization of VM agent library failed to init: instrument

  • 1
    What about reinstalling java with apt-get install --reinstall PACKAGENAME? What Java did you use? Oracle or OpenJDK? – Byte Commander May 19 '15 at 19:10
  • sudo apt-get install --reinstall oracle-java6-installer: as above update, no difference. I'm noticed with the message: "update-binfmts: warning: current package is oracle-java6, but binary format already installed by openjdk-7", may this is the core, but don't know how to solve. I'm using the "oracle-java6-installer". – evergreen May 20 '15 at 3:29
2

Start a search for all packages for the path /usr/share/java in the standard language (English):

LANG=C apt-file search  /usr/share/java/ | awk -F": " '{print $1}' | sort -u | xargs apt-cache policy | grep -P -B 1 "Installed:\s[^(]"

With this command, you see a list of installed packages. Install these packages again with:

sudo apt-get install --reinstall <package_name>

Sample output:

% LANG=C apt-file search  /usr/share/java/ | awk -F": " '{print $1}' | sort -u | xargs apt-cache policy | grep -P -B 1 "Installed:\s[^(]"

gettext:
  Installed: 0.19.2-2ubuntu1
--
gettext-base:
  Installed: 0.19.2-2ubuntu1
--
java-common:
  Installed: 0.52
--
libatk-wrapper-java:
  Installed: 0.30.5-1
--
libcommons-collections3-java:
  Installed: 3.2.1-8
--
libcommons-dbcp-java:
  Installed: 1.4-5ubuntu1
--
libcommons-pool-java:
  Installed: 1.6-2
--
libecj-java:
  Installed: 3.10.1-1
--
libservlet3.0-java:
  Installed: 7.0.56-2
--
libtomcat7-java:
  Installed: 7.0.56-2
--
ure:
  Installed: 4.4.2-0ubuntu1
  • Super: for errors of missing is solved, as my update(2) above. My quest No.2 is still staying, could we also treat it? – evergreen May 20 '15 at 7:22
  • This problem is a completely different and stands in no connection with the deletion of the files. Please be fair and create for this problem, a new question. I'll just watch this question then. :) – A.B. May 20 '15 at 7:29
  • Agree!, I'm going to create new topic, will be updated. – evergreen May 20 '15 at 8:14
  • A.B: my new topic is in: "Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar" – evergreen May 20 '15 at 8:24
0

Had this problem. I solved it by installing libc6-dev-amd64.

sudo apt-get install libc6-dev-amd64

If still doesn't work, try to launch the installer in root mode:

sudo ./install

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.