New answers tagged

0

sudo update-alternatives --config java and then enter 1 Thanks it helps me. Java version updated when I open a new terminal.


0

Installing Oracle Jdk is not really necessary, Open JDK would work as well. I found very handy the recent "Eclipse installer", you can find it in Eclipse offical website. See http://www.eclipse.org/downloads/index.php?show_instructions=TRUE


0

I had the same issue with work and it was because an upgrade reset the permissions. Check those first?


0

I will suggest first install Oracle Java 8 following this link sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer I setup the JAVA_HOME manually by editing /etc/environment JAVA_HOME=path of java before bin directory export JAVA_HOME source /etc/environment My looks like this ...


0

It seems this bootstrap.sh is part of this vagrant which requires that you have Oracle Java7 is installed. So it is making a check and if not echoing it and then taking a particular action(install Oracle Java7). It's using the standard ppa for Oracle Java7 install.


0

I follow this link for installing Oracle/Sun JDK and it works fine for me. In one instance i need to manually update my JAVA_HOME in /etc/environment(by editing it) JAVA_HOME=/path-to-java-before bin directory export $JAVA_HOME source /etc/environment Hope this works.


2

You need to add $JAVA_HOME/bin to your PATH You can verify this easily: $ PATH=$PATH:$JAVA_HOME/bin $ java -version After you've verified it works, edit your ~/.bashrc file to include the line export PATH=$PATH:$JAVA_HOME/bin


0

Have you tried the pkill option? pkill will send the specified signal (by default SIGTERM) to each process instead of listing them on stdout and will instantly kill any process matching the specified process name unless the process is performing a syscall. Here, try this pkill -9 java Will attempt to instantly shutdow all processes with the name matching ...


0

Try this command to get all the Java processes ps -aux |grep java| cut -c10-15 and then kill them using kill -9 process id from the above command Now find out what is the culprit program. Before installing anything - try to go thru the release notes. You need to uninstall it and also delete the directories created by this culprit program. If you ...


0

To make the file executable:- Press CTRL+T to open a terminal. Enter this command chmod +x /home/hunter/Downloads/minecraft.jar


0

Another portable options is to extract the absolute path of the JDK from javac: export JAVA_HOME=`type -p javac|xargs readlink -f|xargs dirname|xargs dirname` The absolute javac path is passed to dirname twice to remove /bin/javac from the end. Complete extraction of the directory goes as follows: $ type -p javac /usr/bin/javac $ readlink -f ...


1

edit the file android-studio/bin/studio.sh like the mark content(JAVA_HOME line) #!/bin/sh # # --------------------------------------------------------------------- # Android Studio startup script. # --------------------------------------------------------------------- JAVA_HOME=your_path/jdk1.8.0_31 message()


0

make sure that you have the Java installed by running java -version If it returns an error, run this: sudo apt-get update sudo apt-get install default-jdk Good luck !


0

After some digging I managed to pull this url: http://sukharevd.net/environment-for-j2ee-development-under-ubuntu.html It shows how to install the most important components for JEE development under ubuntu. Please also consider @Fabby's comment on FHS in the original question: http://refspecs.linuxfoundation.org/fhs.shtml


0

Run: sudo apt-add-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer oracle-java8-set-default This will install Oracle JRE 8 and set it as default.


3

There is no development for Java to get the plugin compatible with Chrome PPAPI interface so far. At least there is nothing I heard of.


0

The easiest way is to use ppa. Run in terminal: sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer That will install the latest Oracle JDK.


0

An alternative is the Zulu port of OpenJDK which can be downloaded as a zip file, unpacked and used directly. If needing to run from the command line, consider prepending the bin directory to $PATH in .bash_profile. Downloads available at http://www.azul.com/downloads/zulu/zulu-linux/ (untested as I do not have a 12.04 system available. It appears ...


1

Adding to the earlier answers...I had issues with my JAVA_HOME after the install from this ppa following this commands: sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer sudo apt-get install oracle-java8-set-default The 4th command doesn't work as expected. So in my case I have to manually run ...


0

If you want keep both versions, and switch depending on your needs, consider the command: update-alternatives --config java to make sure that a particular java (sun-java) is the default runtime.


2

As you did not specify whether you want to install OpenJDK or Oracle JDK, my answer covers Oracle JDK. It is interesting to quote this text from here. What follows applies to JDK8 too and for all Ubuntu versions of yours or higher. Oracle JDK7 itself is not hosted in the PPA because that's not allowed by the new Java license (which is also the reason ...


16

Java 8 is not available in the Ubuntu 12.04 repositories, but it is available from a Launchpad PPA. You also cannot update a Java version to the next Java version, but you can install different Java versions side by side. To install Java version 8 (OpenJDK 8 edition - not ORACLE Java 8) open a terminal and execute : sudo add-apt-repository ...


1

First, you should not need to uninstall Java 8 to switch to Java 7, due to the alternatives system. Merely installing oracle-java7-installer will make Java 7 the preferred JVM/JDK. If you ever do need Java 8: $ sudo update-java-alternatives --set java-8-oracle Note that this changes /usr/bin/java, thus affecting everything on that system that relies on ...


0

Try doing this in the directory where the applet is stored- javaws <name_of_applet>


0

ARM is not Intel based CPU. It's like Raspberry Pi or Smartphone CPU. *.tar.gz is source code. If you using Intel or AMD choose x64.


1

You can do it easily, just run it specifying the path of java you want to use. In details: Normally java is installed under /usr/lib/jvm there where you can find the default java versions you have in your system. So if you want to run another version other than the default one you should specify the full path of the Java. for example suppose that ...


0

You can extract the tar.gz file as a root : cd /usr/local tar xzf <the tar.gz file> and update PATH and JAVA_HOME variable (be aware of your JDK version): export JAVA_HOME=/usr/local/jdk1.7.0_13 export PATH=$PATH:$JAVA_HOME/bin more info here


1

The shell is interpreting $? as the exit status of the previous command. To prevent shell interpretation: Use quotes around $?: (Head-Level-Mother-Daughters ?h1 ?l1 ?m1 "$?" ?m "$?") Or (Head-Level-Mother-Daughters ?h1 ?l1 ?m1 '$?' ?m '$?') Or escape $ with \: (Head-Level-Mother-Daughters ?h1 ?l1 ?m1 \$? ?m \$?)


1

You don't have Java installed. To install oracle java do the following. Install manually: Download the right java-version for your os's archtecture from here: java for linux Make sure you take the .tar.gz-archive and unpack it to /usr/bin/java. You can do the same with the jre provided in the link above. Then set the path-variable by opening the shell ...


-1

You need to redirect HTTPS to your proxy too, here are my configurations: Acquire::HTTP::proxy "http://127.0.0.1:3128"; Acquire::HTTPS::proxy "http://127.0.0.1:3128";


0

I figured it out. It was ridiculous mistake by me. As I set JAVA_HOME in so many files, in all the mess I set it to /usr/lib/jvm/java-7-openjdk-amd64 in ~/.bashrc. So every time I opened the terminal it changed to this no matter what was in all the other files, as ~/.bashrc runs every time teminal is opened.


2

You should not set this yourself, if it can be helped. To change which Java version to use, see this guide. Snippet: If your system has more than one version of Java, configure which one your system uses by entering the following command in a terminal window sudo update-alternatives --config java This will present you with a selection that ...


1

Login to your account and open .bash_profile file $ vi ~/.bash_profile Set JAVA_HOME as follows using syntax export JAVA_HOME=<path-to-java-bin-directory>/java If you want changes effected without logout, enter command below: $ source ~/.bash_profile


0

Executing the following should solve your problem: $ export LD_LIBRARY_PATH=/usr/lib/jvm/java-8-oracle/jre/lib/amd64/server $ sudo R CMD javareconf


2

If you installed Oracle java from ppa:webupd8team/java, it is quite easy to update it manually. Download JDK from oracle site and extract it to /usr/lib/jvm/ You will need to rename jdk1.8.0_72 to java-8-oracle.


1

You can allocate manually how much RAM java can use for minecraft. From Minecraft Wiki Using the Xms and Xmx parameters, the initial and maximum memory size for Java can be specified. By default, your server runs with about 100 MB of RAM, which is very little. Most people will change their server to run with more, for example: java -Xms512M -Xmx1G ...


0

Java memory handling is a bit special. I don't know it much in details, but you should perhaps rise XMX and XMS settings. Minecraft won't use your swap : it's a dedicated space managed by linux kernel : if your system runs out of memory, the kernel will decide to swap informations, but JAVA will first limit Minecraft server to the memory size you allowed ...


0

Ok, I'm answering my own question: the problem was with the jnlp file format itself, and I had the parsing error I overlooked. It had to do the the format of the href attribute of the jnlp tag containing some question marks (see https://stackoverflow.com/questions/14112318/the-reference-to-entity-subset-must-end-with-the-delimiter)


0

you might double check if your JDK is x84 or x64. If the version is a wrong one, ubuntu then cannot read it and it will tells you "No such file or directory"


6

Press F8 or Build -> Compile instead of Shift-F9 or Build -> Make. After that F5 or Build -> Execute


2

I ran into this same error on my Ubuntu 15.10 server but did not want to install the non-headless version of OpenJDK due to the number of additional dependencies. A simpler solution was to simply disable assistive technologies. This can be done by editing the accessibility.properties file for OpenJDK: sudo vim /etc/java-8-openjdk/accessibility.properties ...


0

This was a really bad issue by myself. If I did mail and looked the first mail with 1 then I saw the message /bin/sh: /root/jobs/log-crush-ftp-process.sh: No such file or directory I thought the whole time the error means the first column /bin/sh, but the real issue was that I renamed the jobs folder to bin. After changing the cronjob to */1 * * * * ...


0

If you open a terminal in the directory where you saved Minecraft.jar, try running it with java -jar Minecraft.jar Without further information, there isn't much else that I can recommend. There are a number of reasons why Minecraft may fail to start. By running the command above, it will at the very least provide information on why it's failing. That ...


0

Ok. Thanks to Thomas W. for comments that led me to the solution. The cause seems to trace back to broken packages. I had previously searched how to fix broken packages, but none of the solutions fixed the whole problem. I searched instead for the Hash Sum mismatch error I was getting at the end of apt-get update, and found this solution, that solved the ...


0

I believe you experience a problem described in Connection Reset since JMeter 2.10 ? wiki page. If you absolutely sure that everything is fine with your server (CPU usage is far not only one metric which needs to be considered) you can work it around as follows: Switch "Implementation" of all your HTTP Request samplers to HTTPClient4. The fastest and the ...


0

I solved!! I just run the command chmod a+x in the file jetbrains-phpstorm.desktop and he started the IDE normally.


0

The way I got the older version of java was different. I used the command $ sudo apt-get install default-jre, so you should use that command as well. No extra repository is needed. If you DO use this command, I suggest removing the previous package you tried using by typing in sudo apt-get remove sun-java6-jdk=6.22-0ubuntu1~10.10. By now, you should have a ...


0

I think better approach is to use additional repository ppa:webupd8team/java for installing Oracle JDK 7,8,9. Details you can read here: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html.


0

I am answering from the RPM perspective, but I'm sure DEB has something similar in place. Every package has Provides and Requires, they do not have to match the name of the package. So for example OpenJDK provides java and java-devel. And every package that Requires it will grab it as well. The problem is that there is no other providers for java and ...


0

You can choose the default version of Java to be used by Ubuntu using this: $ sudo update-alternatives --config java It will give you a choice if there are multiple versions installed or will set up properly if it finds just one version.



Top 50 recent answers are included