Skip to content

Tag: java

JAR Dependency Resolution from Within /usr/share/java

Can someone please explain how JAR files and the Java class loader make use of /usr/share/java? Is this a special directory that the JVM will perform automatic JAR loading and class lookups in, but no other? For example, if I have x.jar that depends on y.jar. If both jars are in/usr/share/java the dependency,…

MDI in SWT on Linux?

I’d like to create an MDI application using SWT. I’ve done extensive searches and reach that the Decorations Object is the one responsable for trying supporting behavior. However, I’ve a Linux box, and the example provided doesn’t work for me. The output of the example provided by the …

Will System.currentTimeMillis always return a value >= previous calls?

https://docs.oracle.com/javase/6/docs/api/java/lang/System.html#currentTimeMillis() says: Returns the current time in milliseconds. Note that while the unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger. For example, man…

Java: Graphics in Linux

Does X-Windows have to be installed on a Linux-box in order for Java to display fullscreen graphics? Answer Other answerers appear to assume that “full screen graphics in Java” necessarily means “a working implementation of AWT”. This is, of course, not necessarily true, as it is perfe…

Authenticate linux based user in java

I have a username and password for a particular user in Linux i need to verify that if the user is valid or not using java? Abdul Khaliq Answer The Java way to do this would be JAAS, but you’ll still need a LoginModule that works with Linux. Here’s a beta implementation that claims to work.

How do I find my PID in Java or JRuby on Linux?

I need to find the PID of the current running process on a Linux platform (it can be a system dependent solution). Java does not support getting the process ID, and JRuby currently has a bug with the Ruby method, Process.pid. Is there another way to obtain the PID? Answer If you have procfs installed, you can…