Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a MacBook Air running 10.8.3. I have Java running almost all the time and it is consuming ~500 MB of RAM. I didn't start Java, and—as far as I can tell—nothing that uses Java is still running. Surely something in the background is using Java, but I don't know what. I would like to kill it (if I can) because I'd like to have my RAM back.

I noticed this happening a few months ago, but never could figure out how to solve the problem. I can kill Java itself, but it restarts immediately and eventually consumes too much RAM.

Does anyone know what is going on?

share|improve this question
    
To help diagnose this, it would be good to know which other running processes there are, which apps are set as Login Items, and which apps you have installed on your computer. Also a question... Why not just remove Java? Any apps that need it will prompt you to re-install and that may help you isolate the issue. –  bispymusic Mar 28 '13 at 17:15
add comment

2 Answers

up vote 8 down vote accepted

Try typing this into terminal:

ps axv | grep java
  • This should output details about which jar file is open in the runtime.

Alternatively, to find out which applications are using the Java Runtime select java in the activity monitor and clicking on the blue i icon.

Click 'Open Files and Ports' and see if it gives you a clue which application launched the java environment. You'd be surprised which applications depend on Java!

enter image description here enter image description here

You could also try going into the Java System Preference, clicking the Java Tab and choosing View.... You'll see a list of registered Java applications that might help you find the culprit.

Java System Preference

share|improve this answer
    
Also, the parent process might give you another clue. –  jmk Mar 20 '13 at 8:58
    
The parent process is launchd (1). There is nothing to indicate how to 'Open Files and Ports' –  Jeremy Mar 20 '13 at 23:05
    
Do you mean you don't have an Open Files and Ports button or that you don't have any indication of which application is causing java to run in the Open Files and Ports dialog? –  glenstorey Mar 21 '13 at 2:22
    
@glenstorey- the tab is just not there - I have programs that just have Memory and Statistics - including CrashPlan which uses java –  Mark Mar 25 '13 at 17:57
    
Have you tried using grep as suggested in my edit? I think if you're running crashplan that will be your culprit, because it runs all the time in the background and will need the java runtime. –  glenstorey Mar 25 '13 at 20:38
show 5 more comments

If you do not have the tab "Open Files and Ports" in the inspection window as suggested by @glenstorey then you might still be able to find the app.

Keep on the inspection window but this time press the Sample button, if the program is not running under your login you will be prompted for an admin account and password.

You then get a long report. The section that might be of help is at the bottom in the Binary Images section. This lists what code is loaded into memory. If the java program calls C code and possible the wrapper that calls java then you might have a useful path.

e.g. for Crashplan which has a program running all the time as root with the program name in Activity Monitor as java

The things to note are files =that are in /Applications or possible Library/Application Support. In this case I see /Applications/CrashPlan.app/Contents/Resources/Java/libidletime64.dylib etc

Binary Images:
       0x10a5f6000 -        0x10a606fff +java (1.0 - 1.0) <1E26C603-F156-3FA1-A587-D8F17F589A6D> /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/bin/java
       0x10a720000 -        0x10adaafef +libjvm.dylib (??? - ???) <7484AE3C-1A63-3F1D-9CFE-E0C610D0BE65> /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/server/libjvm.dylib
       0x10b34e000 -        0x10b356fff +libverify.dylib (??? - ???) <C42EBBF2-FDE6-342B-9B75-7D91194E47C1> /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/libverify.dylib
       0x10b35b000 -        0x10b37cfef +libjava.dylib (??? - ???) <11E96657-9A0C-3D40-9A1F-3F8DD9B69204> /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/libjava.dylib
       0x10b394000 -        0x10b399fff +libzip.dylib (??? - ???) <F2AECE8C-A9AD-37F8-ABF6-E7985E2BFA6F> /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/libzip.dylib
       0x1379b4000 -        0x1379bdff7  com.apple.java.JavaRuntimeSupport (14.6.1 - 14.6.1) <A08E8799-F5FF-3CBB-A753-FC2AF260ABEB> /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/JavaRuntimeSupport
       0x1379cc000 -        0x1379d6fff  JavaNativeFoundation (??? - ???) <F1FE02AF-1A2C-3EF7-9D1A-312FA21B51B9> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation
       0x1379e1000 -        0x1379e6fff  com.apple.JavaVM (14.6.1 - 14.6.1) <83C8C2AB-E99D-39FF-80B4-90A7DEB1DAFB> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM
       0x1379ee000 -        0x1379f3fff  JavaLaunching (??? - ???) <DD82A173-5327-36A3-B87C-96663AEBEE8A> /System/Library/PrivateFrameworks/JavaLaunching.framework/Versions/A/JavaLaunching
       0x13826e000 -        0x13827bfff +libjtux64.dylib (??? - ???) /Applications/CrashPlan.app/Contents/Resources/Java/libjtux64.dylib
       0x138281000 -        0x138284ff7 +libcpnative.dylib (??? - ???) <BED6DF76-704F-39B5-BD1A-D0A8129DE84B> /Applications/CrashPlan.app/Contents/Resources/Java/libcpnative.dylib
       0x138291000 -        0x138291fff +libidletime64.dylib (??? - ???) /Applications/CrashPlan.app/Contents/Resources/Java/libidletime64.dylib
       0x13830c000 -        0x13831bff7 +jna6981923499777564960.tmp (3.2.1 - compatibility 3.0.0) <1734DF74-B395-FB8E-A6D5-31CB0F196674> /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jna6981923499777564960.tmp
       0x13835b000 -        0x138378fff +libsunec.dylib (??? - ???) <7969D854-D44E-32D9-84CD-78C8C83A7ED7> /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/libsunec.dylib
       0x13849d000 -        0x1384a5fff +libnio.dylib (??? - ???) <A4F96449-48A6-32AE-A956-0C7759354778> /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/libnio.dylib
       0x1384ac000 -        0x1384baff7 +libnet.dylib (??? - ???) <2A711125-2DA4-3E03-B571-BDB160182E65> /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/libnet.dylib
       0x138509000 -        0x138509ff7 +libmd564.dylib (??? - ???) <CD2AEABE-90D6-5366-4CCA-DF7A115B0058> /Applications/CrashPlan.app/Contents/Resources/Java/libmd564.dylib
       0x13859b000 -        0x13859efff +libmanagement.dylib (??? - ???) <77A61F50-3171-3A63-A050-A29629B83561> /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/libmanagement.dylib
       0x1385a3000 -        0x1385a9fff +libjniwrap.dylib (??? - ???) <A4E3427E-F1A0-F376-2146-97307CEADA85> /Applications/CrashPlan.app/Contents/Resources/Java/libjniwrap.dylib
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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