Skip to content

Tag: java

Does Java JVM use pthread?

Does JVM on Mac OS X use pthread to create threads? What about on Linux distributions, is it now default way to create threads for JVM on all distributions? Answer Yes, HotSpot JVM (i.e. Oracle JDK and OpenJDK) uses pthreads on Linux and on Mac OS X.

Printing the compilation errors to a file in disk

I am a student of computer science. I am learning java on linux platform ubuntu. While I am compiling a program always I get some compilation error in terminal. I tried to read the error message from terminal. I think reading these error message gives me better understanding about the program/java language it…

What is the integer value of AF_UNIX?

So, I’m trying to write some JNA code to work with Unix sockets, and I’m trying to reference AF_UNIX for sockets. I looked through some of the gcc included files, but I couldn’t find anything. Answer On my Ubuntu-machine it is defined in /usr/include/x86_64-linux-gnu/bits/socket.h as 1. I ha…

Changing SAMBA Password in Java

I have a Java program running on linux that needs to be able to both set a users initial samba password, and then allow them to change their password without giving them access to the terminal. Below is my code for changing the users password, as this is easier to test with, and I will be able to figure the

How can I resolve Windows vs Linux properties file paths?

I have a java project on a Windows box which builds successfully and all tests pass locally. This project is then checked in and built with Jenkins on a Linux box. The problem I am having is related to path issues in my properties file which is used for running tests. I point to a resources dir for part of