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
2 answers

Java not realizing Int inside if has changed

My code is supposed to show up as a slot machine type background there are images in each lane not activated and when you press spin it randomizes which ones get to be visible and if they are not supposed to be visible they are set as invisible. My…
0
votes
1 answer

Extra Classpath In Eclipse Like DrJave

In my elementary/high school programming classes, we're moving from DrJava to Eclipse as primary IDE. I use SimpleTurtle to teach concepts. In DrJava, I just go to Preferences and add Extra Classpath. Boom, DONE! Students can then seamlessly use…
0
votes
1 answer

JavaFX not working on DrJava

I am trying to get to know and work with JavaFX using the DrJava IDE. However I cannot run any of the programs. I tried running the Hello World example, I receive the following error: Static Error: Undefined Class HelloWorld. It will compile and…
RPBruiser
  • 149
  • 1
  • 1
  • 13
0
votes
2 answers

Java cannot find parent class

I have this class, Person: public class Person{ String firstname; String lastname; public Person(String fname, String lname){ } public String toString(){ } } And this subclass, Student: public class Student extends Person{ …
KC McLaughlin
  • 246
  • 5
  • 12
0
votes
1 answer

How to verify an user input that can be a String (five) or a int (5)?

import java.util.Scanner; public class shirt { public static void main(String[] args) { Scanner userinput = new Scanner (System.in); String nbshirts; System.out.println("How many shirts do you have"); nshirts =…
Pal
  • 1
  • 1
0
votes
3 answers

Wrong shape when program run

import java.util.Scanner; public class Ideone { public static void main(String[] args) { int reader; Scanner kBoard = new Scanner(System.in); do { System.out.println("Insert a number of rows:…
0
votes
1 answer

Trouble with recursion. Why is this method compiling but crashing when I run it in my driver?

//Recursive method that takes your int, prints that number of stars. //I know that the first if statement isn't proper java format, but having nStars(n) on the same line as factorial = (n-1) gives me an error while compiling. public class…
Patrick Kelly
  • 53
  • 1
  • 4
0
votes
2 answers

Loop not giving the result wanted, stuck

import java.util.Scanner; public class Ve { public static void main(String[]args){ int hoyde; int linje = 0; Scanner tast = new Scanner(System.in); System.out.println("Hvor hoy skal din V bli?(mellom 2 og 10)"); hoyde =…
0
votes
1 answer

How can i make the program work with different variables without reseting it?

import java.util.Scanner; public class TemperaturTo { public static void main (String[] args ){ //lager en variabel for Fahrenheit / making a variable for Fahrenheit Scanner keyboard = new Scanner(System.in); System.out.println("Skriv…
0
votes
1 answer

The public type Manager must be defined in its own file

I get the error message that Error: The public type Manager must be defined in its own file Error: The public type Executive must be defined in its own file Error: The public type EmployeeDemo must be defined in its own file Is there an easy way…
user3294305
  • 41
  • 1
  • 1
  • 4
0
votes
2 answers

DrJava - an "Auto Import Claas" error

I'm a beginner at Java, when this was added; it gave me ab error, all in this picture! I Compiled then to Interactions
Sa77a
  • 93
  • 1
  • 5
0
votes
1 answer

"invalid header field" (in manifest?) when creating JAR

I'm an experienced developer, but with very little Java experience. At my work, I've inherited a small JNLP project that needs to operate outside the sandbox (all-permissions). With JDK 1.7.0_51, I gather we now need to put "Permissions:…
Joe Mabel
  • 1,372
  • 10
  • 29
0
votes
3 answers

DrJava switch(String) issue

DrJava is having problem compiling a very very simple switch statement. This is a simple example: switch (sc.next()) { case "abc": output = 0; break; case "bcd": output = 1; break; } DrJava returns the following message on the first…
0
votes
1 answer

Test Class, File Name

I wrote my code already and wrote a test class in Dr. Java. But how do I save this to have it compile and run. I keep getting " class TestGradeDistribution is public, should be declared in a file named TestGradeDistribution.java" but I have the file…
0
votes
1 answer

Java String character analysis

I'm writing a simple program in dr java to read a string and then compare the first and last characters. I tried to put some validation into it, but I'm having trouble with the syntax: 1 error found: File:…
thanatorr
  • 103
  • 1
  • 9