Questions tagged [drjava]

A lightweight IDE for java, designed primarily for students

DrJava is a lightweight development environment for writing Java programs.

It is designed primarily for students, providing an intuitive interface and the ability to interactively evaluate Java code. It also includes powerful features for more advanced users. DrJava is available for free under the BSD License, and it is under active development by the JavaPLT group at Rice University.

For more information and downloads, visit the official site.

188 questions
0
votes
1 answer

Cannot reference external types in Java

I'm trying to use the special type QuickUnionPathCompressionUF (which is a class in a file called algs4.jar), but the compiler complains. I'm using DrJava as an IDE. error: QuickUnionPathCompressionUF cannot be resolved to a type My source file…
user1505713
  • 615
  • 5
  • 20
0
votes
4 answers

My Java program isn't printing results from the query I made to MySQL

I made a program that makes a simple GUI for a login form. Just for testing purposes I made it so when you click the "Login" button, Java should just print out the query results from MySQL database. In MySQL I have a database schema called "test"…
Angelo Rivera
  • 191
  • 1
  • 2
  • 7
0
votes
1 answer

Is there any way to stop DrJava without losing the error messages in the interactions pane?

I'm having an issue right now with some runaway code (not quite sure if it's stuck in a loop) and I'd like to be able to see the error messages DrJava is giving. However, when I click the "Reset" button, it wipes all the information from the…
Chris Middleton
  • 5,654
  • 5
  • 31
  • 68
0
votes
1 answer

Need help fixing a try, catch error

I am trying to write a method that prints information into an array. the directions are: Create a second method for WordPath: makeWordArray that takes a String file name as input, and it returns either an array or an ArrayList that stores WordData…
cmart
  • 91
  • 2
  • 12
0
votes
1 answer

enter a string from the keyboard and check how many vowels are available and extarct the middle character of the string

The assignment asks that a method returns the value true if a given character is a vowel, and otherwise returns false. Then to test that method by asking the user for a String, and checking each characters of the String the user entered, returning…
0
votes
1 answer

Need help changing a button background

I am writing a program a lot like connect four and need to change the background of 4 buttons when a certain word is spelled (TOOT or OTTO). Currently my code is not changing the background. Any help would be great. import…
cmart
  • 91
  • 2
  • 12
0
votes
1 answer

Why won't drjava allow me to create a jar file?

I'm making a JApplet and need to make a JAR file to connect to a .htm file with the applet tag. The simple solution I could think of was to use the tool in drjava that says "Create Jar File From Project..." but alas, it's not highlighted for some…
crarho
  • 119
  • 2
  • 9
0
votes
1 answer

DrJava set environmental variable

I'm using DrJava for a simple java project and but need to set the environment variable R_HOME. Can somebody tell me how to do this? I can do it in the command line and test it using: String environmentVariable =…
Neil
  • 1
0
votes
4 answers

Why won't my loop stop; seemingly despite boolean expression

So my program runs and draws a row of diamonds starting at the top right. It then moves down a row and repeats. It SHOULD stop at 4 rows (due to canvas size) but it won't! First for statement draws a diamond. Second for statement moves to the next…
Michael MacDonald
  • 413
  • 2
  • 6
  • 17
0
votes
1 answer

why when trying to create a jar file my cmd says it cannot recognize the command?

I am unable to to get my already complied and saved .java file will not be complied in the cmd and it will not allow me to create a .jar file because the terminal is telling me'jar' is not a recognized as an internal or external command, operable…
user1469139
  • 13
  • 1
  • 9
-1
votes
2 answers

The latest version of Java for DrJava.org

When I visit java.com it says that the latest version is Version 8 (Updated 251) and when I visit Oracle it says the latest version of jdk is 14.0, which one of these do I need to install to run java codes on Dr Java?
user22546
  • 101
-1
votes
2 answers

Converting lines of text from a file to String Array

I read the information in a .txt file and now I would like to store the lines of information from the text into a String Array or a variable. The information in the .txt file is as given: Onesimus, Andrea BAYV Twendi, Meghan RHHS Threesten,…
Christian
  • 9
  • 1
-1
votes
3 answers

How to pass an object as a parameter in java and compare values of some it to another object

I'm an APCS student and currently we are learning to build classes. In the code below, I've written most of the methods we need like setGpa,setName etc. I need help with the last methods which is compareToStudent. This method is intend to be used…
Aditya Sood
  • 1
  • 1
  • 2
-1
votes
1 answer

i keep getting the good bye response no matter if i input yes or no, how would i change that so responses are correct

I keep getting the 'good bye' response no matter what I enter, 'yes' or 'no'. How would I change that so responses are correct. import java.util.Scanner; public class SimpleQuiz1 { public static void main(String[] args){ Scanner…
Marzy
  • 1
-1
votes
1 answer

Java while loop not working with input checking of characters

The code below is from a game in which I need to generate 2 random numbers in java, and the user is presented with one of them. They then have to guess if the second number is higher or lower than the first. I created a while loop to check for…