2

This is related to this question Submit Application not possible

However after the most recent java update from apple (that removed the web plugin) oracle immediatley issued an update for java 7

Now xcode can't upload anymore "An error occurred uploading to the iTunes Store" and the old fix doesn't work. Is Java 1.6 gone? Or do we need to do something else?

Community
  • 1
  • 1
Hackmodford
  • 3,901
  • 4
  • 35
  • 78

5 Answers5

9

The previous answers are ok if you have an old copy of Java. An easy fix (that will break Java, and then you can revert it back) is to temporarily remove/backup the two symlinks.

  1. cd /System/Library/Frameworks/JavaVM.framework/Versions
  2. sudo mv Current Current.bak
  3. sudo mv CurrentJDK CurrentJDK.bak
  4. Upload your binary
  5. sudo mv Current.bak Current
  6. sudo mv CurrentJDK.bak CurrentJDK
Gary Rudolph
  • 1,062
  • 9
  • 21
4

You can do this in terminal

cd /System/Library/Frameworks/JavaVM.framework/Versions  
open .

Then copy out the Current and CurrentJDK folders to the desktop or other location and

rm Current*  
ln -s 1.6.0/ Current  
ln -s 1.6.0/ CurrentJDK  

This fixes the upload issue then when you are done in Terminal

cd /System/Library/Frameworks/JavaVM.framework/Versions
rm Current*
open .

Then copy the originals back from the desktop and you Java will be working again.

TheCodeArtist
  • 21,479
  • 4
  • 69
  • 130
masc2279
  • 64
  • 1
  • For future reference: "Current" symlinks to "A" in that Versions folder. And "CurrentJDK" symlinks to "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents" – Hackmodford Oct 18 '12 at 13:18
2

As a followup to anyone who doesn't have any other versions of Java linked, I found simply deleting the Current and CurrentJDK files worked. There were no issues noted in /var/log/system.log , which leads me to believe Xcode simply either skips the script requiring Java, or found a 1.6 version of Java by itself.

Same steps as Gary Rudolph described:

cd /System/Library/Frameworks/JavaVM.framework/Versions

sudo mv Current Current.bak
sudo mv CurrentJDK.bak CurrentJDK.bak

Upload your binary

sudo mv Current.bak Current
sudo mv CurrentJDK.bak CurrentJDK
Bob
  • 76
  • 2
0

I used the instructions found at this website

http://creativepark.net/1146

rm Current*
ln -s 1.6.0/ Current
ln -s 1.6.0/ CurrentJDK

However this seems to have broken java :( atleast my upload worked.

Hackmodford
  • 3,901
  • 4
  • 35
  • 78
0

Use xcode 4.6 Organizer to submit your archive. And you do not need to do anything with Java on your Mountain Lion

Dodo
  • 51
  • 1
  • 3