My understanding of Volatile keyword in Java

Instead of doing this:
class myRefBool
Boolean b = false;

You could just do this:
public volatile Boolean myRefBool

public class Foo extends Thread {
  private volatile boolean close = false;
  public void run() {
    while(!close) {
      // do work
  public void close() {
    close = true;
    // interrupt here if needed

Maven Command Line org.joda.time.LocalTime

Maven COMMAND LINE Quick Reference:

Lets say your class is located in:
And that your package declaration was:
package hello;

Compile, package, and run, if you have NO library dependencies:
mvn compile
mvn package
cd C:/PRJ_ROOT/classes/
java -cp . hello.HelloWorld
//NOTE: Directory is NOT C:/PRJ_ROOT/classes/hello because
//We need to have cd point to root of where package starts.

//IF YOU HAVE DEPENDENCIES in your project, running this way will NOT work
//Well, it could if you hand-paste the .jar files you need into the class folder.
But that defeats the point of maven being a build tool if you are going to do something manual like that.

The example at:
That uses: import org.joda.time.LocalTime;
Will not run using:
java -cp . hello.HelloWorld

Run maven build when you have library dependencies:
Step1: Move project root on command line:
I.g: cd C:/PRJ_ROOT

Step2: Choose how you would like to run:
Without arguments:
mvn exec:java -Dexec.mainClass=”hello.HelloWorld”

With arguments:
mvn exec:java -Dexec.mainClass=”hello.HelloWorld” -Dexec.args=”arg0 arg1 arg2″

With runtime dependencies in the CLASSPATH:
mvn exec:java -Dexec.mainClass=”hello.HelloWorld” -Dexec.classpathScope=runtime

Spring MVC Controllers are singletons

Spring MVC Controllers are singletons

This means, I can’t store session/state information in them…
How do I do that? I am about to give up and do a JAVASCRIPT front end
for now…

Confirming that spring MVC controllers are singletons:
What do you do when you have more than one user on them?

Server vs Servlet?

this is interesting:
In MVC, Jsp acts and a view and a servlet acts as a controller.
JSP can run JavaScript.
(So JSP + AJAX == YES??)

in short: servlets should be used if you have more java than HTML and JSP should be used if you have more HTML than java

A JSP technically gets converted to a servlet but it looks more like PHP files where you embed the java into HTML.

is very common to combine servlets and JSP so that the initial request gets sent to a servlet which does some java work and then forwards it to a JSP which actually makes the HTML output.

A Servlet is mainly used to extend the functionality of server while JSP serve as the view.

This also:

Question: Do servlets run on the same server?

Smack A UI onto an existing application:

Maybe via using a view resolver?

Is there a simpler way for now?

Here is the question I want, with some valid answers, but none of them using spring MVC:
Uses SWING components. Looks like it could be practical.

This uses WindowBuilder / SWT. And does what I’d like I think.
Java #E3: Creating a GUI with Eclipse

This looks like a Java Applet. No go with that.

Unfortunately, this uses ANGULAR. But also uses spring:
Multiple UI Applications and a Gateway: Single Page Application with Spring and Angular JS Part VI

Adding GUI to existing console program. (What I need)
Looks like I need to research writing event listeners?

Writing Event listeners:

Swing Tutorials:

Swing however looks like it is applet/desktop based… We want something browser based.

Maybe figure out how to hook a .JSP page into the console program?

…Servlets are… .JSP files??

Use existing web service in .JSP Page
Tells me the web service needs a WSDL file.
That I can click on and do RightClick –> Generate JCX

What I think I need:
make ajax call to existing web service, eclipse

Java Spring: Getting started making a rest service:

I actually want to use pre-existing service…

Not quite what I want:
Spring MVC 4.0: Consuming RESTFul Web Services using RestTemplate

Maybe I need to look into SPRING MVC UI components? <<no luck here.

My story needs to be simplified….
Just smack a UI onto the existing recruiter-client and candidate-clients.

Before you bounce, mail to yourself.

It was a lot of work to get to this step. Partially because I’ve never done this before and I had
to think of how I was going to do it.

Making note of the calls I used:
//first call posts a message. Tags who it is from, and who it is to.
//second call gets a message. To get the message, you need to identify who you are
//and who the message is from.

Basically, the gauntlet will communicate via RESTFul get api like this.
Using a “PO Box” method. This is 1 way communication. But should be enough
for the testing application. After I finish this project, learning about sockets would be good.