User Tools

Site Tools


java_jetty_server_on_metaarray

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
java_jetty_server_on_metaarray [2022/01/20 22:21] peteyboyjava_jetty_server_on_metaarray [2022/01/21 00:40] – [Run Your Server] added ending peteyboy
Line 103: Line 103:
  
  - Using an editor again, create your hello world class file, in its proper folder for maven:  - Using an editor again, create your hello world class file, in its proper folder for maven:
-    - ''nano src/main/java/myproject/helloWorld.java+    - ''nano src/main/java/myproject/helloWorld.java''
     - paste in the following: <code java>     - paste in the following: <code java>
 package myproject; package myproject;
Line 134: Line 134:
   [INFO] Finished at: 2022-01-20T21:04:04Z   [INFO] Finished at: 2022-01-20T21:04:04Z
   [INFO] ------------------------------------------------------------------------   [INFO] ------------------------------------------------------------------------
 +  
 +  
 +===== Run Your Server =====
  
 +Now, let's run the server. We've set up an "exec goal" in the pom so we can run the resulting project from maven, like so:
  
 +  mvn exec:java
 +  
 +You should see something like this:
  
 +  WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
 +  WARNING: All illegal access operations will be denied in a future release
 +  [INFO] Scanning for projects...
 +  [INFO] 
 +  [INFO] ------------------< myproject.helloWorld:helloWorld >-------------------
 +  [INFO] Building helloWorld 1.0.0-SNAPSHOT
 +  [INFO] --------------------------------[ jar ]---------------------------------
 +  [INFO] 
 +  [INFO] --- exec-maven-plugin:3.0.0:java (default-cli) @ helloWorld ---
 +  [myproject.helloWorld.main()] INFO io.javalin.Javalin -  
 +         __                      __ _            __ __
 +        / /____ _ _   __ ____ _ / /(_)____      / // /
 +   __  / // __ `/| | / // __ `// // // __ \    / // /_
 +  / /_/ // /_/ / | |/ // /_/ // // // / / /   /__  __/
 +  \____/ \__,_/  |___/ \__,_//_//_//_/ /_/      /_/  
 +  
 +          https://javalin.io/documentation
 +  
 +  [myproject.helloWorld.main()] INFO org.eclipse.jetty.util.log - Logging initialized @2496ms to org.eclipse.jetty.util.log.Slf4jLog
 +  [myproject.helloWorld.main()] INFO io.javalin.Javalin - Starting Javalin ...
 +  [myproject.helloWorld.main()] INFO io.javalin.Javalin - You are running Javalin 4.3.0 (released January 13, 2022).
 +  [myproject.helloWorld.main()] INFO io.javalin.Javalin - Listening on http://localhost:32056/
 +  [myproject.helloWorld.main()] INFO io.javalin.Javalin - Javalin started in 263ms \o/
  
 +Now try it out! point your web browser to //http://yourusername.yourSDFmetarraydomain.org:yourMetaArrayPort // and see it if works!
  
 +Press ''ctl-c'' to stop the server. 
  
 +The rest is up to your imagination!
  
java_jetty_server_on_metaarray.txt · Last modified: 2023/04/27 18:26 by peteyboy