Hot answers tagged

14

You can see from ls that you already compiled your program with the compiler javac. The command you used javac hello.java creates hello.class without sending any output to stdout, so there won't be any messages in your terminal unless there are errors - what you see is the expected behaviour. If you actually want to see some output, you can add an option: ...


5

Replace command: java -jar $SNAP/jar/wallpaperdownloader.jar with run.sh. Here is run.sh: #!/bin/sh # Not good, needed for fontconfig export XDG_DATA_HOME=$SNAP/usr/share # Font Config export FONTCONFIG_PATH=$SNAP/etc/fonts/config.d export FONTCONFIG_FILE=$SNAP/etc/fonts/fonts.conf export HOME=$SNAP_USER_DATA java -jar -Duser.home=$SNAP_USER_DATA $SNAP/...


4

Assuming you launch your Java JAR using java -jar cooljar.jar, you could use this script: #!/bin/bash launch_jars() { for i in {1..17} ; do java -jar cooljar.jar & sleep 7 done } while 1 ; do launch_jars sleep 3h killall -u surge java sleep 3h done This defines the function launch_jars which launches the same ...


4

To run a .jar file using Java, you need to use the -jar option on the command line. So to open wf_switcher.jar, you should run: java -jar wf_switcher.jar


4

tzdata-java was removed because OpenJDK 8 does not provide the necessary files to build it. Quoting the Debian bug report which prompted its removal: The problem is that the default java has recently been switched to openjdk-8, which doesn't provide javazic.jar. As such we can't build tzdata-java anymore. The other answer gives a PPA which provides a ...


3

Java 6 and 7 timezone data were included via the tzdata-java package but this package isn't available for Ubuntu 16.04 so if your java version is 7 or 6 just run : sudo apt-add-repository ppa:justinludwig/tzdata sudo apt-get install tzdata-java For more details about this PPA ,this is it's launchpad link.


3

You seem to be using a development version of java : Java 9 has not been released yet. So, first of all, you should remove this version of java, and install the default one : sudo apt-get remove openjdk-9-* sudo apt-get install default-jre Depending on your version of Ubuntu, it should be a version 7 or 8. If you're on a development version of Ubuntu, ...


3

/usr/bin/java is a link to the current alternative of /usr/bin/java, you can reconfigure the default java version(including javac and whatnot) by using update-java-alternatives. If you want to reconfigure alternatives for a different debian package you can use update-alternatives --config {package} instead. You probably don't want to remove Java, but maybe ...


1

install the librxtx-java through the terminal: sudo apt-get install librxtx-java this should be sufficient, I think - I'm no java-developer, though.


1

yes , that's quite easy, just download the jdk, extract it somewhere and set path in your .bashrc file like below # User specific aliases and functions JAVA_HOME=/mnt/install/jdk1.8.0_77 JRE_HOME=/mnt/install/jdk1.8.0_77/bin export PATH=$JAVA_HOME/bin:$JRE_HOME:$MAVEN/bin:$PATH then close and open terminal again or do this source ~/.bashrc


1

I figured out the problem: For some reason the JRE_HOME was not getting any value- defaulted to 'user/'. I tried the export command as well as bashrc, none of them worked. I manually added a line to set the value of this environment variable within the setclasspath.sh .


1

Ubuntu does not have the Symantec CA certificates in /usr/share/ca-certificates/mozilla/ direcotry. So, one thing what we can do is we can export the Symantec CA certificate from mozilla, since Mozilla and Chrome has Symantec CA certificates by default and you can put it under the directory /usr/share/ca-certificates/mozilla/ with crt extension and update ...


1

Installing ubuntu-desktop is not enough. The problem is that, in this context, the program is run outside of an X server. You could try to declare the DISPLAY variable before calling it, making it use your (newly installed) X server... but you'll probably have permission issues. This would look like: export DISPLAY=:0.0, which is the default (but is not ...



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