How do I get JNLP working for OpenJDK 7 on a Ubuntu machine?
I'm trying to get the source code linked to at http://www.bugaco.com/bioinf/clusterer/ with the text "Download sources" to run on my machine.
Currently, when I try running
javac -cp ".:l2fprod-common-all-7.3.jar:jfreechart-1.0.17/lib/jfreechart-1.0.17.jar" com/bugaco/mioritic/impl/module/project/Main.java
it is giving me the error
./com/bugaco/ui/LoadBean.java:11: error: package javax.jnlp does not exist
import javax.jnlp.FileOpenService;
^
(and many other errors)
which I assume indicates that I need to install JNLP, along with other packages I'll have to install when I get JNLP fixed.
Based on Mike Clark's answer https://stackoverflow.com/a/12608844/38765
I assumed that "Demos and Samples" is the way to install JNLP for Open JDK 7.
I'm on Ubuntu, so I'm trying to use the "Ubuntu way" to install it. I installed openjdk-7-demo , which describes itself as "Java runtime based on OpenJDK (demos and examples)".
It's still giving the error described above. What have I done wrong, or forgotten to do?
I tried browsing the tag wiki for java. The only non-video resource that looked relevant to me in "Beginners' resources" was "The Java Tutorials". The only link relevant from there was "Learning the Java Language". It had a section on packages, but that's only on how to create your own, rather than how to install other peoples' packages.
I'm using Ubuntu 12.04 (precise) 64-bit, and Java 7
java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1~0.12.04.2)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
If you want to use JNLP with OpenSDK, you need the IcedTea implementation of JNLP.
In Ubuntu, install the "icedtea-netx" package.
The libraries you need will be in /usr/share/icedtea-web/.
Just use $ javaws xxxxx.jnlp .
It works to me on :
(open-jdk-7 + Ubuntu 14.04)
Related
I tried installing the JAVA JDK on my laptop, provided by the installer on VS Code website as a "Coding pack for Java". It installed the JDK and the required extensions in VS Code. But then inside the editor, it didn't configure the JDK by itself. So I tried doing it manually and then I found that there is no "JDK" folder in the "Program Files" folder in C-drive. I tried to find everywhere inside that folder about the JDK, searched online at many places, and reinstalled it several times but still, nothing worked. I can't address the error. Please reach out to me if anyone knows the fix for it.
The following java version I tried to install:
OpenJDK version "17.0.2" 2022-01-18
OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8)
OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing)
Operating system and platform:
OS - Windows 10 pro 21H2 on x64
Platform - V.S.Code
[VS Code can't configure the JDK][1]
[1]: https://i.stack.imgur.com/VU0HH.png
There could be a few reasons why this is happening.
You can check installed Java versions and view their locations by using Registry Editor. There are a few possible keys to check, depending on what JDKs you have installed.
Standard Java -> HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft
Eclipse Foundation -> HKEY_LOCAL_MACHINE\SOFTWARE\Eclipse Foundation
Eclipse Adoptium -> HKEY_LOCAL_MACHINE\SOFTWARE\Eclipse Adoptium
If you want to check using Windows Explorer, some common locations include C:\Program Files\Java, C:\Program Files\Eclipse Foundation, and C:\Program Files\Eclipse Adoptium
If you installed using VS Code's Java helper, then it most likely installed Eclipse Adoptium.
Lastly, you need to make sure that Java is added to your system's PATH environment variable, along with JAVA_HOME (here is how you can do that).
Note that you will need to know the locations of your installed JDK and JRE. That is why I listed how to find said items first.
Hope this helps!
I am using eclipse for a coding course at school, and I am required to install Violet UML Editor http://alexdp.free.fr/violetumleditor/page.php to create PDF of classes.
Anyway, I downloaded a .jar file. My mac doesn't like that it's from an unverified developer so I must manually allow it to open in system preferences. The .jar opens to the loading tab but it wont open the program.
'''Javac -version''' in terminal says javac 16.02. As far as I know, JDK holds JRE which I need to run Violet. To be safe I installed JRE from Oracle which was a JDK 8 file but it didn't work so I just deleted it.
UPDATE: Using terminal and entering '''java -jar violetumleditor-3.0.0.jar''' I get the error code
Error: Unable to access jarfile violetumleditor-3.0.0.jar
the .jar is located on my desktop, it should be found
Also yes I did a fresh 3.0 version install to try and the same thing.
UPDATE 2:
java -version gives
java version "16.0.2" 2021-07-20
Java(TM) SE Runtime Environment (build 16.0.2+7-67)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.2+7-67, mixed mode, sharing)
Thinking it's a permission with accessing desktop issue.
There is a bug open for this:
https://sourceforge.net/p/violet/bugs/69/
I personally don't think it would be fixed anytime soon.
I can recommend two alternative tools such as:
https://www.visual-paradigm.com/solution/uml/uml-tool-for-mac/
https://gitmind.com
I can't find the directory in which to set up Java as my project JDK in IntelliJ. I tried pointing it to /usr/java/java[version-number] but IntelliJ said that it was an invalid directory. (I don't remember exactly what the folder was called, I just remember it was Java 8.)
I did some googling and found out that it may be because it was corrupted, and they recommended wiping it and doing a reinstall... so I deleted the java[version-number] folder in /usr/java and attempted to do a reinstall by downloading the jdk rpm file from Oracle's website, but apparently I still have the 1.8.0 JDK installed?
When I type in java -version into terminal, I get the following:
openjdk version "1.8.0_102"
OpenJDK Runtime Environment (build 1.8.0_102-b14)
OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)
I'm not sure where to go from here.
For me the problem was different. I installed IntelliJ's flatpack version of the IDE.
flatpack has restrictions to use the file system.
These directories are blacklisted:
/lib, /lib32, /lib64, /bin, /sbin, /usr, /boot, /root, /tmp, /etc, /app, /run, /proc, /sys, /dev, /var
Exceptions from the blacklist: /run/media
These directories are mounted under /var/run/host: /etc, /usr
So you have to use path something like /var/run/host/usr/lib/jvm/java-1.8.0-openjdk-amd64.
I actually downloaded the IntelliJ Toolbox and installed it from there.
try whereis java maybe it'll show up in your terminal
I am currently having huge issues installing HermesJMS (1.14 or 1.15) on OSX 10.9.2
Downloading the dmg file from their site fails with an error saying the .app file is damaged
So I download the jar file, with the installation being successful.
I downloaded the jar files from here: 1.14 1.15
I then switch to the terminal and run the hermes.sh in the bin directory and I get the following error
~$ ./hermes.sh
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.jidesoft.swing.SplashScreen.create(Unknown Source)
at hermes.browser.HermesBrowser.main(HermesBrowser.java:224)
Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to java.awt.RenderingHints
at com.jidesoft.swing.JideSwingUtilities.<clinit>(Unknown Source)
... 2 more
Here are my java versions:
~$ java -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
Does anyone have a clue as to why this is so?
I am basically wanting to use it to view a ActiveMQ topic
Any help would be much appreciated
Thanks
The problem has to do with Java not enabling web plug-in and Web Start features. I ran into this problem with Java versions 7 & 8 (jdk1.7.0_21.jdk, jdk1.8.0.jdk).
Java 6 is required.
Getting Java 6
Download and install Java for Mac OS X (1.6.0_65-b14-462): http://support.apple.com/kb/DL1572
Then follow these instructions to re-enable the Apple-provided Java SE 6 web plug-in and Web Start features: http://support.apple.com/en-us/HT202643
fyi - Installation locations
These are typical install locations for Java for OSX:
Apple-installed Java for Mac OS X install location: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Oracle Java install location: /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
Running HermesJMS with Java 6
To use Java 6 for the life of your terminal window:
~$ export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
then run
~$ ./hermes.sh
If your goal is to "monitor" a JMS Topic within ActiveMQ, you can use JMSToolBox on sourceforge
You only need a JRE 8 on the path
The first answer did work for me.
The JAVA_HOME variable issue could be fixed by using jenv utility.
download Java 1.6 as mentioned above;
install jenv;
add Java 1.6 to the list of versions managed by jenv:
jenv add /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/
Add the following lines to hgermesjms.sh file, # Setup the Java VM section:
jenv local 1.6
export JAVA_HOME="$HOME/.jenv/versions/jenv version-name"
jenv version-name should be quoted by backticks (`), Markdown stole them.
That is how it worked for me.
The fix is displayed in more details in this answer.
I have to start by saying that I have just switched to Ubuntu from Windows and I am new to Linux in general. Coming from Windows, I really am not familiar with how exactly the permissions work, the Linux file system, where I am able to create folders that I can use without the sudo command etc.
I use eclipse on a daily basis for android development and other simple java swing projects. I was able to download and extract the latest available version of eclipse (kepler) to this path: /opt/eclipse. Inside this directory is the eclipse executable and other eclipse related files.
I also installed the JDK and verified with the java -version command. It says:
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
I am running on a 64 bit CPU architecture so both programs are the 64 bit version.
Now, my problem is that if I open eclipse from the Unity dash or from the file explorer, it give me this error:
However if I run sudo eclipse in the terminal, everything runs just fine as long as I do it as the super user. I have a hunch that the JDK is installed in a folder that is restricted to normal users and only works if I run the sudo command but this is just a hunch. As I said, I am new to Linux and I am not really sure what I am doing wrong here, I am learning as I go. I need a good explanation as to how to make it start from the Unity dock without the sudo command. Thanks in advance!
You'll want to use the chmod command from the terminal to change the permissions on the Java folder. See this link for more information:
http://www.linux.org/threads/file-permissions-chmod.4094/
Well after running the which java cmd, I noticed that the path to the JDK from the eclipse.ini file was not pointing to the correct location. I fixed the path and now it works. I don't know how the sudo cmd overrides the eclipse.ini path to JDK but well, it works