How to simplify the work with databases in Java app?

By using the Java Database Connectivity api you can simplify Java app work with databases greatly
08 August 2017   1831

Java

Popular general-purpose programming language and computing platform

Combining database with a Java application can be a complicated task. From one side, Java does not support multi-line string constants, so developers can end up with code that looks like this:

String sql_query = "select *" + "from user_table" + "where name like 'John%

This line of code is not "very pretty" but also has errors. Did you notice the missing space between user_table and where? A further challenge when working with SQL in Java is that we often need to build the SQL dynamically.

Java Database Connectivity (JDBC), is a standard Java API for database-independent connectivity between the Java programming language and a wide range of databases. Using JDBC one can send statements to almost any relational database. Thus, JDBC is a Java API for executing the SQL statements and supports basic SQL functionality.

So, what exactly JDBC do? Here's the list:

  • Making a connection to the database.
  • Creating SQL statements.
  • Executing SQL queries in the database.
  • Viewing and Modifying the resulting records.

Learn more about JDBC. You will be using Eclipse Kepler SR2, JDK 8, MySQL Database and Maven to create JDBC Query Builder.

Android-x86 8.1 Released

Let's see what team has made in the fresh release of Android to x86 port
17 January 2019   173

The team of the Android-x86 project, which is the independent community porting the Android platform for the x86 architecture, have published the first stable release of the assembly based on the Android 8.1 platform, which includes fixes and additions that ensure seamless operation on x86-based platforms. Universal Android-x86 8.1 Live-builds for x86 32-bit and x86_64 architectures suitable for use on typical laptops and tablet PCs are prepared for download. In addition, assemblies in the form of rpm-packages are available for installing the Android environment in Linux distributions.

Let's check new features:

  • Support both 64-bit and 32-bit kernel and userspace with latest LTS kernel 4.19.15.
  • Support OpenGL ES 3.x hardware acceleration for Intel, AMD, Nvidia and QEMU(virgl) by Mesa 18.3.1.
  • Support OpenGL ES 2.0 via SwiftShader for software rendering on unsupported GPU devices.
  • Support hardware accelerated codecs on devices with Intel HD & G45 graphics family.
  • Support secure booting from UEFI and installing to UEFI disk.
  • A text based GUI installer.
  • Add theme support to GRUB-EFI.
  • Support Multi-touch, Audio, Wifi, Bluetooth, Sensors, Camera and Ethernet (DHCP only).
  • Auto-mount external usb drive and sdcard.
  • Add Taskbar as an alternative launcher which puts a start menu and recent apps tray on top of your screen and support freeform window mode.
  • Enable ForceDefaultOrientation on devices without known sensors. Portrait apps can run in a landscape device without rotating the screen.
  • Support arm arch apps via the native bridge mechanism. (Settings -> Android-x86 options)
  • Support to upgrade from non-official releases.
  • Add experimental Vulkan support for newer Intel and AMD GPUs. (Boot via Advanced options -> Vulkan support)
  • Mouse integration support for VMs including VirtualBox, QEMU, VMware and Hyper-V.

Get more infoand download links at official website of the project.