Questions tagged [java]

Java is a general-purpose programming language and a computing platform called the Java Virtual Machine (JVM). Use this tag when you are dealing with a java program, installing java, or configuring a java installation.

(Adapted from Wikipedia)

Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere" (WORA), meaning that compiled Java code can run on all platforms that support Java without the need for recompilation. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of computer architecture. Java was originally developed by James Gosling at Sun Microsystems (which has since been acquired by Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++, but it has fewer low-level facilities than either of them.

863 questions
63
votes
4 answers

How to find path where jdk installed?

I've installed jdk1.7.0.rpm package in RHEL6. Where I do find the path to execute my first java program?
Mohammad Faisal
  • 739
  • 1
  • 5
  • 6
46
votes
5 answers

openjdk-8-jre-headless : Depends: ca-certificates-java but it is not going to be installed

Can't install Java8 apt-get install openjdk-8-jre-headless Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation…
Jason
  • 1,714
  • 5
  • 25
  • 30
36
votes
5 answers

Why is PDFTK saying it can't find files that are right there?

I'm trying to compile a bunch of PDFs into a single document. ls shows the files are in the directory that I'm in and they're readable (-rw-r--r--). But when I try to run pdftk 2017.pdf cat output test.pdf I get an error: Error: Unexpected Exception…
Amanda
  • 1,709
  • 2
  • 13
  • 26
29
votes
3 answers

Running unsigned javaws code

For a KVM remote console I need to be able to run a jnlp file. When I run it I get: net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application. at…
Ole Tange
  • 33,591
  • 31
  • 102
  • 198
27
votes
5 answers

How to trace a java-program?

As a sysadmin I sometimes face situations, where a program behaves abnormally, while not creating errors at all or creating nonsense error-messages. In the past - before java came in - there were two counter-measures: If nothing else helps - RTFM…
Nils
  • 18,202
  • 11
  • 46
  • 82
23
votes
8 answers

Kill only one Java process

I usually run few Java applications, one for server running locally and other for some IDE like NetBeans. And from time to time, after lots of redeployments, my server get stuck on OutOfMemoryException so I need to kill Java process in order to…
Petr Mensik
  • 593
  • 3
  • 10
  • 21
22
votes
3 answers

Java location from /usr/bin/java

I'm trying to find my java location within my Linux system and got this [980@b449 ~]$ which java /usr/bin/java [980@b449 ~]$ readlink -f $(which java) /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java what is the difference between the…
user1050619
  • 715
  • 5
  • 9
  • 19
20
votes
2 answers

How to find where is $JAVA_HOME set?

I'm trying to change the value of $JAVA_HOME & I just can't seem to find in which file is it being set currently. I can't remember where did I set it the last time. Already tried How to determine where an environment variable came from? but I…
mindreader
  • 337
  • 1
  • 4
  • 10
18
votes
3 answers

Writing a systemd unit file with a environment-set executable path

I am writing a systemd unit file for a Java application and I'd like to control the version of Java used to start it up. My (simplified) service file…
Robert Munteanu
  • 900
  • 1
  • 14
  • 31
17
votes
2 answers

Invoke Syscalls from Java

Is there a way to invoke syscalls directly from Java, or is it necessary to first call a native method?
santiago.basulto
  • 395
  • 1
  • 3
  • 8
17
votes
9 answers

Problem to launch java at Debian: "error while loading shared libraries: libjli.so"

I'm trying to launch java: $ java -version java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory $ ldd /usr/lib/jvm/java-6-openjdk/jre/bin/java linux-gate.so.1 => (0xb779f000) …
aetaur
  • 171
  • 1
  • 1
  • 4
17
votes
1 answer

What is the difference between JAVA_HOME and update-alternatives?

I have been trying to figure out the best way to run OpenJDK Java Runtime as default Java for my Fedora box and use Oracle JDK 6 for Android development namely for running Android SDK Manager, Android Studio and Eclipse from Android Bundle. I…
16
votes
6 answers

Command Line Tool for monitoring Java Heap

Is there any command line tool for monitoring the heap size usage of Java in CentOS?
Mughil
  • 1,963
  • 4
  • 18
  • 23
15
votes
1 answer

Is there any way to tell if a shell script was killed with signal 9

I have a bash script (called from a java program) that keeps getting killed. I always catch the signal 15 with trap but then some other signal comes along that I suspect is signal 9 but am in basically blind as to if it is really signal 9. I know…
jgr208
  • 888
  • 14
  • 35
15
votes
2 answers

How to fix Java applications mouse pointer offset in Awesome WM?

How to reproduce in Awesome WM v3.5.2 through 3.5.5 (so far): Install OpenJDK or Oracle Java 7. This bug has been observed with both. Start a new Awesome WM session with the default configuration. Start either jEdit or PyCharm. This bug has been…
l0b0
  • 50,672
  • 41
  • 197
  • 360
1
2 3
57 58