Tag Info

Hot answers tagged

15

There are two ways this can be done: using the ulimit shell utility, or using the setrlimit system call (which is what ulimit calls in turn). using filesystem quotas, and a special user for the server process, will restrict the total usage of that user ulimit/setrlimit From man 2 setrlimit: RLIMIT_FSIZE The maximum size of files that the ...


5

UPDATE: The answer by muru is perfect for file size, I'm here giving a solution how to size a directory itself, not just a file. There is no such thing direct since filesystem deal with a folder as file of files and its limit is the whole filesystem itself. So as a workaround for your problem you can do a trick creating a virtual filesystem and mount it ...


4

The method dateChooser.getDate() returns null. You've just instantiated the object dateChooser, but never assigned a Date object. This is the implementation of the method getDate() in JDateChooser.java /** * Returns the date. If the JDateChooser is started with a null date and no * date was set by the user, null is returned. * * @return the current ...


3

I assume all lines you want to change start with the string private static final Height biomeHeight = new Height. If yes, then you can use awk: awk -F'[(,)]' '$1=="private static final Height biomeHeight = new Height"\ {$0=$1"("$2*2"F, "$3*2"F);";}1' file Explanation: -F'[(,)]' sets awk's delimiter to the characters (, ) and , that we have the paramters ...


3

Switching java to Oracle JDK is just a workaround in my opinion, as the OP wanted to know why it doesn't work anymore with OpenJDK. Anyway, I fixed it myself using this answer on Ask Fedora. Basically you first have to create a file javajar.desktop with following contents in /usr/share/applications/. [Desktop Entry] Encoding=UTF-8 Version=1.0 ...


3

Try to purge the old package. sudo apt-get purge oracle-java8-installer Add the webupd8team Java PPA repository in your system and install Oracle Java 8 using following set of commands. sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer source


2

A major convenience upgrade would be to use a background script, automatically setting the resolution per application, while you can set different resolutions for different (multiple) applications at once. That is exactly what the script below does. An example of a default resolution of 1680x1050: Running gedit, automatically changing to 640x480: ...


2

This is because ubuntu supports the binfmt_misc kernel module and the jar type is enabled. see /proc/sys/fs/binfmt_misc/jar This is very old (since kernel 1.03). See more information here: http://stackoverflow.com/questions/1667830/running-a-jar-file-without-directly-calling-java Other examples are python and wine, yes, if you learn how binfmt_misc works, ...


2

The plugin to run Java in a browser is called IcedTea. Currently, IcedTea only has Java 7 releases (the version 2 releases). Java 8 would correspond to a version 3 release, so until there's a version 3 release of IcedTea, you won't be able to run Java 8 in the browser.


2

I'd say it's safest to check the file size inside the java program. You can append to any file you have write access to, as long as there is enough space in the partition, so you cannot limit a file's size directly. The only thing I can think of is to create a partition only for this file, so the file size will be limited to the partition's size. Also, if ...


2

Seems like you don't have Java installed on your system. Run the following command in the terminal to install Java. sudo apt-get install openjdk-7-jre


2

From the terminal run: java -cp .:/path/to/jar/file MyFile where you replace /path/to/jar/file with the full path to your external .jar file which in your question is named jsch.jar and -cp is a shorter way of typing -classpath. Explanation . - current directory : - separator character used to separate class paths /path/to/jar/file - replace this ...


1

Open a terminal and fire this command: sudo apt-get install --reinstall ca-certificates-java And make sure that the time setting of your system is correct. Source I quote: Basically, Minecraft uses SSL to protect your login, but Java didn’t have the certificates needed to verify. The Minecraft launcher really should give a better error message, ...


1

Indeed there is no specific answer. The answer would bw related to each package unique. The master guidlune to your choice is what you care about. Installing from Ubuntu main repositories ensure you security, stability but with some versions, since to ensure the policies put by ubuntu packaging system would take some time. So as a guidline, don't add third ...


1

You'll have to install the JDK manually if you want to pin the version. This is a pretty good guide for doing just that. https://www.digitalocean.com/community/tutorials/how-to-manually-install-oracle-java-on-a-debian-or-ubuntu-vps Keep in mind no updates, so you'll have to upgrade the java version yourself for security updates and such.


1

Start a search for all packages for the path /usr/share/java LANG=C apt-file search /usr/share/java/ | awk -F": " '{print $1}' | sort -u | xargs apt-cache policy | grep -P -B 1 "Installed:\s[^(]" With this command, you see a list of installed packages. Install these packages again with: sudo apt-get install --reinstall <package_name> Sample ...


1

The trouble's fixed, steps I performed: sudo rm /var/lib/binfmts/jar Remove the package: jayatana from Ubuntu software center. Remove all the Java related packages (Sun, Oracle, OpenJDK, IcedTea plugins, GIJ): sudo apt-get update apt-cache search java | awk '{print($1)}' | grep -E -e '^(ia32-)?(sun|oracle)-java' -e '^openjdk-' -e '^icedtea' -e ...


1

TL;DR first, more details following: "Connection refused" is the error you get when you try to connect to a service on a computer or server (or locally on your own computer) when the said service is either not listening on the specified TCP port (wrong port or service not started), or when a firewall explicitly rejects a connection instead of ignoring the ...


1

Try do disable iptables: sudo service iptables stop && sudo service ip6tables stop Then restart hadoop. If this helped you need make proper configuration for your firewall.


1

You could consider using perl e.g. perl -pe 's/(?<=Height\()([0-9.]+)F(.+?)([0-9.]+)F(?=\);)/sprintf "%sF%s%sF",2*$1,$2,2*$3/e' file.java The (?<=Height\() and (?=\);) are zero-length assertions or lookarounds that limit the matches to the specific region between those delimiters, after which the numeric values are extracted using capture groups ...


1

For software development: OpenJDK Development Kit (JDK) sudo apt-get install openjdk-8-jdk To start Java applications OpenJDK Java runtime, using Hotspot JIT sudo apt-get install openjdk-8-jre Other packages: openjdk-8-dbg This package contains the debugging symbols. openjdk-8-demo Java runtime based on OpenJDK (demos and examples) openjdk-8-doc ...


1

Short answer: Generally JDK is suitable for any cases, so if you don't know what to install - simply install JDK. openjdk-8-dbg Package that consists bring debugging symbols. Debug symbols come with JDK by default, but sometimes you have to install them separately. openjdk-8-demo Package that consists of demos and examples. This package bring some ...


1

You can spawn a bash root shell inside a mate-terminal instance, change the mate-terminal's working directory to ~/Desktop and execute your jar file inside it at startup by adding this command to Startup Applications: mate-terminal -e "sudo -H /bin/bash -c \"cd ~/Desktop && java -jar executable.jar; /bin/bash\"" Hit the Super key, type "Startup ...


1

You appear to be using an ARM cpu, which minecraft does not support.


1

Why does this message appear? Apparently it's reporting that the environment variable JAVA_TOOLS_OPTIONS has been set. Does anybody else observe this? Yes, I see it and am annoyed by it as well. Can it be disabled? A couple of sites suggest uninstalling jayatana, but I'm reluctant to do that since I don't really know why Ubuntu installed it ...


1

This PPA is to get Unity AppMenu and HUD support for applications like NetBeans IDE, IntelliJ IDEA, Android Studio etc., as described here. So, unless you want this you can delete the package using sudo apt-get remove jayatana (and as the stackoverflow thread suggests, removing /usr/share/upstart/sessions/jayatana.conf and restarting your computer). I am not ...


1

If you just want to remove the message you can just edit your $HOME/.bashrc (if using bash) or $HOME/.profile and unset the variable with: unset JAVA_TOOL_OPTIONS This way jayatana will still be there and can just be enabled again if you remove the unset JAVA_TOOL_OPTIONS from your .bashrc / .profile. Note unsetting the variable is NOT equivalent to ...


1

This question is now irrelevant as Chrome no longer supports Java beyond version 35.


1

There is no way to install Java to Chrome at the moment. NPAPI plugins are not supported on linux any more. But I have not heard of any existing PPAPI Java plugins now. I use Firefox for Java.


1

Try whit this code in terminal to remove java 8 sudo apt-get purge oracle-java8-installer after type javac -version output have to be jvac: command not found and to install java 7 in ubuntu I use this code in terminal sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer after type java ...



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