Glyndwr Bartlett

Ranch Hand
+ Follow
since Jul 30, 2018
Merit badge: grant badges
Biography
I am not a programmer. I am learning as I go in order to create an award application for Scouts.
For More
Australia
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Glyndwr Bartlett

Hi Tim,

OK, I have searched, read tutorials, watch videos and installed Docker Desktop. I will now spend time understanding the last two paragraphs of your reply.

For the benefit of those who come after me this is what I have done.

To work with containers in Windows follow the following steps:
1. Install
   a. Install WSL2:
       i. Search for “Turn Windows Features on or off” and click on it
       ii. When the window opens select:
           1. Windows Machine Platform
           2. Windows Subsystem for Linux
           3. OK
       iii. Open the ‘Command Prompt’
       iv. Check if WSL2 is installed:
           1. Type ‘wsl – status’
           2. If it is not installed, then type in ‘wsl.exe –install’
           3. To update type ‘wsl –update’
   b. Go to the “Windows Store” to download a Linux.
   c. Download and install the latest version of Docker Desktop for Windows.
2. Use Docker Desktop:
   a. Open the ‘Docker Desktop’
   b. Open a ‘Command Prompt’
   c. Install the requires OS (can install multiple):
       i. In the command line type ‘docker run -it ubuntu bash’ you can replace ubuntu with other OS like Alpine (does not carry a lot of baggage)
       ii. Another way:
            1. In the command line type ‘docker pull alpine’
           2. In the command line type ‘docker run -t -d --name alpineos alpine’ (alpineos can be any name)
   d. To see what is running, in the command line type ‘docker ps’
   e. To connect, in the command line type ‘docker exec -it alpineos sh’

To be continued.

Kind regards,

Glyn

2 months ago
Hi Tim,

Thank you for this very valuable information. I will now take some time to digest this information and play with Docker.

Kind regards,

Glyn
2 months ago
Hi Tim,

OK, so this seems the way to go. I have found that I can install and run WSL2 on my laptop and do everything under that.

So my first issue is that in my reading I found that any data created in a container is not persistent (it is all lost when the container closes). So, the user needs to create a MariaDB and I need to link to that from the container. Does the user need to install phpMyAdmin (this is quite tricky) or can they just install the database?

Then my container would contain Tomcat, JDK (I am using OpenJDK) and my application.

To keep this as lite as possible is there a particular Linux I should use (e.g., busybox, Ubuntu)?


Hi Nadiyar,

Thank you very much for your advice. I will keep that as my plan B. :-)

Kind regards,

Glyn
2 months ago
Hi Tim,

This is a personal project being done for people who are volunteers and non technical. So, the cost needs to be as close as possible to zero and implementation very easy.

"As for running Windows IN containers, that's even more problematic. ". This is where my lack of knowledge of containers comes in. I was not aware that you need to install an operating system in the container. If that is the case then I will need to go down the Linux VM route. So, if I create a container under Linux with all the software, can the user copy it and a batch job to their Windows PC and run the application locally?

Thank you for the links.



Hi Nadiya,

Thank you for thinking outside the box. Can I create an installable .exe file that contains the application and all supporting software (Apache Tomcat server, MariaDB, JRE and the application (HTML, JavaScript, Java))?

Kind regards,

Glyn


2 months ago
Hi Ron,

That is exactly what I want. With Windows being the minimum OS requirement, the other OS environments are nice to have.

Kind regards,

Glyn
2 months ago
Hi Ron,

Yes, I work in Windows 11 and most of the people using the app will be using Windows 11. Next will be making it available to iPad OS then Mac OS users.

If I can develop in Linux and distribute to Windows / iPad OS / Mac OS then I can probably do that. However, it would be a lot easier for me to stick with Windows.


Kind regards,

Glyn
2 months ago
I can not find the correct forum to discuss containers. Is this the correct place?

I know very, very little about containers. I want to create a container to contain an Apache Tomcat web server which runs an application (HTML, JavaScript, Ajax, JSON, Java, MariaDB). I then want to share the container with others, who have very little technical knowledge, so they can use the application. So I want to know:
  • What is the best container to use on Windows 11.
  • What is the best tutorial to show me:
  • How to set up the contain.
  • Add Apache Tomcat web server.
  • Bring in the application (HTML, JavaScript, Ajax, JSON, Java, MariaDB).
  • Set up a batch file so the user just needs to copy in the container and the batch file and then run the application.


  • I am doing this for free so I do not want to spend any money.

    Kind regards,

    Glyn

    Hi,

    Thank you everyone for your help. As suspected by you it was an Eclipse bug. When I just started up Eclipse, ready to re-connect the JRE, there was only one error message instead of the many tens of error messages (one for each use of Blob) yesterday. Strangely this was an error in relation to the "import java.sql.Blob"; however, it was against the first line ("package server;"). This then disappeared before I could get a screen grab to prove it! I did a clean of the project and the error(s) did not reappear. So, all is good for now.

    Once again, thank you for your help.

    Kind regards,
    Glyn
    8 months ago
    I am using JavaSE-21 (jdk-22.0.1).

    8 months ago
    Hi,

    I have just updated my Eclipse to Version: 2024-09 (4.33.0) and now I am getting the error "java.sql.Blob cannot be resolved to a type" on the line "java.sql.Blob imageBlob = result.getBlob(1);". In fact all instances of "java.sql.Blob" are now in error. The code is:

       

    Kind regards,
    Glyn
    8 months ago
    Thank you everyone. There was an extra space on the returned encoded string. The trim() fixed that.

    Kind regards,

    Glyn
    8 months ago
    Hi,

    I am having troubles with decoding a string. I encode the string with:



    This results in "at_cub_details.cd_id: 9 encoded_cd_id: OQ==".

    I later decode using:



    The input is "Decode encoded_ymID: OQ==" and I get an exception:



    This decode which runs just before this decode works "Decode encoded_parentAccountID: Nzk=":



    I do the same code / decode in many places in my application without any issues. Does anyone know why this particular code/decode is causing an issue and how I can resolve it please?

    Kind regards,

    Glyn

    8 months ago
    Hi Tim,

    This is a great help. Most of my "utf8mb4" collation options are for specific languages and "ci" (e.g., utf8mb_turkish_ci). The only non "ci" are "bin", "nopad_bin" and "thai_520_w2". I will try "utf8mb4_unicode_520_ci". My worry is finding issues too late. Can you think of any issue that may arise from using this collation please?

    Kind regards,

    Glyn
    Hi,

    I am currently using "latin1_swedish_ci" (the default when I set up the first database using phpMyAdmin). I note that there are a number of UTF8 options. Which is the best please (e.g., utf8mb4_general_ci)?

    Kind regards,

    Glyn
    Hi,

    I am setting up a MariaDB database that will be used in Malaysia and therefore will store Malay characters (Latin Malay alphabet is the official Malay script). What is the best collation to use for this database please?

    Kind regards,

    Glyn