Blog Posts
You have landed on our blog, welcome! Here you will find exciting articles on the topics of java, OSGi, Eclipse, BND and much more. For example, take a closer look at our series “Bits Of Java”. Besides the basics, you will find useful tips for solving challenging problems with Java. And now: Have fun reading and deepening your knowledge.
-
Bits of Java – Episode 11: Compare and Search in Arrays
This week I would like to talk about two methods of the Arrays class which I was not familiar with, and whose logic can be a bit tricky: Arrays.binarySearch and Arrays.compare. But first, let me briefly review what an array is. An array is a memory section which is reserved... [more]
-
Bits of Java – Episode 10: String Pool
Today we will discuss about the String Pool. What is it? Well, in the last post we talked about the fact that String are immutable, and that every time you manipulate a String you are actually creating a new object in memory, which is, for sure, not the most efficient... [more]
-
Bits of Java – Episode 9: String vs StringBuilder
In this post I would like to review the difference between String and StringBuilder. The main difference between the two is that String is immutable, StringBuilder is not! What does immutable mean? Well, it simply means that when you try to manipulate an immutable object what you are actually doing... [more]
-
Bits of Java - Episode 8: Labels in Loops
This week’s topic will focus on the use of labels in loops. Did you know that you can use labels to identify your loops? I, for sure, did not know that! It’s true that is not very common, because in most of the cases they decrease your code readability, which... [more]
-
Bits of Java – Episode 7: The switch Statement
This week I will try to describe the switch statement, focusing in particular to which kind of variables are allowed to be used with such statement. This is one of the Java features that changed a lot over the different releases, thus I hope also some of the most experienced... [more]
-
Bits of Java – Episode 6: Logical Operators and their Short-Circuit Version
Before starting preparing this exam, I had always used the logical operators && and ||, which you all probably are familiar with. For those who are not, both are binary operators, where the two operands are boolean expressions. The first one returns true if and only if both the operands... [more]
-
Bits of Java – Episode 5: Numeric Promotion
This week we will talk about numeric promotion. With this term we identify the process for which the compiler promotes a numeric type to a different one. As you probably already know, this can happen using casting. On the other hand, there are some cases in which the compiler automatically... [more]
-
Bits of Java – Episode 4: Overflow and Underflow
This week I would like to talk about what happens when you force a value, which is outside the range of a certain primitive type, to be of that type. That sounded like a tongue-twister, didn’t it? Let me remind a few concepts before. You are probably all familiar with... [more]
-
Bits of Java - Episode 3: Garbage Collection
In this episode we will talk about one of the features that distinguishes Java from a lot of other programming languages out there: the concept of garbage collection. In other languages, such C for instance, you should take care of disposing objects that you do not need anymore, in order... [more]
-
Bits of Java – Episode 2: The var keyword
In this episode I would like to talk about the var keyword, which has been introduced in Java 10, and can be used instead of the type under certain conditions. When declaring a variable in Java, we need to specify what type of variable we want, right? int number =... [more]
-
Bits of Java – Episode 1: One-line-source-code
As anticipated in my last blog, I would like to start a series of posts to share some features of Java 11 I am learning while studying for the Oracle Certification (JavaSE-11 Programmer I). This week we start with the one-line-source-code. As you probably all know, the standard way to... [more]
-
Bits of Java
It has been almost one year and a half since I arrived at Data In Motion, where I started my career as a software developer. I had some programming experience from my academic background, but I never used Java before. As the majority of the developers do, also at Data... [more]
-
Why you should train yourself first with Machine Learning
Nowadays Machine Learning is one of the coolest topics when dealing with data analysis and software development, and everyone who can throw some Machine Learning related concepts in a conversation is seen immediately under a brighter light. Indeed Machine Learning is a really powerful tool, and can help solve a... [more]
-
The native bnd Workspace and Maven
NOTE: If you are looking information about the bnd-maven-plugin or bnd-export-maven-plugin this is the wrong article. Have a look here and here to find examples and the documentation of the plugins. Preamble This article will describe the following things: The difference between the aQute.bnd.repository.maven.provider.MavenBndRepository and the aQute.bnd.repository.maven.pom.provider.BndPomRepository How to deploy... [more]
-
Starting bndrun files using Gradle
Running bndrun files using gradle Bnd provides gradle tasks to run bndrun files and start an application. When listing all gradle tasks using gradlew tasks, you will find the bndrun tasks in the exports section of the list. Usually the tasks look like run.<bndrun-file-name>. If you want to start you... [more]
-
OSGi Configuration Admin and Plugin start ordering
The current ConfigurationAdmin specification can be found here: https://osgi.org/specification/osgi.cmpn/7.0.0/service.cm.html One feature of this specification is the Configuration Plugin. An implementation can be used to participate in the configuration process. You can e.g. add new properties or modify existing properties for a configuration. A use case could be to substitute credential... [more]
-
Bootstraping OSGi Applications with the Gecko.io Runtime Exporter
We recently updated our documentation for the Gecko.io runtime project. The Gecko.io Runtime contains small helpers to improve the handling of your OSGi application in production environments and development. The org.gecko.templates project contains bndtools project templates, to ease the creation of project within your Eclipse IDE. Our org.gecko.runtime.boot registers some... [more]
-
Resolution failed. Capabilities satisfying the following requirements could not be found and how to read it!
Before we start: The Resolver works with the Requirements and Capabilities of OSGi and I strongly suggest to have a look at them, if you work with the Resolver. To give an Answer to the question above, we take the following example output: Resolution failed. Capabilities satisfying the following requirements... [more]
-
A bit of Queuing Theory
We are developing a tool which allows, once an EMF model is created, to test and validate it in a reliable and efficient way. We did that by exploiting the potential of the Alloy Language and its powerful Alloy Analyzer. When you build a model to describe a process or... [more]
-
How can I trigger an export to a selfexecutable jar with gradle?
Run ./gradlew export. If the Build was successfull you will find the the result in generated/distribution/<yourBndrunFileName>.export directory. Note, that the bndrun must reside in a bnd project with a bnd.bnd in it. For more FAQ see: The Gecko Documentation Project by Ilenia Salvadori, Mark Hoffmann, Jürgen Albert [more]
subscribe via RSS