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.

Filter by
Sorted by
Tagged with
10
votes
1answer
13k views

configure java daemon with systemd

I'm using this definition for a systemd job: [Unit] Description=Some job [Service] ExecStart=/usr/local/sbin/somejob User=dlt Type=forking [Install] WantedBy=multi-user.target The script ...
0
votes
2answers
604 views

systemd cannot find PID file after YAJSW wrapper startup

I have a systemd startup script for a forking service (let's call it foo) based on YAJSW (Yet Another Java Service Wrapper). The relevant part of the .service file looks like this: ExecStart=/opt/foo/...
-1
votes
2answers
295 views

how to properly log the output of a console program that frequently updates “parts” of the screen, resulting in a messy log file?

I have some Java executable (jar) that is run my some shell script from a cron job once every night. That executable does not print log statements "as usual" just by printing them out in a sequential ...
10
votes
1answer
13k views

How to get Oracle java 7 to work with setcap cap_net_bind_service+ep

I am trying to grant the java executable the right to open ports below 1024 on Linux. Here is the setup /home/test/java contains the Oracle Server JRE 7.0.25 CentOS 6.4 Here is what getcap returns ...
5
votes
3answers
4k views

Install Java JDK and JRE on Debian 8

I installed Debian 8, I would like to install Java JRE and JDK. I use this method and it works. But, I am afraid because it's a script hosted in a repository. I would like to understand why it doesn'...
1
vote
1answer
2k views

Debugging Java program for changing timezone configuration file on Ubuntu

Here is a ruby script I wrote to change the timezone configuration on Ubuntu. I run it with jruby (a Ruby interpreter running in a JVM). require 'java' if ARGV.length == 0 puts "Usage: jruby ...
24
votes
5answers
40k views

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 ...
4
votes
4answers
714 views

How to make apt recognize an installed tar package?

I've installed Oracle Java. I want to be able to remove OpenJDK, but when trying to do so apt wants to install another version of Java. How can I configure apt so that it knows I already have a ...
0
votes
2answers
155 views

Install Java 6 from Oracle to Debian Lenny

Since Java 6 is not available in Debian 5 I decided to take it from Oracle. I have downloaded Java 6 SDK in file jdk-6u45-linux-i586-rpm.bin. But how to install it? I executed jdk-6u45-linux-i586-rpm....
16
votes
9answers
70k views

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/...
12
votes
1answer
14k views

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 ...
7
votes
2answers
2k views

Java doesn't show menu text

I startet netbeans/intelliJ/squirrelSQL after I didn't use it for a few days/weeks and now the menu doesn't show text. There are just the underlineds. My system: ArchLinux (everything up to date, ...
6
votes
3answers
46k views

How to set JAVA_HOME correctly on CentOS?

I am trying to set JAVA_HOME so that I can install Apache Solr with the help of this tutorial. I am connected to my server using ssh with root user To allow the running sh script to install Apache ...
16
votes
2answers
23k views

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 is [Service] Type=simple EnvironmentFile=%h/...
3
votes
2answers
128 views

Handling duplicate programs names bash

I'm wondering if $PATH cascades entries. You'll all need to take a leap of faith with me here, but here it goes. Let's say we have a Java executable at /usr/bin/java but this version is very old and ...
2
votes
2answers
1k views

Error 404 on JDK Download Debian 8

I'm trying to dowload and install the JDK 8 on my debian with the following command: apt-get install oracle-java8-installer This is the log I get: [...] Do you want to continue? [Y/n] Y Setting up ...
1
vote
2answers
5k views

Is it possible to install both Gstreamer 0.10 and Gstreamer 1.0 at the same time?

I have a computer that runs Debian Stretch which has Gstreamer 1.0 installed. I am trying to run a Processing sketch that uses the Processing video library which in turn relies on Gstreamer 0.10. This ...
7
votes
2answers
8k views

Use certain version of JRE / JDK for certain programs

I use ArchLinux, and an IDE called PyCharm. On its download page, it recommends using Java 6 instead of OpenJDK. ArchLinux has an OpenJDK package (jdk7-openjdk) that I have installed, installed, and ...
4
votes
2answers
64k views

How to set environment variable JAVA_HOME that will be saved on exit? [duplicate]

Possible Duplicate: How do I set a user environment variable? (permanently, not session) I use Suse. First was installed jdk7, so JAVA_HOME remains like: /usr/java/jdk1.7.0_05/ After I have ...
1
vote
1answer
638 views

How do I use daemonize to always keep my tomcat process running?

I was researching how to keep a background process running and I came across daemonize. This answer says that I can use daemonize to ensure a process is always running: "Ensure a process is always ...
1
vote
2answers
2k views

JDK 1.4.2 - where can I download the source?

I want to install Java JRE 1.4.2 or JDK 1.4.2 on a recent Amazon Linux server. The best option so far seems to install from source. However - where can I download this? I believe 1.4 is still from the ...
1
vote
3answers
613 views

Get Position of RAID Hard Drives

I was recently tasked with creating a hard drive management system on Linux. I needed to write a program that monitored when drives came online and offline and created/removed links to the drive ...
0
votes
1answer
265 views

RPM database not seeing file installed as part of RPM

Intro: The following was done on a RHEL 6.9 32bit OS. I installed the oracle (not openjdk) version of JRE rpm using the rpm -Uvh command. I then built a package using rpmbuild that requires ...
0
votes
1answer
164 views

Requirements to run LAXUNIX.SH - LaunchAnywhere (tm) version 14.0

I am trying to install a program. After installation was done, I tried to click on the installed file and I got this: LAXUNIX.SH - LaunchAnywhere (tm) version 14.0 To run this script you will need ...
43
votes
5answers
31k views

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 ...
6
votes
1answer
33k views

Installing openjdk-7-jdk does not update java (which is still version 1.6)

I am having issues updating Java. I am running Ubuntu 11.10. I can execute sudo apt-get install openjdk-7-jdk and it completes successfully. javac -version is 1.7, however java -version is 1.6. This ...
12
votes
2answers
5k views

Invoke Syscalls from Java

Is there a way to invoke syscalls directly from Java, or is it necessary to first call a native method?
14
votes
1answer
2k views

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 ...
6
votes
3answers
13k views

What to do to run GUI Java app in chrooted environment?

In my case Java app is JDownloader. I prepared chroot environment as explained here: http://www.0x61.com/forum/post5240333.html#p5240333 and here: http://interreality.org/~reed/java-chroot.html ...
17
votes
3answers
21k views

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 net....
7
votes
2answers
10k views

Minimal Java installation for Linux with no GUI

I'm working on a CentOS 6.3 x86_64 minimal OS (installed using the netinstall ISO). This system is not expected to run anything beyond console apps/services and Tomcat7. When I attempt to install ...
4
votes
3answers
3k views

Uniquely identifying java processes with same name

I have two java processes which run using the same file name, MyApp.jar (for example). /usr/java/latest/bin/java -jar MyApp.jar These jars exist in different places and use different configurations. ...
3
votes
4answers
33k views

Installing JDK 7 on debian

So I just rented a dedicated server running Debian, and I know nothing about Linux. Anyway, I want to install the JDK 7, first I connected through SSH and granted myself administrator rights by ...
2
votes
2answers
2k views

How do I install multiple java command-line programs?

I have a bunch of java command-line programs I've written and would like to install for all users. Building with NetBeans, I get a /dist directory which contains myprog1.jar and a /libs directory ...
2
votes
1answer
1k views

Running Apache with Tomcat

I was wondering if it's possible to run a Tomcat server within Apache whilst also running PHP servers under other virtual host instances? And if so, how is this done? Basically, I'm trying to run an ...
1
vote
2answers
2k views

How to start SPSS-statistics 23 in Debian?

I installed the university licence in Debian 8.5 but did not configure any paths and forgot what is the default location. I cannot see in anything in $PATH about the program by searching SPSS. ...
1
vote
1answer
316 views

Linux Mint Petra (16) Java Update from JRE 7 to JRE 8 breaks Graphics System?

(Note: I'm a firm believer in "if it works, you don't need to fix it." Which is why this laptop is still running Linux Mint 16 - so far it does everything I have needed, and wonderfully so.) I had ...
1
vote
1answer
992 views

Bash script (with a java command) does not exit (script 2)

I start a bash script (synchronously from java as glassfish user) which triggers another bash script: Script 1 executed from java: #!/bin/bash #Start script2 as myUser on myUser desktop echo ...
1
vote
3answers
21k views

installed java, but java -version not showing new java

I just installed jdk1.6.0. I have tried multiple ways to set the path variable and make java 1.6 my new running version. And nothing is working. Running centos5 virtual machine. alternatives --config ...
1
vote
2answers
29k views

How to verify if Java is installed on rhel

I stood up rhel VM. I was curious if JDK is installed or not so that I ran a command from a shell (bash). whereis java It returned: java: /usr/bin/java So I navigated to the path in order to ...
9
votes
1answer
5k views

What is the safe way to allow Java 7 to run on SELinux

Short version: What is the most secure way to allow Java 7 to run on (with?) SELinux? Long version: Sorry in advance if I use incorrect terminology. I'm really just a Java developer with a meager ...
3
votes
1answer
765 views

Can I indicate that a .deb package depends on Java, but not specify what implementation (e.g. OpenJDK, IcedTea, Oracle)?

I have a .deb package that contains an app, which requires Java to function. However, I don't care which implementation they have installed (e.g. OpenJDK, IcedTea, Oracle), and I don't want to force a ...
3
votes
2answers
584 views

Getting Java programs start without calling with Java

It would be handy to be able to start Java programs by just calling the class file from the terminal (and have it running it the terminal when double-clicked in GUI, but this is less important). I so ...
3
votes
2answers
808 views

Capturing new output after deleting the output file

I'm runnig a java server on Debian with this command: java -jar myapp.jar [args] >> log.txt Once I gzipped the log file to send it and then I realized the original file was gone, leaving me ...
3
votes
1answer
1k views

How to install Apache Tomcat 8 on centos 7?

I am configuring CentOS 7 system for a Java developer. So firstly I have installed Java using command wget java-1.7.0-openjdk-1.7.0.131-2.6.9.0.el7_3.x86_64.rpm after that installed the downloaded ...
2
votes
1answer
3k views

How to update-java-alternatives successfully to Oracle's one in Debian?

The command update-java-alternatives -s jre-8-oracle-x64 is completely valid (found in documentation also here) but I get errors. The package is also seen in the list of Java packages root@masi:/...
1
vote
1answer
2k views

How to switch java environment for specific process?

I use openjdk in my work, but sometimes I need oracle's jre or even specific version of oracle's jre. As I know, I should update JAVA_HOME value and /usr/bin/java or /etc/alternatives/java link ...
1
vote
0answers
52 views

Calling Java programs without the .class suffix

This is a sequel to my other question, Getting Java programs start without calling with Java. I can already start Java programs from the terminal by just setting them executable and calling the X....
1
vote
1answer
1k views

Start Jar in Linux “javafx/application/Application”

System Information is: sudo update-alternatives --config java Selection Path Priority Status ---------------------------------------------------------...
1
vote
0answers
631 views

Java plugin crashes on Firefox 53 [closed]

I had java plugin working on Firefox 53, but I accidentally upgraded Firefox to 54. So I've gone back to the version 53 from apt-cache, recreated the symlink ~/.mozilla/plugins/libnpjp2.so but now the ...