Menu

#306 Java JDK 7 not showing up in DrJava

v1.0 (example)
closed
None
5
2013-09-18
2013-09-11
No

Newest Stable Release of DrJava as of 9/11/2013
Oracle JDK 7u40

From terminal # java - version shows 1.7
From terminal # javac -version shows 1.7

But when we launch DrJava it only shows 1.6 compilers.

If I delete all the Javas on my machines to where java -version says No compilers found, and launch DrJava it forces me to install Java 1.6

Why will it not work with just Java 1.7??

Related

Support Requests: #306

Discussion

  • Robert Cartwright

    On the Help menu, active that "About" command which opens a new window.
    Open the "Sysrem Properties" tab to confirm that DrJava is executing on a
    Java 7 virtual machine. If so, activate the "Copy Systerm Properties"
    button near the bottom of the window and paste that information into a
    comment for you support request. Those properties provide an enormous
    amount of information like the OS that you are running. On my laptop
    running Linux 13.04, I can run DrJava with Java 6, 7, or 8. When I use a
    pre-release Java 8 JVM, DrJava finds many different compilers (Sun/Oracle
    5, 6, 7, 8; open-jdk 6 and 7; and Eclipse 0.48 which is bundled as part of
    DrJava).

    DrJava does not execute the "javac" command line script to compile source
    files. It finds tools.jar files containing the class files for compilers.
    When you compile a list of open files or a project, DrJava explicitly
    invokes a compile method in the class files for the specified compiler on
    the appropriate source files. In this way, it can find many different
    compilers (but it rejects any that are newer in version number than the
    executing JVM) and receive any error messages returned by the compilation
    in a organized data structure instead of raw ASCII text that would have to
    be parsed to understand the source coordinates of error messages.

    -- Corky Cartwright

    On Wed, Sep 11, 2013 at 9:11 PM, Alessandro Garabaghi agarabaghi@users.sf.net wrote:


    Status: open
    Created: Wed Sep 11, 2013 07:11 PM UTC by Alessandro Garabaghi
    Last Updated: Wed Sep 11, 2013 07:11 PM UTC
    Owner: nobody

    Newest Stable Release of DrJava as of 9/11/2013
    Oracle JDK 7u40

    From terminal # java - version shows 1.7

    From terminal # javac -version shows 1.7

    But when we launch DrJava it only shows 1.6 compilers.

    If I delete all the Javas on my machines to where java -version says No
    compilers found, and launch DrJava it forces me to install Java 1.6

    Why will it not work with just Java 1.7??

    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/drjava/support-requests/306/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Support Requests: #306

  • Alessandro Garabaghi

    Well we downloaded the .jar file instead of using the DrJava OSX install app from your website and it finds the JDK 7 right away with no issues. Im just going to use that.

     
  • Robert Cartwright

    I have been using the app in my tests, but the app simply wraps the jar file; the same class files are being used in both cases. Perhaps the environment variables (which DrJava uses to help find compilers) are bound differently.

    I agree that using the app is better in practice; it integrates much better with the Mac OS X UI. But I will try running the jar file to see if I can reproduce the problem. The jar file should work also.

     
  • Robert Cartwright

    I just tried running the current drjava stable jar file on a borrowed
    MacBook running OS X 10.7.5 using Java 7.0_25. DrJava found the Java 7 JDK
    compiler, the Java 6 JDK compiler, and the Eclipse 0.A48 compiler exactly
    as it was supposed to. Next, I changed the binding of the environment
    variable JAVA7_HOME to nothing and it still worked. My path variable does
    not include any Java distributions. /usr/bin/java points to the file
    /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
    via a symbolic link.

    Everything looks correct.

    -- Corky

     
  • Robert Cartwright

    After I updated the Apple Java 6 JDK to the latest release from Apple (6.0_51), the DrJava app no longer finds the compiler Oracle Java 7 JDK because the Apple Jar launcher used by the DrJava app does not recognize the Oracle Java 7 JDK. If you inspect "System Properties" in such a scenario, it shows that DrJava is being executed by Apple's Java 6 JVM not Oracle's Java 7 JVM. A Java 6 JVM will not load Java 7 class files including those for a Java 7 compiler. If the Oracle Java 7 JDK is installed, DrJava typically finds the Java 7 compiler but rejects it because it cannot be loaded. The jar launchers from Apple and Oracle appear completely incompatible with one another. If we subsequently bundle DrJava with the Oracle jar launcher, such an app will not work on systems where the Oracle Java 7 JDK has not been installed.

    If you want to run DrJava using an Oracle Java 7 JDK for Mac OS X and the corresponding Java 7 compiler, you should download the DrJava jar release and run DrJava from a terminal command line using the command

    drjava -jar drjava-stable-20130901-r5756.jar

    In the future, we may create a DrJava app for Mac OS X that uses the Oracle jar launcher but such an app will only work for Macs with Java 7 installed; it will not work with an Apple Java 6 JDK. Since we do not want to create two different Mac OS X apps for DrJava, we do not anticipate making this change until Java 8 is officially released, making Java 6 obsolescent.

     

    Last edit: Robert Cartwright 2013-09-18
  • Robert Cartwright

    • status: open --> closed
    • assigned_to: Robert Cartwright
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.