David Garratt

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

Recent posts by David Garratt

Just got round to adding this to my application and it works exactly as I needed it to.

Many thanks.

Dave

1 week ago
The use of the var type
1 week ago
I tried your code but I got stuck as I think your example is for Java 10 and I'm still using 8
1 week ago
Thanks for your quick reply - I'll certainly give this a try.

Dave
1 week ago
My Java 8 Swing based app starts up and only has a System Tray Icon as the user interface. I have added a menu to it and one of the options is "Quit"

I've put a confirmation question against the Quit option in the form of a JOptionPane.

Sometimes this appears on top of any other application window which might be on my desktop, sometimes it does not.

When I say "other application window" I mean something else that the OS is running - not part of my Java app.

So I was wondering is there a way to force this dialog to appear in front of any other window or will I need to write my own JDialog instead of using JOptionPane ?

Many thanks

Dave
1 week ago
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.
5 months ago
Is the current version of Eclipse available on the Raspberry Pi arm CPU ?
5 months 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.

Thanks

Dave
5 months 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

Dave
5 months ago
I just wondered why they have 2 versions if they are so similar but I will have to try and see.
7 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

Dave
7 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

Dave
10 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.

Dave
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.

Dave
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');