Coder Social home page Coder Social logo

drjava's Introduction

OVERVIEW

This code base is merely a continuation of the DrJava code base formerly hosted at Sourceforge. We decided to shift from Subversion to Git for two reasons:

  1. Git is more flexible (and complex) than Subversion.
  2. Second, and more importantly, Git appears to be the preferred repository and version control system among software developers and our upper level students are more familiar with Git than Subversion.

Future Extensions

This repository also includes the unreleased pedagogic IDE for Scala called DrScala, which we will release as soon as we can persuade the Scala developers to fix a serious bug in the :require REPL command which we use to dynamically add new paths to the REPL class path.

Distribution of binaries

We will continue to distribute new releases of DrJava via Sourceforge to preserve our distribution interface. The move from Subversion on Sourceforge to Git on Github only concerns DrJava developers and others interested in the DrJava code base.

drjava's People

Contributors

barretg avatar hjmjohnson avatar jacomjos avatar jonathansharman avatar ponderosatx avatar rbrockman2 avatar rebeccasmith avatar satgarcia avatar sockcreature avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drjava's Issues

"Functional Java" Language Level is not working well

Primary Goal: Design a working Functional Java language level for use in teaching functional style Java more productively.

Task: We will need a team to look into the current state of the functional Java language level and identify specific drawbacks and bugs, either in implementation or design.

built file `drscala.jar` crash

Hello @ponderosaTX:

I have two almost-identical systems (both have 64-bit Ubuntu 17.04 with the same environment variables, Ant 1.9.8, and Oracle JDK 1.8.0_144). But my built file drscala.jar works on 1 system only.

Everything is at commit: 95c2127

Successful build of drscala.jar:

  • vu@Vu-Gazelle:~$ git clone https://github.com/DrJavaAtRice/drjava
    Cloning into 'drjava'...
    remote: Counting objects: 79118, done.
    remote: Total 79118 (delta 0), reused 0 (delta 0), pack-reused 79118
    Receiving objects: 100% (79118/79118), 250.97 MiB | 65.06 MiB/s, done.
    Resolving deltas: 100% (54338/54338), done.
    
    
  • vu@Vu-Gazelle:~$ cd drjava/drjava/
    
  • vu@Vu-Gazelle:~/drjava/drjava$ git checkout drscala/develop
    Branch drscala/develop set up to track remote branch drscala/develop from origin.
    Switched to a new branch 'drscala/develop'
    
  • vu@Vu-Gazelle:~/repos/drjava/drjava$ ant jar
    Buildfile: /home/vu/repos/drjava/drjava/build.xml
         [echo] JAVA8_HOME=/usr/lib/jvm/java-8-oracle/'
    
    resolve-development-value:
    
    resolve-version-tag:
    
    generate-source:
         [echo] Processing src/edu/rice/cs/drjava/CodeStatus.orig
         [echo] Processing src/edu/rice/cs/drjava/Version.orig
         [copy] Copying 1 file to /home/vu/repos/drjava/drjava/src/edu/rice/cs/drjava
    
    resolve-java8-runtime:
    [available] DEPRECATED - <available> used to override an existing property.
    [available]   Build file should not reuse the same property name for different values.
         [echo] java8-runtime=/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar
    
    resolve-java8-tools:
         [echo] java8-tools='/usr/lib/jvm/java-8-oracle/lib/tools.jar
    
    do-compile:
         [echo] Compiling src directory to classes/base and classes/test with command 'javac'
         [move] Moving 499 files to /home/vu/repos/drjava/drjava/classes/base
        [javac] Compiling 587 source files to /home/vu/repos/drjava/drjava/classes/base
         [move] Moving 523 files to /home/vu/repos/drjava/drjava/classes/test
    
    copy-resources:
         [copy] Copying 7 files to /home/vu/repos/drjava/drjava/classes/base
    
    unjar-libs:
         [echo] JAVA8_HOME=/usr/lib/jvm/java-8-oracle/'
    
    check-generate-dir-from-dir:
    
    do-unjar-libs:
    
    compile:
    
    jar:
          [jar] Building jar: /home/vu/repos/drjava/drjava/drscala.jar
    
    BUILD SUCCESSFUL
    Total time: 7 seconds
    

Failed run of drscala.jar:

vu@Vu-Gazelle:~/repos/drjava/drjava$ java -jar drscala.jar
edu.rice.cs.util.UnexpectedException: java.lang.reflect.InvocationTargetException
edu.rice.cs.util.UnexpectedException: java.lang.reflect.InvocationTargetException
	at edu.rice.cs.util.swing.Utilities.invokeAndWait(Utilities.java:81)
	at edu.rice.cs.drjava.ui.MainFrame.<init>(MainFrame.java:3027)
	at edu.rice.cs.drjava.DrScalaRoot.main(DrScalaRoot.java:159)
	at edu.rice.cs.drjava.DrScala.configureAndLoadDrScalaRoot(DrScala.java:290)
	at edu.rice.cs.drjava.DrScala.main(DrScala.java:185)
Caused by: java.lang.reflect.InvocationTargetException
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1321)
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1296)
	at edu.rice.cs.util.swing.Utilities.invokeAndWait(Utilities.java:80)
	... 4 more
Caused by: java.lang.NoClassDefFoundError: edu/rice/cs/drjava/model/compiler/ScalaCompiler
	at edu.rice.cs.drjava.model.AbstractDJDocument.<init>(AbstractDJDocument.java:139)
	at edu.rice.cs.drjava.model.AbstractDJDocument.<init>(AbstractDJDocument.java:187)
	at edu.rice.cs.drjava.model.repl.InteractionsDJDocument.<init>(InteractionsDJDocument.java:88)
	at edu.rice.cs.drjava.model.AbstractGlobalModel.<init>(AbstractGlobalModel.java:277)
	at edu.rice.cs.drjava.model.DefaultGlobalModel.<init>(DefaultGlobalModel.java:163)
	at edu.rice.cs.drjava.ui.MainFrame$148.run(MainFrame.java:3035)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.ClassNotFoundException: edu.rice.cs.drjava.model.compiler.ScalaCompiler
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 20 more
error thrown

Full error message in popup window:

edu.rice.cs.util.UnexpectedException: java.lang.reflect.InvocationTargetException
	at edu.rice.cs.util.swing.Utilities.invokeAndWait(Utilities.java:81)
	at edu.rice.cs.drjava.ui.MainFrame.<init>(MainFrame.java:3027)
	at edu.rice.cs.drjava.DrScalaRoot.main(DrScalaRoot.java:159)
	at edu.rice.cs.drjava.DrScala.configureAndLoadDrScalaRoot(DrScala.java:290)
	at edu.rice.cs.drjava.DrScala.main(DrScala.java:185)
Caused by: java.lang.reflect.InvocationTargetException
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1321)
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1296)
	at edu.rice.cs.util.swing.Utilities.invokeAndWait(Utilities.java:80)
	... 4 more
Caused by: java.lang.NoClassDefFoundError: edu/rice/cs/drjava/model/compiler/ScalaCompiler
	at edu.rice.cs.drjava.model.AbstractDJDocument.<init>(AbstractDJDocument.java:139)
	at edu.rice.cs.drjava.model.AbstractDJDocument.<init>(AbstractDJDocument.java:187)
	at edu.rice.cs.drjava.model.repl.InteractionsDJDocument.<init>(InteractionsDJDocument.java:88)
	at edu.rice.cs.drjava.model.AbstractGlobalModel.<init>(AbstractGlobalModel.java:277)
	at edu.rice.cs.drjava.model.DefaultGlobalModel.<init>(DefaultGlobalModel.java:163)
	at edu.rice.cs.drjava.ui.MainFrame$148.run(MainFrame.java:3035)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.ClassNotFoundException: edu.rice.cs.drjava.model.compiler.ScalaCompiler
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 20 more

Caused by:
java.lang.reflect.InvocationTargetException
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1321)
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1296)
	at edu.rice.cs.util.swing.Utilities.invokeAndWait(Utilities.java:80)
	at edu.rice.cs.drjava.ui.MainFrame.<init>(MainFrame.java:3027)
	at edu.rice.cs.drjava.DrScalaRoot.main(DrScalaRoot.java:159)
	at edu.rice.cs.drjava.DrScala.configureAndLoadDrScalaRoot(DrScala.java:290)
	at edu.rice.cs.drjava.DrScala.main(DrScala.java:185)
Caused by: java.lang.NoClassDefFoundError: edu/rice/cs/drjava/model/compiler/ScalaCompiler
	at edu.rice.cs.drjava.model.AbstractDJDocument.<init>(AbstractDJDocument.java:139)
	at edu.rice.cs.drjava.model.AbstractDJDocument.<init>(AbstractDJDocument.java:187)
	at edu.rice.cs.drjava.model.repl.InteractionsDJDocument.<init>(InteractionsDJDocument.java:88)
	at edu.rice.cs.drjava.model.AbstractGlobalModel.<init>(AbstractGlobalModel.java:277)
	at edu.rice.cs.drjava.model.DefaultGlobalModel.<init>(DefaultGlobalModel.java:163)
	at edu.rice.cs.drjava.ui.MainFrame$148.run(MainFrame.java:3035)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.ClassNotFoundException: edu.rice.cs.drjava.model.compiler.ScalaCompiler
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 20 more


System Properties:
DrScala Version drscala-20170829-032119
DrScala Build Time 20170829-032119

java.runtime.name = Java(TM) SE Runtime Environment
sun.boot.library.path = /usr/lib/jvm/java-8-oracle/jre/lib/amd64
java.vm.version = 25.144-b01
java.vm.vendor = Oracle Corporation
java.vendor.url = http://java.oracle.com/
path.separator = :
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
file.encoding.pkg = sun.io
user.country = US
sun.java.launcher = SUN_STANDARD
sun.os.patch.level = unknown
java.vm.specification.name = Java Virtual Machine Specification
user.dir = <anonymized user.home>/repos/drscala/drjava
java.runtime.version = 1.8.0_144-b01
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
java.endorsed.dirs = /usr/lib/jvm/java-8-oracle/jre/lib/endorsed
os.arch = amd64
java.io.tmpdir = /tmp
line.separator = "\u000a"
java.vm.specification.vendor = Oracle Corporation
os.name = Linux
sun.jnu.encoding = UTF-8
java.library.path = /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
sun.awt.enableExtraMouseButtons = true
java.specification.name = Java Platform API Specification
java.class.version = 52.0
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
os.version = 4.10.0-33-generic
user.home = <anonymized user.home>
user.timezone = America/Chicago
java.awt.printerjob = sun.print.PSPrinterJob
file.encoding = UTF-8
java.specification.version = 1.8
java.class.path = drscala.jar
user.name = <anonymized user.name>
java.vm.specification.version = 1.8
sun.java.command = drscala.jar
java.home = /usr/lib/jvm/java-8-oracle/jre
sun.arch.data.model = 64
user.language = en
java.specification.vendor = Oracle Corporation
awt.toolkit = sun.awt.X11.XToolkit
java.vm.info = mixed mode
java.version = 1.8.0_144
java.ext.dirs = /usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/java/packages/lib/ext
sun.boot.class.path = /usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/classes
java.vendor = Oracle Corporation
file.separator = /
java.vendor.url.bug = http://bugreport.sun.com/bugreport/
sun.font.fontmanager = sun.awt.X11FontManager
sun.io.unicode.encoding = UnicodeLittle
sun.cpu.endian = little
sun.desktop = gnome
sun.cpu.isalist =

DrScala configuration file
In resource bundle edu.rice.cs.drjava.config.options:
	nothing

In shadowed configuration:
key.delete.next = [shift DELETE]
key.delete.previous = [shift BACK_SPACE]
quit.prompt = false
default.compiler.preference = No Preference
window.height = 964
window.width = 958
window.x = 1
window.y = 52
window.state = 4
last.interactions.dir = <anonymized user.home>
tabbedpanes.state = 960 540 700 400
new.version.notification.last = 1503886416507


Used memory: about 17.06 megabytes
Free memory: about 335.44 megabytes
Total memory: about 352.50 megabytes
Total memory can expand to: about 6.96 gigabytes

Number of processors/cores: 8

Indentation Algorithm Needs Improvement

Primary Goal:

Task: Fix the indentation algorithm. Doesn't work well with comments and inner classes and anonymous inner classes.

//TODO: fill in with details, talk to Corky

Documentation is scattered and inconsistent in format

Primary Goal: Improve developer productivity and onboarding by producing more accurate and accessible documentation in the repository.

Task: At present, the repository's documentation is inconsistent in format and structure. There's no easy, organized way to view all documentation at present. It would be good for someone to propose a common format and structure for documentation and begin to systematically update and put together such documentation in an accessible manner.

New Interpreter

Task: We need a team to design and implement a new Interpreter using more up-to-date technology.

This will involve the "dynamicjava" package

We want to use jshell to support the new interpreter

//TODO: talk to Corky and update this with specifics for the project

Move DrJava to programmatic compilation

Background

"Prior to Java 6, DrJava was forced to treat Java compilers as
completely separate libraries that DrJava dynamically discovered in
the file system each time it was executed. It had to cope with the fact
that there were several different versions of Java in use and several different
compilers (with different APIs) for each version.

After Sun/Oracle became committed to supporting a solid comprehensive
open source implementation of Java and access to the compiler was
provided as part of the core Java libraries in Java 6, Sun/Oracle was
forced to release the compiler (perhaps without some proprietary bits)
to the open-source world. At this point, we could potentially change
course, but the funding for the DrJava project (which started in 2000)
ended before this juncture.

So we have limped along with the old framework. What I want to do now
is only support the compiler in the library of the running JVM. How
simple this approach is in principle in comparison to what DrJava has been
doing in the past. Most of the existing infrastructure can be
discarded if we can figure out how to cleanly cut it out. In some
sense, the default compiler will become the only compiler but it will
be accessed as part of the Java core libraries (namely in javax.tools),
which in principle is much simpler. There is no searching and only
one interface (as specified in Java documentation starting with Java
8). Programmatic access to the compiler was added to the Java
libraries in Java 6, but we only need to support Java 8+, and each
edition of Java typically adds more content (in backwards-compatible
fashion) so do not need to worry about the differences between Java 6
and Java 8. We can Java 8 as the standard to which we will program
and that content will be preserved in all future editions of Java (at
least that has been the mantra of the Java platform).

I suggest that we initially add support for the library compiler in place
of the existing default compiler embedded in drjava.jar (as tools.jar from
a particular open-source distribution)." -- Corky

TODO:

  • Research & Identify core tasks (maybe split this thread by sub-issue?)
  • Delegate responsibilities
  • Design & Implement solutions

DrJava at GMU: merge to GitHub

Hi DrJava Folks,

We have been using DrJava for a while at George Mason University and during the last couple years when there was not much activity on Source Forge, I downloaded the source and made some bug fixes and minor improvements for our students described here:
https://cs.gmu.edu/~kauffman/drjava/

I attempted to get some of these changes into the main branch by reporting the bug and the fix here:
https://sourceforge.net/p/drjava/bugs/955/

I would like to merge these changes into the main source and continue contributing. I have a student worker who is analyzing how to get Java 1.8 syntax support in the Interaction Pane and proper scaling/resolution on high DPI monitors.

My general approach will be to fork the repo and start some feature branches. When we have code that is ready I will issue a pull request on it. If you folks would prefer a different approach please let me know.

Thanks for the great tool and I'm glad to see that DrJava hasn't been abandoned.
Cheers,
Chris

Add LSP Support

Would love to include Java Langauge Server Protocol support for autocomplete and other features supported by LSP.

Annotations in functional java

The functional Java language level currently doesn't know what to do with annotations, which are a feature in Java 8. It is a minor improvement, but would make moving some code into functional Java easier, and allow for easier JavaDoc generation and more advanced usages of JUnit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.