I have created a JAR file using Eclipse Neon. I have done this before for this same project with no issue but for some reason now it is not able to run. The size of the JAR file before would end up being 11,597,123+KB but now it is only 12,226 KB. I am not sure what changed. I am attaching a link to a screen recording to show what I am doing. http://screencast.com/t/DAERIVpv9
I resolved my issue although I do not know what was causing all of the previous problems finally exporting as an executable jar file worked.
Thanks for the help and direction pointing it really helped.
Related
enter image description hereI tried to run a jar file through a batch file, but it closes without opening the UI that is meant to run with the file.
I tried downloading Jarfix, but could not double-click to run the jar file in question. Instead, it did nothing. I also tried opening with javaw, but it also did nothing. I’ve done the same thing a year ago and it ran fine. I also tried updating the Java version to the latest one. The jar file was expected to run and open a UI. Please help
Problem solved. There was a duplicate java folder in Oracle->Java, which I promptly deleted.
hope you having a good day.
(Context of the problem ahead)
My problem is when installing JDeveloper suddenly appeared me an error log in the Oracle Universal Installer. Before this step of installation I passed an obstacle of the typically problem of the .zip file not founded (The error mentioned: Error to install Oracle JDeveloper). I changed the name of the .zip and then it seemed that I was on the right way of installing JDeveloper.
It's worth to highlight here, that I'm in Oracle Universal Installer. Because I can't still post images.
The problem here is that the file in fact exists and tells me that doesn't exists, it appears to indicate the path of the .zip file is: Disk2/stage/Components/oracle.ide.help.extras/12.2.1.4.0/DataFiles/filegroup1.jar
I already saw the .zip file without unzipping it and YES there's the .jar mentioned in the log:
I tried to download the same exact .zip file looking for if the file was missing in my .zip file, but I had the surprise that actually there it is.
So, if you have had the same problem I beg you to bring me help as needed as it is like from a colleague of you
I'm pendent of any response of you guys, hope you could help me. Beforehand, have a nice day.
I have an application (DrawFBP) which has a Help facility. built using JavaHelp. I actually had it working for several years on the Eclipse IDE, but I had never tested it running in the jar file. The Help facility uses a number of html files, and some other stuff, and one informant said I can get them included on the jar file by putting them in a resources folder (src/main/resources) . This seems to have worked! After lots of restructuring, I got my Help facility working on the jar file, but it stopped working on the IDE. The IDE version is crashing on a FileNotFoundException referencing a file with extra levels of qualification - where do they come from? I am probably making several dumb errors - but help would be much appreciated! The project can be found on GitHub - https://github.com/jpaulm/drawfbp . The code and resources are there, but Git wants me to add all my code back in again - not sure why... TIA
Somehow got it working - the trick seems to be to include the resources in a folder called 'resources' under src/main. I will accept this answer - unless someone comes up with a better one!
I've run .jar files before, but I've encountered a "different" situation, and I'm not sure what to do. I'd appreciate if someone could help me out.
Previously, I programmed with Java 6 and Eclipse Juno exported all my programs to runnable jar files. I'd get a .jar file that I could run by just double clicking on it. The files always looked something like this (note the jar file icon):
Recently, I wrote a program in Java 8 with Eclipse Luna (Release 4.4.0) and exported it to a runnable jar file, and I got something different (note the different file icon):
It no longer runs when I double click it. Instead, my computer uncompresses the jar, as it would a zip file. I tried running it from terminal. I cd'd to the directory and typed
java -jar graph3D.jar
I got the following error message:
Error: Unable to access jarfile graph3D.jar
After uncompressing the jar file, I found a folder named META-INF with the manifest file, MANIFEST.MF in it. It was the only file that seemed to resemble an executable file. Do I have to do something with that?
Could someone explain how I can run the second jar file graph3D.jar? Is it something new with Java 8, or something different about Eclipse Luna, or something else?
(Both programs run fine in Eclipse, by the way)
Thanks for your time and help.
Edit:
Below was the dialog box Eclipse displayed if anyone is interested.
Selecting "Use .jar;.zip" makes the filename "graph3D.jar;.jar;*.zip" .
Selecting "Use .zip" makes the filename "graph3D.jar;*.zip"
Selecting "Cancel" doesn't let you go forward.
You'd have to manually delete the extra file extension.
Somehow when you exported the file, the filters for the file dialog box (*.jar;*.zip) got attached to the filename, which is graph3D.jar;*.jar;*.zip, not graph3D.jar. Java can't find it because it doesn't have the name you supplied. Rename the file and pay close attention next time you export; either you fat-fingered something, or you're triggering a significant bug that needs fixing.
I recommend that you will access the build folder after you've built your project on the IDE under your project folder (in your workspace) and copy both the libraries folder and the .jar and post them wherever you want the program to be "installed", you'll then have an executable jar that should run smoothly without problems, just as I said don't forget the lib folder.
I think there is nothing new in Java 8 related with the running jar, I guess you need to check the the Eclipse export issues, it seems your classes are missing from your second jar file.
I have a problem while runing my application in eclipse. I make some edits like this:
String res = "newvalue";
System.out.println(res);
But when I run the application I still receive "oldvalue" in output. After this I tried to delete main() function - and I run application and I see "oldvalue" in output again.
Maybe it's some cache in JVM, or smth. else?
UPD:
It's 15:35 on my clock now. But in /bin folder I see .class files with 14:33 timestamp. I change source files (.java), press ctrl+f11 in eclipse and files in /bin folder are still 14:33 ...
UPD2:
After cleaning the project I receive the following problem:
The project was not built due to "Could not write file: D:\projects\NelderMead\bin\ru.". Fix the problem, then try refreshing this project and building it since it may be inconsistent
SOLUTION
The problem was that eclipse can't write file to the folder with spaces and UTF chars in it's name. So, I copy project to the new clean workspace and it runs without problems! Thx all for help detecting the problem!
You're executing an older class files, the reason could be
a compile error somewhere else (see problems view)
or your changed accidentally the source path so that the new source no longer gets compiled.
Try to clean the project and make sure the new classes are compiled to your output folder.
The JVM doesn't have a cache for class files.
First, make sure the file is saved (there is no asterisk next to the file name in the tab). Usually files are saved automatically, but you could choose not to save files and never ask by mistake, the first time Eclipse pops up this dialog.
Then see what's going on in the Problems view. You might see something like project cannot be built due to the following reason. It may be because of compilation errors in the dependent projects.