I'm developing a desktop application using javafx v8.0.60. I have created an exe package with ant in netbeans 8. When I run exe file in my computer, it is installed and run without any problem.
On the other hand, when I try to install and run it on some other computer, at the end of installation, window dialog pops up:
"Error invoking method"
I click Ok. Another window pop up saying:
"Failed to launch jvm"
Davood, greetings! I had this same problem and I, like you, found no help anywhere.
I submit to you a solution, which miraculously worked for me and helped me make sense of those blasted "Error invoking method." and "Failed to launch JVM" dialogs:
Find your .jar file
It has the same name as your Project and it's in your application's installation directory under AppData\Local\{ApplicationTitle}\app (shortcut: type %appdata% into explorer); if your project was named HelloWorld, there you will find HelloWorld.jar
Navigate to it's directory in command prompt
shift+Right Click any blank spot in the Explorer window and choose "Open command window here" (that's a fancy trick I recently learned; alternatively you would cd to the same directory using the command prompt)
Run your .jar via the command line
type java -jar "HelloWorld.jar" and hit Enter
Tadah! Behold your hidden exceptions (the existence of which "Error invoking method." so vaguely tries to communicate to you). *
If your problem is similar to mine it stems from a file structure difference between the project out folder and the installation directory, and that's why the program compiles just fine in the editor and builds just fine—there isn't a problem until it's built out, and the file structure is a little different.
*If you didn't get anything when you ran it via the command line, look for any errors that could be happening during that initialize() method; that's where your problem likely is. You can expose any exceptions during runtime by using a Popup Exception Dialog like shown in a similar problem, here.
Related
error while loading shared libraries: libopencv_core.so.3.0: cannot open shared object file: No such file or directory.
I am using eclipse c/c++ ide on ubuntu 14.04. Tried everything which I got from google
You are trying to run in Eclipse so the solution provided (The export part) in openCV program compile error "libopencv_core.so.2.4: cannot open shared object file: No such file or directory" in ubuntu 12.04 May not work.
I suppose you have installed open cv following the instructions provided in open cv documentation. If so, you can get rid of this problem by adding the following environment variables to the eclipse runtime.
Name - LD_LIBRARY_PATH
Value - $LD_LIBRARY_PATH:/usr/local/lib
Steps
Click on Run As -> Run Configurations
On the window on the right hand side you see the Environment tab.
Here click on New, you'll see a New Environment Variable pop up.
Here, for Name enter LD_LIBRARY_PATH, for Value enter $LD_LIBRARY_PATH:/usr/local/lib. click ok and Apply
Now run again, you shouldn't see the issue.
I had the same problem too. Upgrading to the latest Eclipse version solved it.
I am having trouble opening soap ui.
I have gone onto their website and downloaded SoapUI-5.0.0-mac-bin.zip from http://sourceforge.net/projects/soapui/files/soapui/5.0.0/
I have then unzipped it and have many different files but there is none with the icon to open the application. Someone said to open soapui-5.0.0.jar in the bin folder but when I do I get an error saying it cannot be launched and to check the console for possible error messages.
I cant seem to find the error message on the console - I have very limited technical ability I think haha I am running 10.9.2 apple OS if that helps at all.
I would attach screenshots but my reputation isn't good enough
In the bin folder there is a file named soapui.sh. To start SoapUI you can run this file from the terminal.
A possible easier way to run SoapUI is to download the SoapUI-5.0.0.dmg file from http://sourceforge.net/projects/soapui/files/soapui/5.0.0/. Running that file will start an installer for SoapUI. Once installed you will get an icon on your desktop that you can use to start SoapUI.
I am starting out Erlang in Win 7 64 bit box and I was able to use Erlang IDE just fine and since I am used to Eclipse I wanted to use Erlide with Eclipse. I am following running project document on erlide I was able to follow along. (Except step 41, Where it is talking about adding something to 'Main tab' and in my case it shows as 'Erlang', but options they are same) When I run the 'new configuration' on the HelloWorld example it runs and stuck at 57%.
I did install Erlang on my PC and installed it in a directory without space and it does shows up on my installed runtime in Eclipse.
When I run I do not see 'Eclipse IDE' like I saw when I was running Scala IDE in eclipse.
I did enter a dummy cookie name just in case if that is the problem
I tried running 'erl -name foo' to make sure node is able to run and it did.
Is there anything I need to check?
Thanks
Try first this:
* delete the configuration you created
* open a file in your project, right-click in it and choose Run as -> Erlang application
This will create a configuration that should work. You should see a console opening, where you can interact with the Erlang node.
If that is not happening, please go to window->preferences->erlang->report problem and create a report. Attach it to an issue at https://github.com/erlide/erlide/issues or send it to erlide_bugs#lists.sourceforge.net
I have the same problem on Win 7 - 64bit.
Problem: After some very first times build and run successfully, then eclipse couldnt run anymore. Restart Eclipse won't help.
Solution: Restarting the computer, and plz remember to Build Project before running it.
while loading my application on BlackBerry simulator its displaying given below an error
Unable to start simulator. Check that the file exists. (java.lang.IllegalArgumentException: Executable name has embedded quote, split the arguments)
I had same issue whilst trying to run the demo application.
I am running Windows 7 Professional,JDK 7u21 and STS 3.2.
This is an issue with the changes made to the decoding of command strings specified to Runtime.exec method.
In summary the path configured for the simulator launch contains spaces.In my case "C:\Program Files (x86)"
To Fix this issue
Copy the simulator Dir and MDS to a new directory that has no spaces.
From the run configuration settings,enable the use of Customized Command line ,Customized Working directory and Customized MDS directory.Update the
entries to point to the new path that has no spaces.
Alternatively you can use windows shortened dir name by typing dir /X in the CMD from the directory that contains the simulator and MDS,this should give you something like PROGRAM~2
In the end ,the issue is not with the IDE or the Simulator,just java and windows not playing nice.
see Oracle JDK 7u21 release note
My solution was:
Go to debugger Configurations, Simulator, Advanced and COPY the "default command line".
Hit debug. When the alert with the error appears:
Open a shell/cmd and paste the text obtained in step 1, hit enter.
It should open the emulator an the debugger should attached without a problem.
This is not an error, this is an "upgrade" of Oracle Java due to security issues, you cannot longer execute commandlines with arguments if theyre not passed as an array..
Hope it helps.
Also:
Here is the error documentated:
http://www.oracle.com/technetwork/java/javase/7u21-relnotes-1932873.html#jruntime
Heres the patch but only for java 17 and earlier:
http://www.oracle.com/technetwork/topics/security/javacpuapr2013-1928497.html
remove the Java 7 and keep only the java 6 and it will work fine
i have the same issue and i solve it with the above solution
I am developing a BlackBerry Application with a number of class files in it; 16 java classes at the moment and they keep increasing as this App is complex with a lot of screen and features. I am working in Eclipse with the BlackBerry Java Plug-in. I am using BlackBerry JRE 6.0. I have recently started getting the following error:
Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified
I have Google for this error and many suggest this is caused by Java Environmental Variable path. However, I have checked and everything seems to be fine at my end regarding that. I have noticed that when the number of classes is increased or a class becomes more lengthy, this error occurs. I get rid of the error by reducing the number of classes in a project. I created separated projects dividing the classes between each and it compiled fine. So I can believe that there is no issue with the source code.
Can anyone guide how to overcome this error in a single project that contains several classes. Please help.
EDIT: I came across the following on BlackBerry Support Forums:
"I think the most common reason for this (assuming that you have the JDK installed) is a large number of files in the project, and/or a project directory that is very far from the root.
The issue is that the RAPC compiler calls the JAR utility, building a command line that consists of all the class files in the application. If the command line length exceeds the maximum length allowed by the system, you will get this error."
How to work around this IF this is whats causing it.
I was lucky to resolve this error. This link has been very helpful from BlackBerry Support Forums. For anyone else facing the same issue, the following steps resolved my issue:
Right Click My Computer. Go To Properties.
Click Advanced System Settings.
Click Environment Variable
Highlight PATH and click Edit. Add C:\Program Files (x86)\Java\jdk1.6.0_26\bin; to the start of the PATH.
Step 4 adds the java jar file to the PATH variable and adds it closer to the root. Adding closer to the root is helpful when compiling a project with several classes.
As the error says Cannot run program "jar" under Windows that means it cannot find the jar.exe executable file.
The problem, at least in my case, was that JAVA_HOME was pointing to the JRE on my computer (where there is no jar.exe in its "bin" folder) and not to the JDK where the jar.exe resides under its "bin" folder.
The solution was very simple - changed JAVA_HOME to point to the JDK root folder - in my case that was "C:\Program Files\Java\jdk1.7.0_15".