Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Java instructions in README #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 3 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,27 +310,9 @@ java -version
```
We will use version 21 of Java.

You might chose to solve the labs in Java. In this case you need:

- The java compiler `javac`.
- Parser generator: either [ANTLR](https://www.antlr.org/) or the
[CUP](http://www2.cs.tum.edu/projects/cup/) libraries version 0.11b.
- Lexer generator [JFLex](https://jflex.de/) or the [JLex](https://www.cs.princeton.edu/~appel/modern/java/JLex/) libraries.

To set up CUP and JLex, follow these instructions:

1. Download the JAVA archives for
[CUP v11b](https://github.com/BNFC/bnfc/raw/master/testing/data/java-cup-11b.jar),
[CUP v11b runtime](https://github.com/BNFC/bnfc/raw/master/testing/data/java-cup-11b-runtime.jar),
and
[JLex](https://github.com/BNFC/bnfc/raw/master/testing/data/JLex-1.2.6.jar).

2. Make sure they are placed in your `CLASSPATH`.

For example, in Linux or macOS, store these jars in `${HOME}/java-lib/` and add the following line to your shell initialization file.

export CLASSPATH=.:${HOME}/java-lib/java-cup-11b.jar:${HOME}/java-lib/java-cup-11b-runtime.jar:${HOME}/java-lib/JLex-1.2.6.jar:${CLASSPATH}

You might chose to solve the labs in Java.
In this case, you need the Java Development Kit (JDK). You can get all neccessary Java dependencies by installing `openjdk-21` (e.g. with a package manager on Linux/macOS or by downloading [here](https://learn.microsoft.com/en-us/java/openjdk/download) on Windows).
We publish Java stubs for the labs that use [Gradle build tool](https://gradle.org/), preconfigured to install the Java parser generator [CUP](http://www2.cs.tum.edu/projects/cup/) and the lexer generator [JFLex](https://jflex.de/). If you use the stubs, there is not need to install Gradle, CUP and JFlex yourself.

# Student representatives

Expand Down