# How to run ProfessorJ code in DrRacket?

**URL:** <https://racket.discourse.group/t/how-to-run-professorj-code-in-drracket/3117>\
**Category:** Questions & Answers\
**Created:** [August 21, 2024, 9:33pm UTC](https://racket.discourse.group/t/how-to-run-professorj-code-in-drracket/3117 "2024-08-21T21:33:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayo](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/ayo/32/1795_2.png) [@ayo](https://racket.discourse.group/u/ayo)\
**Post date:** [August 21, 2024, 9:33pm UTC](https://racket.discourse.group/t/how-to-run-professorj-code-in-drracket/3117/1 "2024-08-21T21:33:11Z")

</div>

I am following HtDC but I have not been able to run ProfessorJ in DrRacket. The [profj docs](https://docs.racket-lang.org/profj/) make it look simple, but I can't tell what I'm doing wrong.

 ![image](https://global.discourse-cdn.com/free1/uploads/racket/original/2X/8/8926a733b4ffd5d710c4aae90213591328f9762e.jpeg)

Please how do I do this successfully?

---

<div class="post-metadata">

**Author:** ![EmEf](https://avatars.discourse-cdn.com/v4/letter/e/53a042/32.png) [@EmEf](https://racket.discourse.group/u/EmEf)\
**Post date:** [August 21, 2024, 10:06pm UTC](https://racket.discourse.group/t/how-to-run-professorj-code-in-drracket/3117/2 "2024-08-21T22:06:34Z")

</div>

While I can get simple Java to run, I think something about the setup is broken.

Here is a proper use of ProfJ:

```scheme

#lang profj/beginner

class Coffee
{ int price;
  Coffee(int price) {
  this.price = price;
}
}

class Example
{
   Example() {
}

  Coffee c = new Coffee(10);
}

```

Yes, clicking RUN works and the REPL prompt shows up.  
No, the automatic instantiation of `Example` — promised in old documentation — does _not_ show up.

;; - - -

My recommendation is to read HtDC but use a modern IDE.  
ProfJ implements a variant of an old version of Java.  
When Kathy created profJ, it was difficult to interact with Java.  
It was difficult to cope with Java’s wordiness.  
Modern IDEs and Java itself have eliminated most of the  
short-comings alluded to in the book …

What you wil get out of the book is a proper sense of OO design in Java.

What you won’t get out of the book are the details needed to program in modern Java.

— Matthias

---

<div class="post-metadata">

**Author:** ![ayo](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/ayo/32/1795_2.png) [@ayo](https://racket.discourse.group/u/ayo)\
**Post date:** [August 21, 2024, 10:21pm UTC](https://racket.discourse.group/t/how-to-run-professorj-code-in-drracket/3117/3 "2024-08-21T22:21:19Z")

</div>

Thanks! I appreciate this.

---

<div class="post-metadata">

**Author:** ![usao](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/usao/32/1375_2.png) [@usao](https://racket.discourse.group/u/usao)\
**Post date:** [August 22, 2024, 2:28am UTC](https://racket.discourse.group/t/how-to-run-professorj-code-in-drracket/3117/4 "2024-08-22T02:28:00Z")

</div>

[This looks like “won’t fix”](https://github.com/mflatt/profj/commit/cf2a5bd0c3243b4dd3a72093ae5eee8e8291a41d).

---

<div class="post-metadata">

**Author:** ![robby](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/robby/32/7_2.png) [@robby](https://racket.discourse.group/u/robby)\
**Post date:** [August 22, 2024, 1:07pm UTC](https://racket.discourse.group/t/how-to-run-professorj-code-in-drracket/3117/5 "2024-08-22T13:07:18Z")

</div>

Should we remove proj entirely, or try to do something so that programs run, but the test cases don't have DrRacket integration anymore?

---

<div class="post-metadata">

**Author:** ![robby](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/robby/32/7_2.png) [@robby](https://racket.discourse.group/u/robby)\
**Post date:** [August 22, 2024, 1:07pm UTC](https://racket.discourse.group/t/how-to-run-professorj-code-in-drracket/3117/6 "2024-08-22T13:07:44Z")

</div>

Oh, and is there a latest known version where profj works so that we can mention that somewhere, perhaps in the book?

---

<div class="post-metadata">

**Author:** ![EmEf](https://avatars.discourse-cdn.com/v4/letter/e/53a042/32.png) [@EmEf](https://racket.discourse.group/u/EmEf)\
**Post date:** [August 22, 2024, 1:40pm UTC](https://racket.discourse.group/t/how-to-run-professorj-code-in-drracket/3117/7 "2024-08-22T13:40:26Z")

</div>

— Given the struggles our students had with editing ProfJ code in DrRacket, I think it is not worth the effort.  
— And you assume that I can still render the book 🙂

---

<div class="post-metadata">

**Author:** ![robby](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/robby/32/7_2.png) [@robby](https://racket.discourse.group/u/robby)\
**Post date:** [August 24, 2024, 3:38pm UTC](https://racket.discourse.group/t/how-to-run-professorj-code-in-drracket/3117/8 "2024-08-24T15:38:21Z")

</div>

Well, I looked briefly into the current state and it looks like there are also problems with the colorer, alas.
