So, i have been looking for the answer for this but i havent found anything, and i cant just ignore it
the thing is that i have created a windows applicaction on Eclipse, and it works on my pc, now i want it to run on my customers pc but when i try to open it there it pops up an error.
I have been trying on my computer, unistalling all java folders and subfolders and i just resolve the problem by installing the latest java version
So i updated my customers pc to the latest java version, now we both have 1.8.0_91-b14 jre after checking on the cmd
Im bundling this specific version on launch4j jre + a minimum jre 1.4.0 jsut in case and im still getting the same error:
"This aplicattion was configured to bundled Java Runtime Enviroment
but the runtime is missing or corrupted"
any ideas?
on my program folder i dont add any jre folder, i guess its bundled inside the .exe am i wrong? i just have my exe, libraries(jars) and some config
it works on my pc so im pretty confused, and i found it difficult to know whats wrong
Related
I had some problems with JRE versions, so I tried to change it using the plugin Choose Runtime. I changed it to Java 1.8.0_112-release-287-b2. Now, when trying to start IntelliJ, i get an unsupported Java version error: Cannot start under Java 1.8.0_112-release-287-b2: Java 11 or later is required. I have tried to modify the runtime path in the ide64.exe.jdk file, but it seems like the old jdk IntelliJ ran on has been deleted. I also tried reinstalling intellij, no luck either. Anyone know how to get back the JDK? do I just download it from oracle and install it in the IdeaIC2020.3\jdks\ folder?
Thanks,
Jakob
I went to the jdks folder and deleted all contents. This fixed the issue. IntelliJ started without a problem.
I've made a little snake game and exported it into a runnable JAR file through Eclipse.
It works perfect in machines with JDK installed (with regards to the environment variables and all that.)
But "normal" people don't have that installed, only the JRE that can be found here: http://java.com/en/download/index.jsp
This is insufficient to execute the JAR apparently. I've tried numerous approaches:
packeging libraries in Jar
Extracting libraries in Jar
Build with java 1.7
building with java 1.8
checked the build path to make sure the libraries is included.
At best I get a "Java Exception occured" on the other PC (the one with JDK installed).
I've then tried to run the JAR on my own machine through cmd with the command...
java -jar fileName.jar
...in the hope that I would get an error log, but nope, it just runs the JAR like there's no problem.
Any ideas on how to make the JAR run on a machine with JRE installed?
Thanks in advance
Check packr
Packages your JAR, assets and a JVM for distribution on Windows, Linux
and Mac OS X
Appareantly, build for jre7 fixed the problem, why it can't run jre8, i don't know..
The JDK includes a tools.jar (among many others) which are omitted from the JRE. In your project expand the JRE System Libraries and make sure none of the libraries are coming from the a JDK.
Also adding some example text of the exact error you're seeing would really help us know what's going on. Stating "Java Exception occurred" is the equivalent of telling a doctor you don't feel well.
For what it's worth it's not a good idea to use classes from the JDK in your code as it has stricter licensing than the JRE.
I currently have a windows xp 32-bit with JDK 7 installed. I previously had installed netbeans IDE 7.1.3 Java SE kit, but deleted it so that I could download the full version. However, every time I have tried to download any version of the netbeans IDE, it says that either all the programs are already installed or that it just simply couldn't download the programs. I have searched around through my programs and found nothing netbeans-related, except in the add or remove programs, where it shows the netbeans IDE 7.3.1. I've tried several times to delete it, but it consistently fails. I'm fairly new to programming, so any help would be much appreciated.
NetBeans also installs to the AppData folder, on Windows XP it's located in:
C:\Documents and Settings\[[UserName]]\AppData\Roaming\NetBeans
And on Vista and later for others with this problem:
C:\Users\[[UserName]]\AppData\Roaming\NetBeans
Replacing [[UserName]] with your current User profile name. This folder must be removed to completely reinstall NetBeans.
Using NetBeans IDE 7.3.1, I modified a desktop application under Windows 7, using JDK 1.7. Performed clean and build, and tested this application under Windows 7, Windows XP, and on a MAC. All test scenarios run under each operating system performed as expected.
This app is ported to outside vendors, and all vendors, except for one, have loaded and executed the app without any issues.
The one vendor encountering problems, and running under Windows XP, returns an error message - "Could Not find or load main class". After doing a little research, this error usually indicates the JDK is different. They downloaded and installed JDK 1.7, but the same error message appears. I had them go to http://javatester.org/othertesters.html, making sure that java was working on the workstation and verifying the java version (1.7). They reinstalled JDK 1.7 and still receive the same error.
I have duplicated the error by removing JDK 1.7, loading JDK 1.6 and running the app. Receive error ("Could Not find main class"). A little different than what they receive, but basically the same problem. Removed JDK 1.6, loaded JDK 1.7 and problem disappears.
I'm at my wits end! I am going to make an appt. to access their workstation. But before I do, I would like to put a plan in place to try different scenarios to fix the problem. I don't know how to proceed, since I've run out of options. I'm hoping for any suggestions.
OK,
Problem solved. Sent application via outlook, modifying executable file from .jar to .txt b4 sending application. I didn't think about looking in compressed LIB directory. Four files were .jar files.
These files were quarantined. Renaming these files to .txt b4 compressing app would have eliminated the problem. Resent the zip, vendor extracted and renamed all .txt files to .jar. All is well.
Appreciate everyone's input.
I believe they still have a JDK 1.6 on their machine and use this, for some reason, to try to execute the application. I've seen this various times at customer workstations.
Very often, people are not aware of what they have installed. Tell them to remove all JDKs and JREs from their workstation, by way of uninstallers and looking into the program folder and deleting stuff manually. Tell them how to do it. Do this with them during a phone call.
Then have them reinstall JDK 1.7. I'm almost sure it will work afterwards.
Alternatively, you can compile the application for older JDKs. You can also do this using JDK 1.7 by setting the target version for the classfiles.
Make sure that their JAVA_HOME path is pointed towards the JDK 1.7 install. I have had similar issues where I had multiple JDKs installed, needed to use the latest, but the computer was pointing to an older version.
To find what version the java_home is type java -version in the cmd.
How to find java_home: How do I find where JDK is installed on my windows machine?
I am running Mac OS X 10.5 and I using eclipse to code my java projects. Eclipse has been running fine until today when I suddenly get the error when I try to run my Main.java:
An internal error occurred during: "Launching Main".
java.lang.NoClassDefFoundError
I installed Java for Mac OS X 10.5 Update 4 from this page earlier today so I was wondering if that might caused a problem. I have tired reinstalling eclipse (latest version) and find people with similar problems online but have not managed to resolve it. I was wondering if anyone have any idea for a fix?
Update:
I first tried to clean up the project through eclipse but this did not work. I then entered the workspace file and removed the already compiled classes, figured it might have to do something with that but that didnt help either. I started a new workspace with a new project and i get the same error.
I then tried to add my owm JRE file manually. What i interesting though is that there is no 1.6.0/Home in the versions folder. But since 1.5.0 did not seem to be added in eclipse I added this from the Versions/1.5.0/Home but I still get the same error. This is starting to become really annoying since I use eclipse atleast 4 hours a day in school.
Maybe my whole java got messed up after the installation of the new Java SE 6? If so how do i revert to only 1.5.0_
Thank you for your replies!
I suspect your JRE install location has changed due to the update. Go to Window > Preferences > Installed JREs and add a new default JRE that points to your updated Java. Then eclipse will rebuild all projects and hopefully, things should be fine again.
Clean your project. This error means that there is a missing .class that was there during compilation.