Sikuli compiled jar file script running on other pc (requirements) - java

I could not find clear answer to this, I would need to know what is needed to run compiled sikuli script on other computer.I have a sikuli jar script that I transferred to one of our pcs at work and I expected this to run since I sucessfully installed JDK 12 there and that was the java version I did the coding on.
However, the jar gives me no response when I double-click it. I know that many things could be involved in this error but first I would like to cross out the basics.
So, my questions are:
Do I need sikuli IDE on that pc too in order to run it?
Do I need Eclipse/NetBeans installed along with it?
What is the standard procedure when moving sikuli scripts to work on other computers?
Thank you very much for your help.

Related

Bluej not running in Ubuntu machine

I recently installed bluej from ducke university's website which was written to to teach java programming in coursera courses.
It successfully installed but when i tried to run it was repeatedly giving error and I searched in internet but there were no exact solution given. The error it given was included in this question.
I even included the code snippet of bluej as well directories inside jvm.
unset JAVAPATH
FOUND="false"
for VMNAME in java-8-oracle jdk-8-oracle java-8-openjdk ; do
for JDKCANDIDATE in /usr/lib/jvm/"$VMNAME"* ; do
The directories inside jvm :
I am complete new to java so please help me to run successfully bluj.
Try downloading blueJ from the official website and reinstalling only one java JDK.
It might be a problem as u have 2 different versions of Java installed and running on one system
Moreover, if you have bluej the try running it in the blueJ application itself it is much easier
Even though Duke/Coursera say that you need the 4.11/Older Specific version of BlueJ, it's not actually right. You can install the latest version of BlueJ and use the packages provided by Duke University to run it exactly as they show you.
I was struggling with the same and made a video about it right now.
How to run BlueJ Duke/Coursera Specific Version 4.11 on Ubutnu or Linux with latest BlueJ

AppleScriptEngine in java jar is not working, what am I missing?

I am trying to incorporate Apple's script engine in my java app developed for macOs. I use eclipse to develop and when I run a debug build from eclipse all the Apple Script functions work.
As soon as I export it to an external jar and run that on the same machine they do no longer work.
I've searched and found some issues which I all tried, here is a summary:
using getEngineByName("AppleScriptEngine") now.
Adding the META-INF file javax.script.ScriptEngineFactory with the contents: apple.applescript.AppleScriptEngineFactory
cleaning and rebuilding several times
I opened the jar to see if the META-INF file is present and it is.
searched in /System/Library/Java/Extensions/ for a applescript jar file but it was not there.
I also searched for the /Library/Java/JavaVirtualMachines to see if it is there but also not the case
It is still not working. So I do not know what the difference is exactly between eclipse debug run and running a jar in macOs but there has to be something I am missing.
As far as I can figure out it seems that the apple scripting class is not installed but then how does eclipse use it?
As I understand there is a difference between java JRE versions so I am in need of a solution for all of them because I do not know what systems are running my app.
Any help is appreciated!

JavaFX - Deployed Application doesn't run on other PCs?

I have a problem with getting the Application to run on other People's machines.
I have tested a self contained and the normal .jar file.
When i pass them to a friend of mine who has java installed, when he opens the .jar file, there is an Error: "Java Exception has occured".
When i run both the .jar and the .exe off the self contained one, both do work on my PC.
So the actual question is:
Why isn't it working just like that?
Can't i just run JavaFX applications without installing the whole JDK?
Thanks for your help :)
Since Java 7 there exists the "javafxpackager", renamed to "javapackager" on Java 8 which uses some xml-configuration for generating your wanted "Installer"/distribution-package.
As this does not fit some peoples need, there exists a way to use maven:
the javafx-maven-plugin, you can find some examples about the usage of that plugin as linked.
Disclaimer: I'm the maintainer of the javafx-maven-plugin.

My program requires java JDK to run?

this is a kind of weird non programming (but java related) question.
I created a java program (game) using just normal java, and no libraries.
In ordor to double click/open it, you need to have java SDK/JDK (I don't know which) installed.
I tested this multiple times, and in order for my PC and Mac to launch it, you need to install it.
is there anyway to get around this? I know Minecraft doesn't force you to download the JDK.
Here's the link to source code of my game if your interested (no, it is not a virus): http://www.filedropper.com/daplatform
Thanks, Jake
Here's the link to the download of the JDK (Its next to the giant Netbeans download): http://www.oracle.com/technetwork/java/javase/downloads/index.html
What you can do is you can wrap both your program and the JRE required to run it into a single executable for the target platform.
For example your windows installer would include both a windows JRE and your program itself.
Launch4j http://launch4j.sourceforge.net/ lets you wrap a Java program into a windows executable and gives you options about how to handle the JRE, including bundling it.

Get a Java program to run on a computer without modern JRE

I made a simple text based game that runs on my computer, but my schools computers have an older version of java and can't run it. I tried compiling the .java file in from the computers command prompt but I can't access where the javac folder is to compile because the school computer blocks everything. The command prompt is even disabled by the administrator unless I open it with a batch file. I tried wrapping the jar with the JRE in Launch4j but the exe does nothing, it loads and that's it, nothing comes up (I think it's because the text game is supposed to run in the command prompt so there is no GUI to print any of the text)
How to get a Java program to run on a computer without modern JRE?
my schools computers have an older version of java and can't run it
Use the cross-compilation options of javac when compiling it at home.
You are running into a bit of a contradiction here; Please take notice on what exactly you are asking:
"How can I run a Java Program without Java?"
Do you get it? You are basically asking "How can I drive a car without the car?"
As for the actual problem, all hope is not lost. Here are some options:
If possible by any means, simply install the latest stable version of Java on the machine.
From a computer that has JRE/JDK installed (or through another form of access to the JavaCompiler, AKA JavaC), recompile the code to the older version of Java using the command-line parameters for source and target java versions (Note: I am unsure if the JRE/JDK for the older version must be installed in the machine or not).
For this case, you might want to take a look at this and/or this.
Choose another language to work with, and re-do your code into that language; You can't run Java code without Java, the same way you can't travel by train without the train to travel with.

Categories

Resources