Skip to content

Comparing multiple integers in IF statement, Java

I am brand new to coding. I’m currently using “Java:How to program” by Deitel, and one of the early exercises has me stumped. It is asking me to use simple, chapter 1 if statements to compare 5 integers (input by the user) and display both the largest and the smallest. I am limited to the la…

JavaFx equivalent of Swing JFrame

I am learning JavaFX. I have encountered a problem; I cannot figure out what is the equivalent of a Swing JFrame in JavaFX. Is it the Scene or the Stage? Answer The equivalent of a Swing JFrame in JavaFX is the Stage class which extends from Window and can be made visible by calling show() method. The Scene i…

JRE issue with getting Spring Tool Suite installed

I downloaded Spring Toolset 3.6 from here: Unzipped it, launched sts.exe and got this error: I have following version of (32 bit) java I tried adding the following 2 lines to the top of the STS.ini: and got this error: Tried adding an Env variable: …same error when I opened up the Java Control panel, I …

Spring boot not executing schema.sql script

I’m developing a Spring Boot web application and want to create a MySql database if it’s not already created. So I’ve done a dump of my current database in order to have an empty schema of it. Put it in /src/main/resources, so maven brings it to /WEB-INF/classes when building the war file. T…

Maven: No sources to compile

I am following the ‘Build Java Projects with Maven’ (https://spring.io/guides/gs/maven/#scratch) and when I run ‘mvn compile’ from /Users/Misha/Desktop/src/main/java/hello, I get this prompt: I have the two java files and the xml file in the hello directory, and I am assuming that I sh…