Skip to content

java executing bash script, error=26 Text file busy

I’ve got a java code that is writing a Linux bash script out, then doing a chmod to add execute permission, then trying to execute it. I’m getting an IOException during the start of the process saying error=26, Text file busy. I’ve verified that the file is finished being written and the str…

Trust Store vs Key Store – creating with keytool

I understand that the keystore would usually hold private/public keys and the trust store only public keys (and represents the list of trusted parties you intend to communicate with). Well, that’s my first assumption, so if that’s not correct, I probably haven’t started very well… I wa…

Automatically generate HTML pages in Java

I am developing a Java desktop application. I have a need to create HTML pages through my application. When the user clicks on View in Browser button a HTML page should be created with some details and shown it to the user. Is there a way I can do this? Is there are any resources I can use in this

Jtree not shown on adding a node!

I have a static jtree in a scrollpane. And now iam trying to add child to jtree, it got added successfully. Now, the added node is not visible in the jtree. Try 1: I have tried with model.reload() Try 2: I have tried with tree.setModel() too… Even then newly added child is not visible. but Its getting a…

How to open warning/information/error dialog in Swing?

How to open warning/information/error dialog in Swing? I need standard error dialog with “Ok” button and “red cross” image. I.e. analog of org.eclipse.jface.dialogs.MessageDialog.openError() Answer See How to Make Dialogs. You can use: And you can also change the symbol to an error mes…

JSchException: Algorithm negotiation fail

I am trying to connect to remote sftp server over ssh with JSch (0.1.44-1) but during session.connect(); I am getting this exception: Logs from JSch: I am able to log in to remote server with linux sftp command. I was trying to find any kind of clue in the internet but I failed. Debug output from linux sftp c…

How much time does it take to execute a loop?

Is there any way to know how many seconds does it take a loop to execute in java? For example: It does not have to be accurate 100%, but its just to have an idea of how long it could take. The algorithm inside is some kind of key generator that writes to a .txt file. I expect it to