Jnlp can be launched from Cygwin but not MS-DOS using javaws - java

I can launch a JNLP file from Cygwin but not MS-DOS on the same machine. I am using javaws and getting the error to the effect that javaw.exe not found. I read http://javatechniques.com/blog/launching-java-webstart-from-the-command-line/. that one can use java compiler to do the launch So I tried that as well that looks something like this:
c:\Program Files\Java\jdk1.8.0_60\jre\bin>java -classpath
"C:\Program Files\Java\jdk1.8.0_60\jre\lib\javaws.jar;
C:\Program Files\Java\jdk1.8.0_60\jre\lib\deploy.jar"
-Djnlpx.home="C:Program Files\Java\jdk1.8.0_60/jre/bin"
-Djnlpx.jvm="C:\Program Files\Java\jdk1.8.0_60\jre\bin\javaw.exe"
-Djnlpx.remove=true
-Djnlpx.splashport=-1
com.sun.javaws.Main c:\tmp2\new_3.jnlp
And when I do that I get this error:
Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/deploy/util/DeploySysRun
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: com.sun.deploy.util.DeploySysRun
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
I would appreciate any help.
Thanking you

Related

IntelliJ keeps giving a JNI error related to Spark

I installed IntelliJ and Java SDK, updated my environment variables, and in "Edit Configurations" the correct JDK is listed under "Build and Run". And I still keep getting a JNI error. None of the other answers have worked so far, I'm completely stuck. Spark is installed at C:\Spark\spark-3.0.3-bin-hadoop2.7 (environment variables have been update). In misc.xml I have:
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
The full error is below. Why does this keep happening?
java.lang.NoClassDefFoundError: org/apache/spark/sql/SparkSession
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.apache.spark.sql.SparkSession
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
Error: A JNI error has occurred, please check your installation and try again
Picked up JAVA_TOOL_OPTIONS: -agentpath:"c:\windows\fireeye\javaagentdll.dll"
Exception in thread "main"
Process finished with exit code 1

NoClassDefFoundError when running UI Automator Viewer

I'm trying to run Android's UI Automator Viewer on my Windows machine. I have the following installed:
Latest Android Studio
JDK 8
Latest Android SDK
I'm running the following command:
uiautomatorviewer
When I run it, I get an error related to SWT:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Control
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:650)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:632)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Control
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 7 more
Anyone know what I'm missing?

Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/Capabilities

I’m trying to run my program through the command line and i’m getting the above exception. I’ve compiled it through the cmd and it went fine. I am also running the program in Eclipse with no issues. Why do i get this exception from the command line?
Here is the full exception:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread “main” java.lang.NoClassDefFoundError:
org/openqa/selenium/Capabilities
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.Capabilities
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 7 more

How to add Jar to Submodule in Android Studio

I create a proyect in Android Studio, and I have a submodule where all logic it's done, I try to add a .jar but it don't work I get an error, but Android Studio don't show any error until I try to execute and compile.
This is the error:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: es/uam/eps/multij/Tablero
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: es.uam.eps.multij.Tablero
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
BTW:if I extract the jar and create a package with the same path it works.
This is the gradel: https://i.stack.imgur.com/NjZ4a.png

compile code [ApacheactiveMQ] JMS on OSx/Unix like

Hi i've installed the java libreries and ApacheActiveMQ and it works fine, I check the queues and topics on Chrome and the provider is up, but when I try to compile the code using the terminal it doesn't compile. So How can compile this kind of code?
The error is:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/jms/MessageListener
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: javax.jms.MessageListener
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more

Categories

Resources