Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!

Beata Szabo-Takacs

Ranch Hand
+ Follow
since Jan 26, 2020
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 Beata Szabo-Takacs

I have a java program which can download data from MySQL and write them in a chosen file format e.g. TXT. Here is the txt writer:

This writer is called in a JCombobox actionperformed as in an other java file:

I would like to show the progress of the writer with JprogrssBar, but I do not know how should
I measure the writer progress (i.e. the integer value for set the JprogressBar value). Could someone suggest me a solution?

12 hours ago
Finally, I could solve the matter. I checked the code
on Linux OS where the java path was jdk\jre. I changed the path of
the java to jdk\bin by editing the .bash_profile. The code works now.
1 week ago
I used cmd and I applied the command line as you posted. It works correctly. But I do not understand why does not work correctly if I just click to the .jar file?
2 weeks ago
Dear Norm,
Thank you so much for your suggestion. It works correctly. What do you think I should set the path of the environment variables as C:\Program Files\Java\jdk1.8_151\bin\java.exe?
2 weeks ago
Dear Tim,
I have tried it but I got the error that the is missing. I have the same problem as in:
I need the InMemoryJavaCompiler because I wrote a java Class with StringBuilder and I have to compile it. Here are the details of my purpose:
I do not understand why does not work the .jar file which was developed and built in NetBeans 8.1 IDE? If I understand well NetBeans has compact profiles which contain the required but I do not understand why the "is missing" or the created .jar file does not find after the packing and building.
2 weeks ago
I use NetBeans 8.1 for developing a Java project. I use InMemoryJavaCompiler in two classes. When I run the project under NetBeans it works correctly. I created a .jar file from the project with When I try to run the .jar file the program does not work. It generates a NullPointerException regarding InMemoryJavaCompiler:

According to most probably the ToolProvider.getSystemJavaCompiler() returns null. I checked the java.home in NetBeans with which is:

I tried to add and move up the from in NetBeans and built again the program but it doses not help. On my computer, the java path is.
Could someone suggest me a solution to fix the nullpointerexception error?
2 weeks ago
Here is the class where I used InMemoryJavaCompiler:

and here is the part of the code where I called the ComPiler Class:

I receive the following error:
       at org.mdkt.compiler.InMemoryJavaCompiler.compile(
       at meteoread.ComPiler.CodeFromString(

The JDK 1.8 is installed on my PC.
1 month ago
I wrote a Java project in NetBeans IDE. This project contains two abstract Java Classes which are compiled with InMemoryJavaCompiler.
When I run the code in the IDE it works. I produced a .jar file from this project with build packing and clear and build.
When I run the .jar file I receive a NullPointerException error when I use the abstract classes.
Could someone suggest some solution?
Thank you for your help in advance!
1 month ago
Dear All,
I would like to use an AWT label to show the error messages in a JFrame.
I tried to set the label size according to the text size. Here is my code:

When I get a long error message e.g.:
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Communications link failure

only one part of this text will be shown. Could someone suggest me a solution to fix this issue?
Thank you for your help in advance!
5 months ago
Thank you very much Tim for your suggestion! I accepted. I could solve the issue with the following code:

6 months ago
Dear Tim,

I uploaded .png images to MySQL as longblob and I would like to download them as pdf. My aim is to convert the .png images to pdf.
6 months ago
Dear Tim,

The name of the BLOB column in SQL is "IMAGE" and the Table name is "IMAGES" because some .png images are stored as a binary large object.
I tried to create PDF in the same way as you suggested. I just commented out the "For PDF writing" part because the part of the code after "else" is the same as
you suggested. It creates PDF but when I open it I got the same format error.  
6 months ago
I would like to write PDF file from SQL BLOB object. I created the code below based on:

It creates a PDF but when I tried to open the PDF I got the message: format error: not a PDF or corrupted

Could someone let me know what I did wrong?

6 months ago
Dear Campbell Ritchie,
Thank you very much for your effort to help me. Your nice work does not work on Windows, but finally, I found a solution.
I had to change to and it now works correctly.
6 months ago
Dear Tim and Salvin,
I tried your suggestion. I modified the code with:


but the result is the same as before. I would like to get the following result:


I do not understand why string.split cannot handle the \\r\\n carriage-return character as a delimiter?
6 months ago