Connecting remotely to a local MySQL Server
Random Thoughts on Java Programming
by
1M ago
So I tried it, and it works. Here's some notes. ssh -N -L 3306:127.0.0.1:3306 mrbear@bears.jelastic.eapps.com -p 3022 mysql -u root -p mrbeardb —port=3306 References Linuxize - How to Connect to MySQL through SSH Tunnel https://linuxize.com/post/mysql-ssh-tunnel ..read more
Visit website
Installing GraalVM on Linux using Alternatives
Random Thoughts on Java Programming
by
1M ago
Was looking for how to install GraalVM on Linux using the Alternatives system. I've already looked at sdk-man on my MacBook PRO, which works fine. I found the references below. References [1] GraalVM - Installation on Linux Platforms https://www.graalvm.org/22.3/docs/getting-started/linux/ [2] How to Install GraalVM Community Edition on Linux https://gist.github.com/ricardozanini/fa65e485251913e1467837b1c5a8ed28 ..read more
Visit website
Upgrading to Jakarta 10
Random Thoughts on Java Programming
by
1M ago
Writing some notes here on what I had to do to get things running on Jakarta 10. I've started upgrading as my application server (Payara) came out with a version that is Jakarta 10 compatible (release 6). See [1]. I'm using the Payara Micro to deploy my apps. Things done Change imports Here's a list of all the imports I had to change. It's likely not interesting, but sometimes I just like to write stuff down. Type Javax import Jakarta import Jakarta Persistence import javax.persistence.* import jakarta.persistence.* Jakarta Security import javax.security.enterprise.credential.* import ja ..read more
Visit website
Jakarta 10
Random Thoughts on Java Programming
by
1M ago
So, yay, my homebrew hobby project is now Java 17 and Jakarta 10 and Microprofile 5 running on Payara Micro 2022.6.1. I found a good writeup here on what actually Jakarta 10 is. I also found something about what sort of Maven archetype to use. I'll write a blog post on what I had to do to upgrade. It wasn't much, but I decided to make some changes unrelated to Jakarta as well. References Payara - Jakarta EE 10: Frequently Asked Questions (FAQs) https://blog.payara.fish/jakarta-ee-10-java-ee-j2ee-frequently-asked-questions Mastertheboss - A Maven starter for Jakarta EE projects http://www.maste ..read more
Visit website
Null handling in Kotlin
Random Thoughts on Java Programming
by
2M ago
Just some notes, as I find myself forgetting the Null-safety features of Kotlin. Actually, most of the text in this blog is basically already written in [1], so you might want to check there as well. So, there are three possibiltiies: // always has a value: val name: String = "Mrbear" // always has a value: val sometimesName: String? = null // function in java, so no clue what it might be: val date = LocalDate.now() // the return value shows up in IntelliJ hints as LocalDate! You can use if statements, of course, to check for nulls. Sometimes this doesn't work, because it might be immutable ..read more
Visit website
Git 2.23 Adds Switch and Restore Commands
Random Thoughts on Java Programming
by
2M ago
Just a little blurb from me on how to deal with branches with the "switch" command. I was still used to the "checkout" command. # show all branchesgit branch # create local branch from integration, and switchgit switch -c integration origin/integration# switch back to the mastergit switch master # switch to integrationgit switch integration# remove old local branch v0.0.1git branch -d v0.0.1 References InfoQ - Git 2.23 Adds Switch and Restore Commands https://www.infoq.com/news/2019/08/git-2-23-switch-restore ..read more
Visit website
Why do I write this blog?
Random Thoughts on Java Programming
by
2M ago
I came across two Twitter feeds (is that the word?) that mirrored my thoughts on why I write this blog. Camille Fournier I love how many blog posts I ave that are 80% complete and will probably have to be completely rewritten to actually be complete. Ugh. Writing. Brian Goetz You've fallen for your own Jedi mind trick, which is that you are writing for others. Really, its about organizing, validating, and sharpening your thinking, and the pot of "likes" at the end of the rainbow is just motivation. In the end, it's mostly for you. So, success ..read more
Visit website
J-Fall 2022 Writeup
Random Thoughts on Java Programming
by
3M ago
I went to J-Fall 2022 on the 3d of November 2022. I attended the following sessions: Pattern Matching: Small Enhancement or Major Feature? - Hanno Embregts Peter Wessels I enjoyed it immensely. Design Patterns in the Light of Lambda Expressions - Venkat Subramaniam It was pretty good. An eyeopener was replacing Autoclosable with Lambdas, that was fun. Java Next - From Amber to Loom, from Panama to Valhalla - Nicolai Parlog Great overview of what's coming. Effective Developer Testing: taking it to the next level - Maurício Aniche He had some thoughts on tests that I didn't think of before. Mod ..read more
Visit website
Maven: Where did it come from?
Random Thoughts on Java Programming
by
3M ago
Just a small note. So, I started using StringUtils in my code. It's from the apache.commons.lang3 package. Then I noticed that I am not actually using this dependency in my pom. So I'm using a transitive dependency, which is basically a bad habit, as this transitive dependency can suddenly change. So I need to find which transitive dependency it is, and add it to my local pom, just to be sure. The Maven dependency in question is: org.apache.commons:commons-lang3:3.4 A little research and it turns out mvn dependency:tree is very nice. You get something like: So, as it turns out commons-lang3 is ..read more
Visit website
Entity-Relationship Diagrams
Random Thoughts on Java Programming
by
3M ago
I tend to forget what the arrows mean in an entity-relationship diagram. Example In the diagram above, there's strong limitations on the values possible in the GuildMember table. Unfortunately, these cannot be expressed in Foreign Key Relationships. For example: a Person can hold only one rank in a Guild. a Person can only be a GuildMember in a Guild once. The way to fascilitate this, is to put a unique index on GuildMember regarding the columns GUILDNR and PERSONNR. References PlantUML - Entity Relationship Diagram https://plantuml.com/ie-diagram LucidChart - Wat is een Entity Relationshi ..read more
Visit website

Follow Random Thoughts on Java Programming on Feedspot

Continue with Google
OR