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 an Apple laptop running 10.6.7 and I somehow managed to get into a situation where Java header files are actually (empty) directories. The laptop came with 10.6.7 pre-installed. I ran "Software Update", installed Xcode 3.2.6, and installed MacPorts. When trying to install port "db46" I get compilation errors, because jni.h is broken.

How do I fix this?

bash-3.2# pwd
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers
bash-3.2# ls -la
total 64
drwxr-xr-x  17 root  wheel    578 May  5 11:28 .
drwxr-xr-x  10 root  wheel    340 Mar 29 19:22 ..
drwxr-xr-x   2 root  wheel     68 May  5 11:28 AWTCocoaComponent.h
drwxr-xr-x   2 root  wheel     68 May  5 11:28 JDWP.h
drwxr-xr-x   2 root  wheel     68 May  5 11:28 JDWPCommands.h
-rw-r--r--   1 root  wheel    179 Oct 24  2010 JavaVM.h
-rw-r--r--   1 root  wheel   2390 Oct 24  2010 NSJavaConfiguration.h
-rw-r--r--   1 root  wheel   2060 Oct 24  2010 NSJavaVirtualMachine.h
-rw-r--r--   1 root  wheel  19394 Oct 24  2010 classfile_constants.h
drwxr-xr-x   2 root  wheel     68 May  5 11:28 jawt.h
drwxr-xr-x   2 root  wheel     68 May  5 11:28 jawt_md.h
drwxr-xr-x   2 root  wheel     68 May  5 11:28 jdwpTransport.h
drwxr-xr-x   2 root  wheel     68 May  5 11:28 jni.h
drwxr-xr-x   2 root  wheel     68 May  5 11:28 jni_md.h
drwxr-xr-x   2 root  wheel     68 May  5 11:28 jvmdi.h
drwxr-xr-x   2 root  wheel     68 May  5 11:28 jvmpi.h
drwxr-xr-x   2 root  wheel     68 May  5 11:28 jvmti.h
share|improve this question
    
This might be too "Unix-y" and technical for Ask Different. If you don't get a timely answer here, you may have more luck over at Super User (superuser.com). –  Austin May 5 '11 at 21:30
add comment

1 Answer 1

up vote 2 down vote accepted

Try re-installing Java using this update. It is the Java Update for Snow Leopard. Hopefully that will fix the problems your seeing here.

Let us know if that works, if not we can do some more troubleshooting and help you out.

share|improve this answer
    
Also, reapplying 10.6.7 using the Combo Update, and reinstalling XCode might help. –  Agos May 6 '11 at 10:25
    
Re-installing the Java 10.6 Update 4 did indeed help. Thank you very much! –  bromfiets May 6 '11 at 18:18
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.