Yomu and Heroku - java

I just installed the 'yomu' gem (https://github.com/Erol/yomu) in my application and deployed to heroku. On my local machine (Mac OS) it runs fine. I noticed in the documentation it states that JRE is required for it to work.
When I run the application on Heroku I get the following error:
Errno::ENOENT (No such file or directory - java -Djava.awt.headless=true -jar /app/.bundle/gems/ruby/1.9.1/gems/yomu-0.1.1/jar/tika-app-1.1.jar -t):
I'm assuming that yomu can't find the java compiler on Heroku. Am I reading this right? If I am, is there an add-on that I'm not considering?
By the way, the reason I'm using yomu is because it can extract text from doc and docx files.
Thanks!

If you're running on the Cedar stack then a JDK is available to you at: /usr/lib/jvm/java-6-openjdk
I'm not sure how Yomu finds your Java install, but it's probably looking in JAVA_HOME. If so then setting JAVA_HOME on Heroku should make it work:
heroku config:add JAVA_HOME=/usr/lib/jvm/java-6-openjdk

Not a java compiler - a java runtime (a JRE, like the documentation said). Installing a JRE as an addon is not (yet?) supported on Heroku.

In the new Heroku-16 stack, you can add jvm as a buildpack and you don't need to configure paths or anything else. Just make sure to have it set as your first buildpack. I tried it with Yomu/Henkei and it worked for me.

Related

How can I run eclipse properly? [duplicate]

I have formatted my Mac due to some storage issues. Before this, I used Eclipse in a proper way. Now i have installed the JDK
Then, i have installed Java
Until now everything seems to be correct but when I open the Eclipse installer...
What can I do to fix this? I need to work with this the soon as possible.
Thanks
Eclipse on macOS will not start with Java 14 installed, this is being tracked in Eclipse bug 561273.
Installing Java 8 as well does not help. You need to remove the Java 14 install. You could use the Java 13.0.2 release instead.
Eclipse have determined that the root cause of this issue is a change in Java 14 which is described in this bug report JDK-8238225. The fix for this should be in Java 14.0.1
Update: Eclipse runs fine with Oracle Java 14.0.1 so the issue has been fixed.
I also asked this question which was closed, that's why I answer what I have found out: Eclipse will not install on Mac OS Catalina 10.15.4, saying the above error message
Failed to create the Java Virtual Machine.
Deinstalling jdk and install an older one wouldn't help on its own because Eclipse is refusing to install in the first place (as mentioned above). What I have done:
i´ve installed an JDK with boost (you can try several, mine worked with Version 13)
I edited the installer:
Download the dmg file
convert the dmg-file with "hdiutil convert /dev/disk3s1 -format UDRW -o devimage"
mount the converted dmg-file with: "hdiutil attach -owners on devimage.dmg -shadow"
Edit the /Volumes/Eclipse/Eclipse.app/Contents/Info.plist: there is a section which is commented and there you can try the jdk version. You have to give the full path to the java executable, for example:
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home/bin/java</string>
Then my eclipse started from the (already) mounted Eclipse image without complaining
I had the same issue myself a while back. In your Eclipsepedia it provided an example of what the eclipse.ini file looks like when your trying to specify a JVM. So just change the eclipse.ini file and then make sure that you have all of the correct documents in that path to match the example.

Cannot install Ecplise on Mac:A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse [duplicate]

I have formatted my Mac due to some storage issues. Before this, I used Eclipse in a proper way. Now i have installed the JDK
Then, i have installed Java
Until now everything seems to be correct but when I open the Eclipse installer...
What can I do to fix this? I need to work with this the soon as possible.
Thanks
Eclipse on macOS will not start with Java 14 installed, this is being tracked in Eclipse bug 561273.
Installing Java 8 as well does not help. You need to remove the Java 14 install. You could use the Java 13.0.2 release instead.
Eclipse have determined that the root cause of this issue is a change in Java 14 which is described in this bug report JDK-8238225. The fix for this should be in Java 14.0.1
Update: Eclipse runs fine with Oracle Java 14.0.1 so the issue has been fixed.
I also asked this question which was closed, that's why I answer what I have found out: Eclipse will not install on Mac OS Catalina 10.15.4, saying the above error message
Failed to create the Java Virtual Machine.
Deinstalling jdk and install an older one wouldn't help on its own because Eclipse is refusing to install in the first place (as mentioned above). What I have done:
i´ve installed an JDK with boost (you can try several, mine worked with Version 13)
I edited the installer:
Download the dmg file
convert the dmg-file with "hdiutil convert /dev/disk3s1 -format UDRW -o devimage"
mount the converted dmg-file with: "hdiutil attach -owners on devimage.dmg -shadow"
Edit the /Volumes/Eclipse/Eclipse.app/Contents/Info.plist: there is a section which is commented and there you can try the jdk version. You have to give the full path to the java executable, for example:
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home/bin/java</string>
Then my eclipse started from the (already) mounted Eclipse image without complaining
I had the same issue myself a while back. In your Eclipsepedia it provided an example of what the eclipse.ini file looks like when your trying to specify a JVM. So just change the eclipse.ini file and then make sure that you have all of the correct documents in that path to match the example.

Vscode extension error, java runtime could not be located on window subsystem for linux

I have installed the java runtime in the window subsystem for Linux (Ubuntu), and the Vscode is installed on the windows 10 system.
I did not install java runtime in windows 10 system. When I use vscode to edit java, it usually pop up a notice says the "java runtime could not be located".
I have point the vscode "java.home" to the java jdk directory of window subsystem linux file folder, which is C:\\Users\\Myusername\\AppData\\Local\\Packages\\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\\LocalState\\rootfs\\usr\\lib\\jvm\\. In the folder, it has:
java-8-openjdk-amd64 directory, and three files
.java-1.8.0-openjdk-amd64.jinfo,
default-java
java-1.8.0-openjdk-amd64.
But however, the vscode still pop out the notice that the java.home variable defined in VS Code settings does not point to a JDK.
Can anyone let me know how to set up the vs code properly so that it can locate the JDK file in the window subsystem for Linux (WSL)?
Thanks in advance.
It won´t work like this because you are trying to use a jdk builded for linux on windows.
It is the same as if you download the jdk for linux and try to execute on windows.
As for the solution, unfortunately there is no solution right now.
However you can call your java and javac directly on terminal using WSL
wsl javac
You can´t point the java_home using wsl.
Maybe in the future the guys from Microsoft can make the trick. I hope so.

Tomcat 7 startup error: tcnative.dll is not valid

I use;
Windows 7 64 bit,
JAVA_HOME= JDK1.7 64 bit,
Tomcat-7 64 bit version
When I start tomcat from commandline it works ok, but when I use it within IntelliJ I get this error;
java.lang.UnsatisfiedLinkError: tcnative-1 (.\tcnative-1.dll is not a valid Win32 application.
I also point to an IBM 32bit JDK1.6 from IntelliJ in project settings, but this could not be a problem since this setup works on some other collegae's computers
I have read similar questions here, but none of them offers a solution for my case, any ideas, how can I fix this?
Here is a link which describes the problem :
Cause:
You get this message when you start Tomcat. Tomcat is looking for a shared object call tcnative (dll or so depending on the platform). If it doesn't find it, it'll revert to java libs. Either way, this shouldn't affect your application. tcnative dll is needed to address scalability in Tomcat.
Solution:
Turn down debugging level for Tomcat or
Get tcnative from http://tomcat.apache.org/native-doc/ (windows users can download the binary) and place it in your library path.
Lib path is usually: C:\Program Files\Apache Software Foundation{Apache Tomcat directory}\lib; for windows
Basically It seems that you may have an incorrect version.
Are you using multiple java on your machines if yes then try to look into environment variables for JAVA_HOME & PATH. Secondly, also paste the complete version of java and tomcat
Also run following commands at command prompt
java -version
javac -version
echo %JAVA_HOME%
And are you using MSI installer of tomcat or just a zip version of tomcat. Because in many cases MSI installer never work for some ghost reasons.

Error! How to install GlassFish in Ubuntu 9.04?

I try to install GlassFish on Ubuntu, and I get the error:
Could not locate a suitable jar
utility. Please ensure that you have
Java 6 or newer installed on your
system and accessible in your PATH or
by setting JAVA_HOME
when I type
echo $PATH
it prints out:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/jdk1.6.0_20:/opt/jdk1.6.0_20/bin
Where is the problem and how to solve it?
I have also read "Problems installing Java EE SDK on Linux", but it doesn't work.
N.B. Before reinstalling Ubuntu it works fine. This problem comes after reinstallation.
if you follow this tutorial you should be fine and all you problems will be gone:
http://www.nabisoft.com/tutorials/glassfish/installing-glassfish-301-on-ubuntu
The problem is that you have /opt/jdk1.6.0_20 in your PATH and the java executables are located in /opt/jdk1.6.0_20/bin. The best way is to define JAVA_HOME environment variable that contains /opt/jdk1.6.0_20 string and add $JAVA_HOME/bin to PATH variable.
The problem was related to user permissions. I think I tried to install GlassFish without enough rights.

Categories