I have a Java application that uses a native program (Graphviz).
Now I want to run this Java application in Heroku. Is it possible to set up the Heroku application so that Graphviz is available to my Java program?
You should be able to do this using multiple buildpacks via the Heroku CLI:
Set your application's default buildpack:
heroku buildpacks:set heroku/java
Add the apt buildpack so you can install Ubuntu packages:
heroku buildpacks:add --index 1 heroku-community/apt
Look at your configured buildpacks to ensure that the Java buildpack comes last:
heroku buildpacks
Add an Aptfile to the root of your repository listing the packages you want to install, in this case:
graphviz
Commit the Aptfile and deploy. The apt packages listed in Aptfile should get installed first, then your Java application will get built according to the Java buildpack.
I'm trying to deploy a nodejs app to swisscom application cloud.
The app uses the node-java module.
While staging the app, I get an error message:
[node-java] Error: not found: javac
is it possible to deploy apps with multiple buildpacks (e.g. nodejs and java) like on heroku (besides creating a custom buildpack)?
#UPDATE:
I'm (now) aware of the (experimental) multi-buildpack for cloudfoundry. unfortunately it won't detect my app as java app (which isn't) and anyway, it would ony install the jre but not the jdk.
Is there a possibility (besides a docker image or custom buildpacks) to have jdk in the app container?
because there seems no way to add custom packages to the cf base image (cflinuxfs2) provided by swisscom, I forked the official cloud foundry buildpack and let it install the openjdk-7-jdk package before doing all the nodejs related stuff (https://github.com/juckerf/nodejs-openjdk-buildpack)
(unfortunately the multi-buildpack with the nodejs buildpack and herokus apt buildpack didn't work for me because the nodejs buildpack was executed before the apt buildpack, regardless of the order in the multi-buildpack.yml)
I have two jdks and jres installed in my pc java 1.5 and java 1.8 for some work purpose. Now I have one instance of tomcat 5.5 which I took from another pc and pasted it in my pc c:/servers folder. It is running fine using java 1.5. So I set the JAVA_HOME and path to java 1.5. Now I downloaded tomcat 7 binary distribution zip file and extracted it in my c:/servers directory. I changed the connector port, shutdown port and AJP port to different values. set CATALINA_BASE to c:/servers directory. But when I'm running the startup.bat two windows are popping up for a sec and they are closing. The server is not starting. I found the error as java.lang.UnsupportedClassVersionError. Bad version number in class file
Then I tried to install tomcat 8 using windows installer with again different port numbers in the same c:/servers directory which worked perfectly. It started and tomcat home screen also loaded. My work is survived with tomcat installer but I want to know why manual configuration failed.
OS = windows 10 64 bit
Please help me in making manual configuration of tomcat. If any other information is needed, I'll provide.
EDIT 1
I got this error java.lang.InvocationTargetException when I tried to install another instance of tomcat 5.5 manually in c:/servers directory
The exception UnsupportedClassVersionError occurs when you try to execute *.class files with an older version of Java as they were compiled for.
In your case, you are trying to run Tomcat 7 with Java 1.5, but its minimum requirement for the JRE is version 1.6. The latest version of Tomcat that supports Java 1.5 is Tomcat 6. Check out this overview for more information:
Apache Tomcat Versions
I am using Ubuntu operating system with Java version 1.7.0_15 (Iced Tea). I am unable to access the Java web start application. Every time I start it I get message that Java web start requesting JRE 1.7 and then says that it is unable to install so manually install and then it failed to install the JRE. I do not know what to do.
Here is my java version
Here is few important information
1. I have validated JNLP file using JaNeLa and there is no error.
2. Ubuntu is opening Application with JRE 1.6 perfectly fine.
3. On Windows every version is running perfectly fine.
4. I have tried with deployment tool kit but the always redirect me to the Sun page to download the linux version of JRE and even after installing that it again redirect me to the download page.
Please let me know if I can provide more information.
So finally after working whole day I have found the problem with my system. I am not sure why my question got -3 but it was valid question. The problem was with the Java plugin in the Firefox browser. Although I have installed jdk 7 on my machine but the firefox plugin was still pointing to the jre6 so giving error. So I have to manually create the link for the jre 7 in my machine
ln -s /usr/lib/jvm/<<location of jre 7>>/jre/lib/i386/libnpjp2.so ~/.mozzilla/plugins
Then I restarted the browser and make sure that I have the latest plugin and it started working, So it was not the java installed but it was firefox plugin.
Just FYI, oracle has stopped it support for java plugin for linux due to some licensing so you have to install it manually. Thanks
You can check the installed plug-in by typing 'about:plugins' in your address bar of firefox
IMHO OpenJDK 7 is not a JRE 7.
You may uninstall it before install oracle jre. Otherwise you have to use sudo update-alternatives to define the default java version
See https://askubuntu.com/questions/67909/how-do-i-install-oracle-jdk-6
I'm facing a problem here. I want to use a special version to run our java webstart application but just for one jnlp. ("It was tested, ... blabla we can't use a new version... blabla" by random windbag)
So I tried to configure our JNLP like this:
<resources>
<j2se version="1.6.0_29" href="http://java.oracle.com/products/autodl/j2se"/>
...
</resources>
When I start this jnlp now I get following Error even if the right Java is installed:
Error: The application has requested a version of the JRE (version 1.6.0_29) that currently is not locally installed. Java Web Start is unable to automatically download and install the requested version. This JRE must be installed manually.
Update
In the JNLP File Syntax it's allowed to use a specific Java version like 1.6.0_29. I even tried it with 1.6.0_29-b11 - still the same error.
Exact product versions (implementation versions) may also be
specified. by including the href attribute. For example, 1.3.1_07,
1.4.2, or 1.5.0-beta2 by Sun Microsystems, Inc. For example,
<j2se version="1.4.2" href="http://java.sun.com/products/autodl/j2se"/>
or
<j2se version="1.4.2_04"
href="http://java.sun.com/products/autodl/j2se"/>
Edit
The given answer is not helping and not the right answer.
This is quite common. Make sure that each client machine has enabled 1.6.0_29 for JNLP/Webstart.
Installing 1.6.0_29 is not necessarily enough to tell webstart that it's available. See this post for more information
I had installed Java 1.6.0_21 and it was enabled at the Java Control Panel. However I got the same error message that it's stated in the question: "The application has requested a version of the JRE (version 1.6.0_29) that currently is not locally installed"
I got this message even if I tried with different lines in the JNLP, such as:
<j2se version="1.6.0_29"/>
or
<j2se version="1.6.0_29-b06"/>
I solved this by editing the JNLP file with the following line:
<j2se version="1.6"/>
So the documentation line "Exact product versions (implementation versions) may also be specified" seems to be false.
Do you use :
jnlp spec="1.0+"
If so you should try with :
jnlp spec="6.0+"
I found this link, maybe there is something wrong in the configuration of your browser/JRE, or are you under a proxy?
Troubleshoot:
Check the the version currently assigned to your project build path of your IDE
Make sure the version specified in j2se version="1.6.0_29" is installed on client machine.
Check your machine to see if you do not currently have any other versions currently installed which might cause dependency conflict.
Check your classpath setting to see the version currently set by default. Could this be the right version?
Also note that:
The j2se element specifies what Java 2 SE Runtime Environment (JRE)
versions an application is supported on, as well as standard
parameters to the Java Virtual Machine.
Therefore if you are looking to release the application to some specific versions, all the versions supported should be listed. Example:
<j2se version="1.3" initial-heap-size="64m"/>
<j2se version="1.4+"/>
In your case you've specifed the href attribute forcing Java Web Start not to consider an installed non-FCS (i.e., milestone) JRE as a match.
By convention a non-FCS (milestone) JRE if there is a dash (-) in the
version string. And so would not consider an installed 1.4.1-ea or
1.4.2-beta JRE as a match for the request.
Edited.
Auto-download of Software from java.sun.com
Try this url
j2se version="1.6.0_05+" href="http://java.sun.com/products/autodl/j2se"/>
if there are higher versions installed on the client machine the newest will used.
or
j2se version="1.6.0_05" href="http://java.sun.com/products/autodl/j2se"/>
then you will be prompt to install exactly 1.6.0_05.
when calling ?.jnlp versions 1.6.0_05 will be used.
be careful; above only works right when there's also i higher version installed then as example 1.6.0_29 runs 1.6.0_05 as a child.
In the Java Console you will see:
JavaPlug-in 1.6.0_31
Using JRE-Version 1.6.0_05 Java Hot Spot(TM) Client VM
If you really want to download a version not listed in the "The packages currently available for auto-download " then you can download the specified version 1.6.0_29 only if you have a greater version then 1.6.0_29 (maybe 1.6.0_31) as plugin enabled in the client browser. TEST install 1.6.0_31 and look if as Example: Firefox plugins 1.6.0_31 is there and enabled. Then the client will be able to automatic download and install 1.6.0_29 via *.jnlp.
Call your Application in a client browser. A warning appears : "Install a lower Version 1.6.0_29" and a "certificate warning" click yes. install 1.6.0_29 starts.
After Download the Browser restarts and the plugin 1.6.0_31 is gone!!! Therefore
the Browser redirects to the Oracle download-side there you have to install the 1.6.0_31 again. Download starts to a folder you specified . Run the file "jxpinstall.exe" that starts the update; prompt to question install again ; yes (all browser must be closed) Install starts; Look at extras, plugins and there the 1.6.0_31 plugin is back again. Now you can use your *.jnlp application with 1.6.0_29. Really much work :-)
NOTE: You will not be able to install the browser plugin again with a file like "jdk-6u31-windows-i586.exe" You must follow the steps above. You will get a file "jxpinstall.exe" that is the right one.
The java.sun.com auto-download feature simplifies Java Web Start deployments because it makes commonly used software readily available for use with Java Web Start. Typically, only an extra line has to be added to a JNLP file to take advantage of this feature. ...
The packages currently available for auto-download are:
Java 2 Runtime Environment 1.3.0_02 for Windows/i586, Linux/i586, and Solaris/SPARC
.....
Java 2 Runtime Environment 1.4.2_16 for Windows/i586, Linux/i586, and Solaris/SPARC
Java Runtime Environment 1.5.0_02 for Windows/i586, Linux/i586, and Solaris/SPARC
.....
Java Runtime Environment 1.5.0_14 for Windows/i586, Linux/i586, and Solaris/SPARC
Java Runtime Environment 1.6.0 for Windows/i586, Linux/i586, and Solaris/SPARC
Java Runtime Environment 1.6.0_04 for Windows/i586, Linux/i586, and Solaris/SPARC
Java Runtime Environment 1.6.0_05 for Windows/i586, Linux/i586, and Solaris/SPARC
available packages look here
Its the damn java version, use of the lower versions fixes the issue. I used Java 1.8.0_05-b13 Java HotSpot(TM) 64-Bit Server VM and it went through successfully.