Tag Info

Hot answers tagged

12

Debian's stance is that, beyond certain critical system components which are considered required¹, there is no preferred software. If two programs provide similar functionality, and they're both suitable for Debian², and there's a Debian developer willing to maintain each package, then both programs will end up in Debian. The idea is that it's up to the user ...


10

dpkg -L libhtmlparser-java For the source: apt-get source libhtmlparser-java


9

open("$ORIGIN/../lib/i386/jli/tls/i686/sse2/cmov/libz.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) The executable you're running looks for libraries in an rpath in addition to the normal library search path. The rpath here is $ORIGIN/../lib/i386/jli:$ORIGIN/../jre/lib/i386/jli. Normally $ORIGIN should be replaced by the location of the ...


8

Update: Found a site that has a pretty good explanation: LINK From the link: Then we have to do some configuration. Debian has a script to maintain different version of programs like java called update-alternatives. update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0/bin/java 1065 update-alternatives --install /usr/bin/javac javac ...


8

Here's how it's done: # Must install 7 first or else when uninstalling six, it will try to install a bunch of replacement gcj stuff. sudo apt-get install openjdk-7-jdk sudo apt-get remove openjdk-6-jre sudo apt-get remove openjdk-6-jre-lib Afterwards: > java -version java version "1.7.0_03" OpenJDK Runtime Environment (IcedTea7 2.1.1pre) ...


8

Until you asked the question I never even heard of this facility in Unix (file capabilities). I found this link which looks to have the solution as to how to make ld.so trust your shared libraries: JDK-7157699 : can not run java after granting posix capabilities excerpt from that post When one is raising the privileges of an executable, the runtime ...


8

which 2 commands? /usr/bin/java is a soft (symbolic) link to /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java There is no difference as they are the same file. If you type something like ls -l /usr/bin/java You might get a result such as: lrwxrwxrwx. 1 root root 22 Aug 5 17:01 /usr/bin/java -> /etc/alternatives/java Which would mean ...


8

You didn't specify a shell. So, I will assume bash. The next issue is: did you set it for your user only or system-wide? If you set it as your user, then run: grep JAVA_HOME ~/.bash_profile, ~/.bash_login ~/.profile ~/.bashrc If you set it system-wide, then it may vary with distribution but try: grep JAVA_HOME /etc/profile /etc/bash.bashrc ...


7

If you're trying to get any chrooted app to show up in X11, you will need a couple of things set up correctly. One is a valid DISPLAY environment variable, second is a proper Xauthority file, and third and most important, access to the socket used by X11/Xorg. X11 can use either a TCP network socket or a Unix Domain socket. A TCP socket will be easier to ...


7

BitcoinPlus is a web-based Bitcoin mining application written in Java. It uses your CPU to perform intensive calculations in an attempt to solve difficult math problems - this is part of the Bitcoin creation and security process. I've not heard of any *nix trojans or virii for Bitcoin generation (the only one I'm aware of is, ironically, MacOSX exclusive) ...


7

On Debian and derivates, you should probably use update-java-alternatives. Anyway, all those tools are system related, not user related. If you want to use a different java, simply put those lines in your ~/.profile: JAVA_HOME=/usr/lib/jvm/java-6-sun JRE_HOME=/usr/lib/jvm/java-6-sun/jre PATH=$JAVA_HOME/bin:"$PATH" export JAVA_HOME JRE_HOME


7

OpenVZ & Memory The failcnt is going up on privvmpages, so your container is unable to allocate any more virtual memory space from the host: root@server: ~ # cat /proc/user_beancounters Version: 2.5 uid resource held maxheld barrier limit failcnt privvmpages ...


6

You need to use a native method, but you don't need to implement it yourself. Java has a variation on JNI called JNA (Java Native Access), which lets you access shared libraries directly without needing a JNI interface wrapped around them, so you can use that to interface directly with glibc: import com.sun.jna.Library; import com.sun.jna.Native; public ...


6

Linux Mint seems to be an exact match to what you're looking for! It includes allmost everything you need. OpenOffice, codecs, Firefox, jockey for easy installation of drivers (if needed), XChat, Pidgin, VLC, Transmission (BitTorrent client), Java, ... etc. I've been using it for about a year now, and it hasn't let me down since that time. One thing I would ...


6

Try either of the two: $ which java $ whereis java For your first java program read this tutorial: "Hello World!" for Solaris OS and Linux


6

Try this: find -name "*3.0.6.RELEASE.jar" -exec sh -c 'unzip -l "{}" | grep -q stereotype.Controller' \; -print There's no need for xargs or a for loop here. All can be done with a single find. If you want to also output the content that got grepped, just remove the -q option to grep - but notice that the grep matches will appear before each file name. ...


6

For killing a process that is associated with multiple processes, you need to kill that by using process id associated with that process. To get the process id of that java process run ps -A |grep java output of this command will give the list of java processes running on your system. Note down Process ID (PID) of that process whom you want to kill and ...


6

The . is the current directory. The : is the path separator, used to separate multiple paths in a single option/variable under *nix. This command line therefore adds both . and zookeeper-3.4.5.jar to the Java classpath.


6

Alternatives Alternatives is a tool that will manage the locations of the installed software using links under the control of the alternatives tool. These links are ultimately managed under /etc/alternatives with intermediate links created under a directory in $PATH, typically /usr/bin. Example $ ls -l /usr/bin/java lrwxrwxrwx. 1 root root 22 Feb 24 ...


6

Sherlock! Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. --Arthur Conan Doyle First you may want to check out this talk, which is a discussion about the sources of performance problems and how to diagnose them. It compares Linux to SmartOS, which is kind of separate from the point of your post, but it ...


5

The exact rules followed by the gcc compiler for finding include files are explained at: http://gcc.gnu.org/onlinedocs/cpp/Search-Path.html A quick command-line trick to find out where an include file comes from is the following:1 echo '#include <unistd.h>' | gcc -E -x c - > unistd.preprocessed Then, if you look at the unistd.preprocessed file, ...


5

If you run java folder/somefile java tries to find a class somefile in the package folder, but your class isn't located in the package folder, it's just located in the path folder. You can adjust the search path for classes using the -cp option (meaning classpath). For example having a class YourClass in the package your.package, this package is located in ...


5

Try Java Virtual Machine Process Status Tool(jps): [Tue Aug 30@17:02:14][prince@localhost ~]$ jps -l 30207 sun.tools.jps.Jps 29947 org.netbeans.Main


5

You can list the installed files with rpm -ql packagename You will see somewhere a bin directory with java executable But if the JDK RPM was correctly installed you should already find java in you path. Try javac MyFirstJavaClass.java and if everything compiles java MyFirstClass (If you didn't change anything the current directory . should already ...


5

Android uses a single Zygote process that forks to start a new application. This optimization is possible because all Android applications start in the same environment; there is very little to do (mainly set the user and load the application code) to launch an application. This optimization is effective because there is little to do, especially since the ...


5

JVM startup time is quite slow, and incurs a heavy toll on scripting . . . huge optimization for java process startup time. The other answers answer the question with respect to generic app startup, which are useful considerations. But seems your primary question is Java application startup performance re overhead of starting a jvm. This has also been ...


5

You forgot the name of the class to run. Normally Java programs are run like this: $ java MainClass $ java -jar foobar.jar You can use -D to set system properties, but you still need the class or JAR to run: $ java -Djsse.enableSNIExtension=false MainClass $ java -Djsse.enableSNIExtension=false -jar foobar.jar As far as I know you can't set system ...


5

As ckhan mentioned, jstack is great because it gives the full stack trace of all active threads in the JVM. The same can be obtained on stderr of the JVM using SIGQUIT. Another useful tool is jmap which can grab a heap dump from the JVM process using the PID of the process: jmap -dump:file=/tmp/heap.hprof $PID This heap dump can be loaded in tools like ...


5

In the same vain when debugging programs that have gone awry on a Linux system you can use similar tools to debug running JVMs on your system. Tool #1 - jvmtop Similar to top, you can use jvmtop to see what classes are up to within the running JVMs on your system. Once installed you invoke it like this: $ jvmtop.sh Its output is similarly styled to look ...


5

In the context of a Unix or linux process, the phrase "the stack" can mean two things. First, "the stack" can mean the last-in, first-out records of the calling sequence of the flow of control. When a process executes, main() gets called first. main() might call printf(). Code generated by the compiler writes the address of the format string, and any other ...



Only top voted, non community-wiki answers of a minimum length are eligible