Menu

#775 Doesn't use Java 6 on OS X

3: Ugly
closed-fixed
9
2009-09-23
2009-08-04
hperkins
No

Just grabbed the current beta (20090803-r4975) and am giving it a try on a couple of machine. I've run into one misfeature on os x (10.5.7, macbook pro). I've got Java 6 listed first in the Java Preferences utility, and that's the version I get when I use javac or java in the terminal. But DrJava is picking up jdk 5.0_19 as the only available compiler in the popup menu, and it also seems to be running under java 5. It seems to me that DrJava ought to be picking up the JVM preference set in the Java Application preferences. Any suggestions?

Discussion

  • Mathias Ricken

    Mathias Ricken - 2009-08-05

    We need to know a little bit more about your system to fix this bug. Please go to "Help -> About" and click on "System Properties". Then, click the "Copy System Properties" button and paste the results here in a new comment.

    Thanks,
    The DrJava Team

     
  • Mathias Ricken

    Mathias Ricken - 2009-08-05

    I only have OS X 10.4.11, but for me DrJava works correctly with the Java 6 Developer Preview 6 and SoyLatte (since I have a 32-bit Mac, I can't upgrade to Apple's official Java 6 release).

    How are you starting DrJava? Do you use the Mac application and double-click on the DrJava icon, or do you use the .jar file and start it from the command line? If you start it from the command line and the Java 5 java command is placed on the PATH before the Java 6 command, then DrJava will be started with Java 5, regardless of the setting in the Java Preferences utility.

    When run with Java 5, Java 6 compilers cannot be used or displayed because of different class file versions.

    So, I think the question that needs to be answered here is: Why does your DrJava run with Java5?

     
  • hperkins

    hperkins - 2009-08-05

    It has something to do with the OS X wrapper application. The application only shows JDK 5.0_19, and that is true both of the current beta and the previous 20090505-r4932. If I launch the 20090803-r4975.jar file directly by double-clicking it, it shows both JDK 6.0_13 and JDK 5.0 (no version number) in the compiler popup menu, and JDK 6.0_13 is selected as the default compiler.

    I'm going to paste two system properties below. The first is from the application; the second is from the jar version. Look for a line of ########## between them to find the second one faster.

    Application system properties:

    System Properties:
    DrJava Version drjava-20090803-r4975
    DrJava Build Time 20090803-2355

    drjava.debug.port = 49407
    java.runtime.name = Java(TM) 2 Runtime Environment, Standard Edition
    sun.boot.library.path = /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Libraries
    java.vm.version = 1.5.0_19-137
    awt.nativeDoubleBuffering = true
    gopherProxySet = false
    java.vm.vendor = Apple Inc.
    java.vendor.url = http://www.apple.com/
    path.separator = :
    java.vm.name = Java HotSpot(TM) Client VM
    file.encoding.pkg = sun.io
    user.country = US
    sun.os.patch.level = unknown
    java.vm.specification.name = Java Virtual Machine Specification
    user.dir = <anonymized user.dir>
    java.runtime.version = 1.5.0_19-b02-304
    java.awt.graphicsenv = apple.awt.CGraphicsEnvironment
    java.endorsed.dirs = /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/endorsed
    os.arch = i386
    edu.rice.cs.drjava.icon = <anonymized user.dir>/DrJava.app/Contents/Resources/DrJava.icns
    java.io.tmpdir = /var/folders/pU/pUzOeMGFGs8lODSoag5vwE+++TI/-Tmp-/
    line.separator = "\u000a"
    java.vm.specification.vendor = Sun Microsystems Inc.
    os.name = Mac OS X
    apple.laf.useScreenMenuBar = true
    sun.jnu.encoding = MacRoman
    java.library.path = <anonymized user.dir>/DrJava.app/Contents/Resources/Java:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources:.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
    java.specification.name = Java Platform API Specification
    java.class.version = 49.0
    sun.management.compiler = HotSpot Client Compiler
    os.version = 10.5.7
    http.nonProxyHosts = local|*.local|169.254/16|*.169.254/16
    user.home = <anonymized user.home>
    user.timezone = America/Los_Angeles
    java.awt.printerjob = apple.awt.CPrinterJob
    file.encoding = MacRoman
    java.specification.version = 1.5
    java.class.path = <anonymized user.dir>/DrJava.app/Contents/Resources/Java/drjava.jar
    user.name = <anonymized user.name>
    apple.awt.graphics.UseQuartz = true
    java.vm.specification.version = 1.0
    java.home = /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
    sun.arch.data.model = 32
    user.language = en
    java.specification.vendor = Sun Microsystems Inc.
    awt.toolkit = apple.awt.CToolkit
    java.vm.info = mixed mode, sharing
    java.version = 1.5.0_19
    java.ext.dirs = /Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext
    sun.boot.class.path = /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/jsfd.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/laf.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/sunrsasign.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/charsets.jar:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources/LauncherSupport.jar
    java.vendor = Apple Inc.
    file.separator = /
    java.vendor.url.bug = http://bugreport.apple.com/
    sun.io.unicode.encoding = UnicodeLittle
    sun.cpu.endian = little
    java.rmi.server.hostname = 127.0.0.1
    mrj.version = 1050.1.5.0_19-304
    socksNonProxyHosts = local|*.local|169.254/16|*.169.254/16
    ftp.nonProxyHosts = local|*.local|169.254/16|*.169.254/16
    sun.awt.exception.handler = apple.awt.CToolkit$EventQueueExceptionHandler
    sun.cpu.isalist =

    #DrJava configuration file
    #Wed Aug 05 12:33:13 PDT 2009
    key.delete.next = [shift DELETE]
    key.delete.previous = [shift BACK_SPACE]
    window.x = 622
    window.y = 200
    last.dir = <anonymized user.home>
    last.interactions.dir = <anonymized user.home>
    tabbedpanes.state = 720 450 700 400
    new.version.notification.last = 1249419785352
    drjava.survey.notification.last = 1249500781165
    drjava.survey.result.last = http://www.drjava.org/submit-usage.php?rev=4975&os.name=Mac%20OS%20X&os.version=10.5.7&java.version=1.5.0_19&java.vendor=Apple%20Inc.

    Used memory: about 13.12 megabytes
    Free memory: about 2.84 megabytes
    Total memory: about 15.97 megabytes
    Total memory can expand to: about 63.56 megabytes

    Number of processors/cores: 2

    ##################################

    jar version system properties:

    System Properties:
    DrJava Version drjava-20090803-r4975
    DrJava Build Time 20090803-2355

    drjava.debug.port = 49432
    java.runtime.name = Java(TM) SE Runtime Environment
    sun.boot.library.path = /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries
    java.vm.version = 11.3-b02-83
    awt.nativeDoubleBuffering = true
    gopherProxySet = false
    java.vm.vendor = Apple Inc.
    java.vendor.url = http://www.apple.com/
    path.separator = :
    java.vm.name = Java HotSpot(TM) 64-Bit Server VM
    file.encoding.pkg = sun.io
    sun.java.launcher = SUN_STANDARD
    user.country = US
    sun.os.patch.level = unknown
    java.vm.specification.name = Java Virtual Machine Specification
    user.dir = <anonymized user.home>/Desktop
    java.runtime.version = 1.6.0_13-b03-211
    java.awt.graphicsenv = apple.awt.CGraphicsEnvironment
    java.endorsed.dirs = /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/endorsed
    os.arch = x86_64
    apple.awt.graphics.UseOpenGL = false
    java.io.tmpdir = /var/folders/pU/pUzOeMGFGs8lODSoag5vwE+++TI/-Tmp-/
    line.separator = "\u000a"
    java.vm.specification.vendor = Sun Microsystems Inc.
    os.name = Mac OS X
    apple.laf.useScreenMenuBar = true
    sun.jnu.encoding = MacRoman
    java.library.path = .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
    java.specification.name = Java Platform API Specification
    java.class.version = 50.0
    sun.management.compiler = HotSpot 64-Bit Server Compiler
    os.version = 10.5.7
    http.nonProxyHosts = local|*.local|169.254/16|*.169.254/16
    user.home = <anonymized user.home>
    user.timezone = America/Los_Angeles
    java.awt.printerjob = apple.awt.CPrinterJob
    file.encoding = MacRoman
    java.specification.version = 1.6
    java.class.path = <anonymized user.home>/Desktop/drjava-beta-20090803-r4975.jar
    user.name = <anonymized user.name>
    apple.awt.graphics.UseQuartz = false
    java.vm.specification.version = 1.0
    java.home = /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
    sun.arch.data.model = 64
    user.language = en
    java.specification.vendor = Sun Microsystems Inc.
    awt.toolkit = apple.awt.CToolkit
    java.vm.info = mixed mode
    java.version = 1.6.0_13
    java.ext.dirs = /Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext
    sun.boot.class.path = /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jsfd.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/laf.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/sunrsasign.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/charsets.jar
    java.vendor = Apple Inc.
    file.separator = /
    java.vendor.url.bug = http://bugreport.apple.com/
    sun.io.unicode.encoding = UnicodeLittle
    sun.cpu.endian = little
    java.rmi.server.hostname = 127.0.0.1
    mrj.version = 1050.1.6.0_13-211
    socksNonProxyHosts = local|*.local|169.254/16|*.169.254/16
    ftp.nonProxyHosts = local|*.local|169.254/16|*.169.254/16
    sun.awt.exception.handler = apple.awt.CToolkit$EventQueueExceptionHandler
    sun.cpu.isalist =

    #DrJava configuration file
    #Wed Aug 05 12:34:37 PDT 2009
    key.delete.next = [shift DELETE]
    key.delete.previous = [shift BACK_SPACE]
    window.x = 622
    window.y = 200
    last.dir = <anonymized user.home>
    last.interactions.dir = <anonymized user.home>
    tabbedpanes.state = 720 450 700 400
    new.version.notification.last = 1249419785352
    drjava.survey.notification.last = 1249500848876
    drjava.survey.result.last = http://www.drjava.org/submit-usage.php?rev=4975&os.name=Mac%20OS%20X&os.version=10.5.7&java.version=1.6.0_13&java.vendor=Apple%20Inc.

    Used memory: about 21.63 megabytes
    Free memory: about 57.75 megabytes
    Total memory: about 79.38 megabytes
    Total memory can expand to: about 81.44 megabytes

    Number of processors/cores: 2

     
  • Dan Smith

    Dan Smith - 2009-08-06
    • priority: 5 --> 9
     
  • Dan Smith

    Dan Smith - 2009-08-06

    I can reproduce this in a fairly untouched install of OS X 10.5.7. It prefers Java 5 despite the fact that we've requested the highest-priority version available (specified by the Java Preferences app), and Java SE 6 is at the top of my list. I'll look into it.

    As a workaround, you can edit DrJava.app/Contents/Info.plist so that the "JVMVersion" key (found in the "Java" section) is set to "1.6+" rather than "1.5+". (To get to this file in Finder, right-click on the "DrJava" application and select "Show Package Contents".) This change will force the app to always use Java 6 or later.

     
  • Dan Smith

    Dan Smith - 2009-08-06

    It looks like all 64-bit VMs are ignored when launching a Java app unless no 32-bit alternative can be found -- which would be fine if Apple provided a 32-bit Java 6 VM. As it is, the best I can come up with is to always prefer 64-bit VMs (via a setting in Info.plist), which would force all users (except those without any 64-bit VMs installed) to run 64-bit. I sent an email to the Mac Java mailing list to confirm that my understanding is correct.

     
  • hperkins

    hperkins - 2009-09-04

    Two quick things to add.

    - The 8/21 release version of the DrJava application did show both Java 6 and Java 5 on OS X 10.5.8, with Java 6 selected as the default. Don't know how you hacked it, but it seemed to work.

    - Over the weekend I upgraded that machine to 10.6, so I won't be able easily to go back and test further on 10.5.8. From a few superficial checks, the latest DrJava seems to work on 10.6. Also interesting is that 10.6 only includes Java 6 - no Java 5 - and there is a choice between an 32-bit and a 64-bit version in the Java preference program.

     
  • Mathias Ricken

    Mathias Ricken - 2009-09-08

    It seems like this has been fixed to satisfaction.

     
  • Mathias Ricken

    Mathias Ricken - 2009-09-08
    • assigned_to: nobody --> dlsmith
    • status: open --> pending-fixed
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.