#946 DrJava and JDK 8

4: Serious
closed-fixed
None
5
2015-09-18
2014-04-06
No

Loaded latest Java JDK 8 and latest DrJava drjava-stable-20130901-r5756 on Windows 7. Clicked the compile button and no errors were generated but the java program does not compile. When "run" is clicked, DrJava reports that the source file has not yet been compiled.

Related

Bugs: #946

Discussion

  • Dave Pritchard

    Dave Pritchard - 2014-04-26
     
    • Robert Cartwright

      Hi Dave,

      I don't understand your bug report.

      We did not use Java 8 locally until the beginning of the 2014-2015 school
      year. For a while I erroneously thought that the previous stable release
      was compatible with Java 8, but it contained a check for an obscurre file
      property in the Java 7 compiler that was changed in Java 8. A new stable
      version (with the Java 7 specific check removed) was released Aug 26,
      2014. In my experience, it is compatible with Java 8. The link in your
      report refers to the fact that the previous version did not work with Java
      8 which is true but how does that apply to the new version? Do you have
      the latest version? I routinely use it with Java 8; I have encountered a
      few bugs when editing the DrJava source code base but they involve much
      more complex scenarios than simple compilation.

      Best,

      Robert "Corky" Cartwright

      On Sat, Sep 12, 2015 at 10:30 PM, Dave Pritchard dagpritchard@users.sf.net
      wrote:

      See also https://sourceforge.net/p/drjava/support-requests/310/

      Status: open
      Group: 4: Serious
      Created: Sun Apr 06, 2014 05:47 PM UTC by Michael Ferero
      Last Updated: Wed Aug 27, 2014 04:42 PM UTC
      Owner: nobody

      Loaded latest Java JDK 8 and latest DrJava drjava-stable-20130901-r5756 on
      Windows 7. Clicked the compile button and no errors were generated but the
      java program does not compile. When "run" is clicked, DrJava reports that
      the source file has not yet been compiled.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/drjava/bugs/946/

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

       

      Related

      Bugs: #946

  • Stephen Gilbert

    Stephen Gilbert - 2014-04-30

    I have exactly the same problem. Wanted to use the new version so I could use JDK 8 for my summer class. It does not appear to compile at all. If you switch compilers, then it compiles, but not with JDK 8.

     
    • Robert Cartwright

      There is an experimental version of DrJava available at
      http://www.cs.rice.edu/~javaplt/drjavarice/ labeled with the release date
      September 1, 2013 that appears to work with Java 8. I have not yet used
      Java 8 in any of my courses, but the experimental version no longer
      performs a Java 7 specific check (on the loaded compiler) and successfully
      loads the Java 8 compiler. Note that the interpreter does not yet support
      Java 8 language extensions. Hence, Java 8 language extensions should work
      in compiled code but not in the interactions pane. The direct link to the
      jar file for his version of Java is:

      http://www.cs.rice.edu/~javaplt/drjavarice/drjava-stable-20130901-r5756.jar

      Please report any problems that you encounter to me (cork@rice.edu).

      Best,

      Robert "Corky" Cartwright

      On Wed, Apr 30, 2014 at 1:48 PM, Stephen Gilbert stephendgilbert@users.sf.net wrote:

      I have exactly the same problem. Wanted to use the new version so I could
      use JDK 8 for my summer class. It does not appear to compile at all. If you
      switch compilers, then it compiles, but not with JDK 8.


      Status: open
      Group: 4: Serious
      Created: Sun Apr 06, 2014 05:47 PM UTC by Michael Ferero
      Last Updated: Sat Apr 26, 2014 04:43 PM UTC
      Owner: nobody

      Loaded latest Java JDK 8 and latest DrJava drjava-stable-20130901-r5756 on
      Windows 7. Clicked the compile button and no errors were generated but the
      java program does not compile. When "run" is clicked, DrJava reports that
      the source file has not yet been compiled.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/drjava/bugs/946/

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

       

      Related

      Bugs: #946

  • Robert Cartwright

    There is an experimental version of DrJava available at http://www.cs.rice.edu/~javaplt/drjavarice/ labeled with the release date September 1, 2013 that appears to work with Java 8. I have not yet used Java 8 in any of my courses, but the experimental version no longer performs a Java 7 specific check (on the loaded compiler) and successfully loads the Java 8 compiler. Note that the interpreter does not yet support Java 8 language extensions. Hence, Java 8 language extensions should work in compiled code but not in the interactions pane. The direct link to the jar file for his version of Java is:

    http://www.cs.rice.edu/~javaplt/drjavarice/drjava-stable-20130901-r5756.jar

    Please report any problems that you encounter.

     
  • Dave Pritchard

    Dave Pritchard - 2014-04-30

    Thanks! But it seems to be the same version as the one at drjava.org. When running it using my Java 8 install

    "...\jdk1.8.0_05\bin\java.exe" -jar drjava-stable-20130901-r5756.jar

    compiling still says "Compilation completed." in Compiler Output, "javacTask: target release 1.7 conflicts with default source release 1.8" in Console, and does not write any class files to disk.

     
  • Robert Cartwright

    My apologies. I created a new experimental version of DrJava in February and I thought I had installed a link to it on the "drjavarice" web page. I committed the changes to the SourceForge repository but faled to update the "drjavarice" page. The latest DrJava link on that page simply pointed to a copy of the current stable release until a few minutes ago. My casual testing of Java 8 with the current stable version was faulty because running the compiler with Java 8 is essentially a no-op. In the erroneous test that I conducted, DrJava found old class files that passed my unit tests and I falsely concluded that they had been generated by the Java 8 compiler.

    I just uploaded (to the "drjavarice" page) a copy of the jar file corresponding to the current state of SourceForge repository. I reran the same casual test as before, but I made sure that the compile step actually generates Java 8 class files.

     
  • Dave Pritchard

    Dave Pritchard - 2014-05-02

    Thank you so much! This seems to work!

     
  • Yerpaderp

    Yerpaderp - 2014-05-09

    I've found that you can still compile your Dr Java program in cmd with the javac command. Cmd will create the class for your .java file, if the file has already been saved. The weird thing for me, though, is that to run my program, I have to type java -cp . [filename].java.
    ...
    ...
    So yeah. That should work.

     
  • Robert Cartwright

    I am closing this bug because it was fixed (as far as I know) in the next stable release on Aug 26, 2014.

     
  • Robert Cartwright

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

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks