Why does my uberjar not work on Windows 7? - java

I created a new project using Clojure by doing this on a Mac:
lein new app clojure-noob
Created my uberjar using
lein uberjar
Sure enough, I can run this uberjar via:
java -jar target/uberjar/clojure-noob-0.1.0-SNAPSHOT-standalone.jar
And I get:
Hello, World!
Now I take this file to Windows 7 and give the same command:
java -jar clojure-noob-0.1.0-SNAPSHOT-standalone.jar
I seem to get an infinite wait. Why can’t I get to runt his .jar file on Windows?
The java version on Mac is:
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
The java version on Windows 7 is:
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) Client VM (build 25.66-b18, mixed mode)
lein version gives the following: Leiningen 2.5.3 on Java 1.8.0_51 Java HotSpot(TM) 64-Bit Server VM

The answer is that I was trying to run the .jar from shared folders on a Windows 7 VM from VirtualBox running on a Mac. This IO is very slow.
When I just copy that file to, say, Desktop and run from there - the access is quiet fast. Thanks SubOptimal for helping me figure this out.

Related

Why cant i run Jar file in Windows?

I am trying to run a javaFx jar in windows cmd with java -jar filename.jar but i get this error:
Error: JavaFX runtime components are missing, and are required to run this application.
In intellij works the programm fine but i cant run it in Windows. Any Ideas?
This is my Java Version
java version "11.0.5" 2019-10-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.5+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.5+10-LTS, mixed mode)

Check the if version of JDK installed on macOS is the correct one

I have a macbook with latest HighSierra installed and from System Preferences / Java Panel. It says that i have got latest Java version installed: java 8 update 181.
From the "Java" tab of the aforementioned "Java settings" dialog i can see that the version 181 it is referring to is installed in /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
If i try to execute that binary (i.e. java -version) i actually get:
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build
1.8.0_181-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
however when i try to launch "java" from a generic prompt or if i try to execute javac i get a different result:
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
this latter java is installed in /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/
So it seems to me that i have got a jre (181) and a jdk (40) is this correct?
if so, is this the correct setup on mac? i started to wonder when forticlient analyzer showed up a bunch of CVE security issues related to JDK that are fixed in update 181.

Can't create Java VM rjb ubuntu

I am using rjb to connect java classes in my rails application...
But I am getting this error can't create Java VM
My ruby -v gave me
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
and java --version
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
I went through this post Error “can't create Java VM” trying to use Ruby Java Bridge (RJB) gem but the problem is I can not install 32 bit java as it is needed by some other application
I would download the jdk from oracle (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html), the version you need. Then for your application set JAVA_HOME to that install directory. You can have multiple different jvms installed on a system.

No Java runtime present, requesting install

I have java JDK installed sucessfully in my mac os 10.9 ..
$ java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
But when i try to run eclipse it asks me to jave SE 6 Runtime again !!!
It looks like eclipse is unable to locate the installed java. You can tell eclipse to point to this version of java by modifying eclipse.ini file
In eclipse.ini file, we need to add -vm option to point to the java8 location:
See: http://wiki.eclipse.org/Eclipse.ini#-vm_value:_Mac_OS_X_Example

Eclipse launch error- error code 13

Eclipse returns this error message when launching:
I am pretty sure that both the java installation and Eclipse are both for my 64-bit system.
Here is my .ini file:
Your version of Eclipse looks OK, based on the filename.
To check your version of Java, run java -version in a console. On Windows 7 with 64-bit Java 6 I get:
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)
Check that this is the version being used by Eclipse, as shown in your error code. If not, call that version explicitly, e.g.
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -version
I moved the
-vm
up below the first openfile, not the second.
PIC:

Categories