Quantcast
Channel: Java mon amour
Browsing all 1121 articles
Browse latest View live
↧

Image may be NSFW.
Clik here to view.

CDI in Java SE 8

In Eclipse (pueah, I know, IntelliJ is much better) create a simple Java project, give it the Maven feature, and create this structure:Add this...

View Article


H2 Database Tutorial

presentation here (English is iffy but content is good until half way, the rest forget it)Download it from here http://www.h2database.com/html/download.htmlgo to d:\apps\H2\bin and run h2.batthis will...

View Article


Apache Commons ContextedException

https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/exception/ContextedException.htmlDevelopers often forget to attach context information to their exceptions. So one gets...

View Article

Image may be NSFW.
Clik here to view.

Keycloak, cookies and principal

When you access a secured webapp, the first cookie to be created is a JSESSIONID /pvkeycloakdemo is my webapp root contextWhen you access a protected resource, you get redirected to keycloak...

View Article

ConEmu, better than Console2

If you are completely disgusted with Windows terminal (cmd, powershell, gitbash, far) consoles each running in a different window - and wasting hours having to identify the one you need - then you...

View Article


Wildfly 11 final: add-user miserably fails when run in git bash (and maybe...

$ ./add-user.sh Exception in thread "main" java.lang.IllegalStateException: WFLYDM0021: No java.io.Console available to interact with user.at...

View Article

Magic: convert CentOS 7 to Oracle Linux

I found this post https://www.digitalocean.com/community/questions/how-can-i-install-oracle-11gcurl -O https://linux.oracle.com/switch/centos2ol.sh chmod 777 centos2ol.shsudo sh -c ./centos2ol.shsudo...

View Article

Public fields in CDI

in CDI one can't have a PUBLIC attribute in a RequestScoped variable:@Named@RequestScopedpublic class EventViewBean implements Serializable { @Produces public List<Meal> meals; public void...

View Article


Adam Bien The Great airhacks links

Listening to Adam Bien SEMINAL videos, I will write down some links:http://www.adam-bien.com/roller/abien/entry/the_4th_airhacks_io_questionhttp://openjpa.apache.org/jest-usage.html maps JPA to REST...

View Article


MariaDB on CentOS 7

With Dockerhttps://hub.docker.com/_/mariadb/docker pull mariadbdocker run --name some-mariadb -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mariadb:tagport is 3306container linking : docker run --name...

View Article

Decrypting HTTPS traffic with Fiddler

A great feature provided by Fiddler (running only on Windows, though), and not available in Wireshark OOTB, is the ability to capture and DECRYPT HTTPS...

View Article

Not using SSL to connect to Maven? dilettante (=amateur) !

https://max.computer/blog/how-to-take-over-the-computer-of-any-java-or-clojure-or-scala-developer/If you want to play a trick on your friends, you can use Dilettante to man-in-the-middle a Maven...

View Article

PGP verification of Maven artifacts

I run the following commands:git clone https://github.com/gabrielf/maven-samplescd maven-samplesmvn com.github.s4u.plugins:pgpverify-maven-plugin:checkand I get this interesting results:Downloading:...

View Article


set -euf -o pipefail

https://sipb.mit.edu/doc/safe-shell/nice to read about shell scripting. DON'T USE SHELL, USE PYTHON INSTEAD.As mentioned in the article, you can use https://docs.python.org/2/library/subprocess.html or...

View Article

Image may be NSFW.
Clik here to view.

Remote debug Wildfly with Eclipse

./standalone.bat --debugThis generates JAVA_OPTS: "-Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true...

View Article


Image may be NSFW.
Clik here to view.

JSF crash course

Home page http://www.oracle.com/technetwork/java/javaee/javaserverfaces-139869.html , particularly this introduction https://docs.oracle.com/javaee/5/tutorial/doc/bnaph.htmlDecent introduction...

View Article

Firefox 57 and Tree Style Tabs BROKEN

It's amazing how much damage the new version of Firefox is inflicting to the user community.If you are a Tree Style Tab user and HATE seeing the tabs being displayed on top and left at same...

View Article


Image may be NSFW.
Clik here to view.

JPA, Hibernate, Dali and the Metamodel

When building Query criterias, you want to avoid using the String "email" to identify an Entity field... the day you change the field "email" into "mailaddress", your code still compiles but breaks in...

View Article

Image may be NSFW.
Clik here to view.

eclipse Deploy projects as compressed archives

After the N-th time I got the errorError renaming BLAThis may be caused by your server's temporary deploy directory being on a different filesystem than the final destinationsee this SO post...

View Article

Image may be NSFW.
Clik here to view.

Injecting Logger

According to https://docs.jboss.org/weld/reference/2.4.0.CR1/en-US/html/injection.html :import org.slf4j.Logger;@Named@SessionScopedpublic class CaloriesController implements Serializable { @Inject...

View Article
Browsing all 1121 articles
Browse latest View live