After opening Eclipse once and without updating, it does not open again. It spits out the error "The Eclipse executable launcher was unable to locate its companion shared library." and does not open. I have Windows and used 7-Zip to unzip the file (I have read that windows default unzip tool corrupts the file). I would like to emphasize that it works once and without updating, but then if closed, will not open again. Thanks for any answers.
That's a very weird behavior.
The The Eclipse executable launcher was unable to locate its companion shared library error popup does indeed happen when you don't expand the archive according to Windows' bizarre requirements, and it seems you've documented yourself well enough before posting this.
I would advise:
erasing the eclipse folder
copying the downloaded archive to a "safe" folder like "My Documents"
right-clicking the archive there, and "extract here"
moving the extracted folder back to its location (32-bit or 64-bit
Program Files)
trying to launch again
Related
I am trying to write some code to use class from a downloaded java file. I saved them in the same folder and I can open the file with Eclipse. I noticed that there is a hollow "J" there, then I researched related problems online and knew that this is caused by the build path of files. Those methods told me to open the "properties" in "Project" section, but the icon is just grey and I cannot do anything with it!
How to solve this problem?
Eclipse does not automatically refresh changed content in the file system. You have to refresh the workspace whenever you edit/delete/add files directly in the file system. Right click on the project (or the subfolder) you want to refresh and choose 'refresh' (or F5).
I have the latest versions of both JDK and JRE installed on my Mac.
I downloaded unarchiver recently, and accidentally changed the default program to open .jar files to it, so now when I double-click on a .jar file it automatically opens in unarchiver.
I've been looking everywhere but I can't find any useful information on a simple way to just change the file association back. Java doesn't show up as an 'application,' so I can't just click on select a different application and chose Java as the application to open the .jar with.
Please help
I've tried importing from a jar file (quickhull3d for example) in Processing 2.2.1 and 3.2.1 on Linux and Mac based on the instructions given here
My directory structure looks like this
../Processing/Sketchbook/libraries/quickhull3d/library/quickhull3d.jar
The Processing IDE preferences set the sketchbook location to ../Processing/Sketchbook
In my .pde file, I have the opening line
import quickhull3d.*;
and I get the error:
No library found for quickhull3d
Libraries must be installed in a folder named 'libraries' inside the 'sketchbook' folder.
Note: I have seen this question asked repeatedly both here and on the Processing forum and to the best of my ability to tell, I am following the instructions as written. I have restarted the IDE before attempting to run the sketch and I have also tried copying quickhull3d.jar to /mysketch/code, which is manually doing what the IDE would do if you were to drag and drop the file onto it.
Follow up: Upon further investigation, it looks like the problem is that the .jar file itself does not point to the correct locations for the xyz.class files, so I believe this may be the culprit. Additionally, I discovered that the ComputationalGeometry contributed library for Processing contains QuickHull3d, obviating the need for me to install it manually. In the future, I will make certain the paths in the .jar are correct.
If you're using the Processing editor, the easiest way to install a non-standard library is to just drag the .jar file onto your Processing editor. This will move the .jar file into your sketch folder, and you can use it just like you can use any other library.
I'm trying to make a mp3 player and I used javazoom libraries. I save mp3 path in library.txt file to reopen them. There is not any problem with openning library.txt which is in the jar file.
Normally with eclipse program It is working well but when i created a jar file the problems begins.
I can't use absolute paths to open any mp3 file with my jar file.
File file = new File("/Users/orcungumus/Music/iTunes/iTunes Media/Music/Bruno Mars/Unorthodox Jukebox/1-16 16 Locked Out of Heaven.mp3");
try {
player.open(file);
} catch (BasicPlayerException e1) {
JOptionPane.showMessageDialog(null, e1.toString(),
"Error", JOptionPane.INFORMATION_MESSAGE);
}
For making thinks easier to understand i used directly path of an file. It works for eclipse, but with jar file it can't open file.
This is the error which i take:
If it is important i use mac os.
Edit: I realized that this is not about absolute path by making mp3 path relative. Libraries give an error about audio format. So, the problem is still exist. what can be the differencies between runnable jar file version and eclipse run for an project.
well, that's hard to find out.
now your problem is unable to open a audio file, which I can't handle.
However you said that the programme run perfectly using eclipse, so the question became
the different between running in eclipse and normal jar file.
FIRST, eclipse not directly use java.exe nor javaw.exe for execution. Instead, eclipse use some custom defined library in order to redirect the console, handling exception, etc.
(That is nothing to your problem)
SECOND, eclipse will set the working directory for you automatically (to the project root directory), where may contain some necessary native library.
THIRD, eclipse also define some path for native location for library, I think you may use eclipse built-in export to create the jar file which however not include the native library.
the second and third difference may help you, because they are quite effective to jar file.
I have just browsed javazoom briefly, I don't know whether there is native library. If not,
I sorry that you have to find other solution.
I have a very strange problem, that I can't figure out, the thing is that my aplication runs perfectly on the IDE (Eclipse), but not when exported, when I run the jar (double click) the aplication start but some functionality is missing (loading from a template file, but this does not happend when loading from a normal file), when I try to run it from console (java - jar my.jar) in order to see any error message it turns out that my aplication works perfectly fine! :S ...
Some more info:
My app is running over windows 7
I start the task manager, and I noticed that when I start my aplication using double click its under the name java.exe *32, and when I do it from command line its under the name java.exe (without "*32"), as far as I know I programmed nothing related to a 32 or 64 bits functionallity.
"Solved"
Well I was not able to solve it the way I wanted, as far as I was able to find, i found that there were a problem between the 2 java versions I was running x32 & x64, I deleted the 32 bit version and it start working as a charm, but I'm still not sure about what happend, I give my thanks to #Sajal Dutta one of its comments help me to understand part of the problem, thanks to all of you anyway, I'll keep searching until I find the problem...
When you create a jar from Eclipse, your assets don't get copied over to jar or location is not preserved. Open the jar and check if you have your templates in the right location or you have it at all.
To have the exported jar include your assets/resources-
Right click on your project in Eclipse. Then New -> Source Folder.
Name the source folder anything. e.g. template_src.
Copy or drag the entire directory of your template to template_src. Then make the jar.
Since it works via the command line but not when double-clicking the jar, it is likely that the working directory is different (and that you're loading the template with a relative path). When you run an executable jar by double-clicking, on some operating systems, the working directory is the home directory whereas when you run from the command line, it's the directory you're currently in.
The "files" in the jar are not handled by File, but are resources;
URL url = getClass().getResource("...");
InputStream in = getClass().getResourceAsStream("...");
Then, the file paths inside a jar, or on a non-Windows platform are case-sensitive.
"Template_A.xml"
is not
"template_a.xml"
Also you might inspect the jar with 7zip or WinZip.