David Garratt

Ranch Hand
+ Follow
since Aug 08, 2003
David likes ...
Mac Eclipse IDE Safari
Peterborough, UK
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David Garratt

I’ve been searching without success. Lots of references to tool chains which are not relevant as I’m not compiling native arm code - just java bytecode.
1 month ago
Is the current version of Eclipse available on the Raspberry Pi arm CPU ?
1 month ago

Stephan van Hulst wrote:It really depends on what kind of application you want to make. Do you want it to be a webapp? Is it a desktop app? On what device do you want to run the app?

The application is a desktop Swing application and you can see the look of it from this page. Website

Ideally it would be nice to keep it consistent but if it's not possible then I will work with what can be done.


1 month ago
Ok - so I'm not talking about Collections or anything like that. I'm talking about a Map in the same manner as Google Maps (Plans) etc- which can be quite problematic when searching on the internet for help.

I have a Java Swing application which I want to record the physical location of an object on a map (diagram). I am wondering if I might do this with Java Swing using an Frame, Scroll Panel and Image - or use the approach of opening up a web browser with url parameters which indicate the name of the map and some co-ordinates which would be retrieved from my database.

I appreciate it's a blank canvass at the moment (no phun intended) but would welcome any ideas from anyone who might have done something similar.

Many thanks

1 month ago
I just wondered why they have 2 versions if they are so similar but I will have to try and see.
3 months ago
I am working with a large Java Swing (not spring) desktop application which currently used Oracle Java 8 (202) and I'm contemplating moving on to AdoptOpen Java 8 but I'm not clear which of the OpenJ9 or Hotspot would best suit my needs. My application is a MDI type of application which can have a lot of screens open with jdbc database connections. I would would give greater priority over memory handling and stability/compatibility over performance if any of those metrics are relevant.

Also do I need to watch out for any compatibility issues ?

Many thanks

3 months ago
i'm in the process of migrating a servlet from being based on Java 8 & Tomcat 8.t to Java 11 and Tomcat 9

Now - I have it working but I'm not sure if I've picked the correct jars.

As Java 11 does not include some of the older Java 8 packages I have had to resolve problems with it not finding JAXB

After Googling around I've found "jaxws-ri" and "jaxb-ri" and also references to "metro" which is all rather confusing.

My servlet does not do much and it reads an xml with config information at start up.

Could someone be kind enough to give me a heads up as to what I should be downloading to resolve my broken / missing API

Within the download I found for "javaws" I find all of these files.

Within the download I found for "jaxb-ri" I find all of these files.

It should be noted that I'm not using Maven in my project.

Many thanks

6 months ago

Claude Moore wrote:Try to use CONVERT_TZ function when both writing and reading your table, so that data are always referring to the same timezone.

Thanks for this.

Further testing indicates its to do with the time zone set for the OS - the Ubuntu install was using USA whereas the Mac (host) was using UK.

They both now return the time as 01:00:00.0 which is consistent but not the same as mySQL Workbench running on MacOS.

I will need to keep digging.

I have written this code and converted into a runnable jar.

The only external jar in my classpath is mysql-connector-java-8.0.18.jar which is the "platform independent version"

When run on MacOS the output is as follows.

When run on my Ubuntu 18 machine I get this.

Using mySQL workbench the value in the table is

INSERT INTO `app_material_batch`(`MATERIAL`, `BATCH_NUMBER`, `STATUS`, `EXPIRY_DATE`) VALUES ('43341711', '9291093350', 'Restricted', '2021-10-31 00:00:00');
Good idea - but the results the same.

Found this which is relevant webpage
I am in the process of writing a small program to illustrate a problem I'm trying to narrow down. I have a java application which uses a mySQL 8 database and mySQL JDBC driver for Java. When I read a date time field from my database using my App which is running on Windows or MacOS it comes back with a time component which is correct. When I run the same app on Linux the time component is wrong. There are a few variables to narrow down on.

On Mac and Windows I'm using Oracle Java 1.8 202 and on Ubuntu Linux I'm using OpenJDK 1.8 202

I was about to follow the route of checking if the problem went away if I run the Linux version under Oracle Java - but I have also noted that when I download the mySQL JDBC driver from their website they offer versions for

Red Hat
Platform Independent.

So - can someone explain why the jdbc has to have a Linux distribution specific file - at the moment I'm using the Platform independent version and I will try the Ubuntu version as well.

When running the java code under MacOS I get the time component "08:00"

When running the java code under Ubuntu 18 I get the time component "00:00"

MacOs is running Oracle Java and Linux OpenJDK but I've not determined if it's the Java Version or OS yet - the database is common between both.

I was hoping to understand this screen in eclipse


7 months ago
I'm looking for information - tutorial on Eclipse and the new Java modules requirements.

Rather than jump directly into trying to get my existing application working I though I would learn a little bit more about the module-info.java file and see if there are any useful functions within Eclipse to help me populate it with missing requirements.

For example a very simple basic class created with WindowBuilder Pro gave me :-

However as my Eclipse IDE was running with JDK 12 it did not like most lines and the vital clue was :-

The package java.awt is not accessible

A quick google told me that I need to insert the line :-

requires java.desktop;

in my  module-info.java

I then started to look around in Eclipse to see if there were any helper functions to populate this kind of reference automatically - not unlike what it does for import statements.

I found a section in the Build Path called "Module Dependencies" but it was unclear what to do and I've not found anything online to walk me through it.

If someone knows of a good book or online reference which could combine the new functions in Java 9+ and also include new features in Eclipse 2019-09 which help with development it would be great.

I'm still working with Java Swing applications and the amount of code to review is substantial.

I'm also going to struggle with understanding what the module requirements are going to be for 3rd part libraries.

Many thanks in advance.


7 months ago
Just wondering if anyone has been beta testing the forthcoming MacOs and knows if it will work with Java 8 ?
7 months ago