I am following JavaFX tutorial found at
http://code.makery.ch/java/javafx-8-tutorial-part7/
which describes how to create native installer with 'Inno Setup'.
I am using e(fx)clipse 4.4 with java 8 JRE installed only and 1.8 compiler
and i do it for windows (exe).
Everything works fine, but when i install exported native application it create folders for JRE
runtime/jre8/
program wont start and says
jvm.dll is not found in bundled runtime.
if i change manualy runtime/jre8/ to runtime/jre/ - it start without any problem.
I did not found any settings in project for specifing runtime path.
How do i make my native installer make right path for runtime?
Solved. Just noticed that i was using standalone jre for project c:\dev\java\jre8 but supposed to use jre from jdk package c:\dev\java\jdk1.8.0_05\jre.
Now installer creates proper path for runtime - runtime/jre/
Related
My Eclipse Mars 4.5.1. uses JDK 8 to start-up (specified in the eclipse.ini)
My RCP project uses JDK 7. The entire workspace uses 7. I've also included the JavaFX JAR until I migrate the whole project to JDK 8, where I won't need it.
When I try to export the RCP project using the .product file, the exported version has some logs saying that certain classes using JavaFX have compile errors. Even though the exported version is started with JDK 7 (specified in the .ini file), and the JavaFX JAR surely was exported too, these UI components crash.
This whole process works with Eclipse starting with JDK 7 !
I really want to use my Eclipse with JDK 8, but ONLY the Eclipse
How does Eclipse influence the export process? My target platform points to eclipse, but has JDK 7 set on it.
You can try to put a JRE 7 in your product location and test if it runs, remove the entry in the .ini file.
plugins
configurations
jre
...
If this works, your entry in the .ini file is probably wrong.
Another thought: "I've also included the JavaFX JAR", where did you include it? Maybe you need to include it in the JRE.
My qustion is really simple, all in the title.
After some tests I found that by given a JRE/bin directory in the path(environment variable) , Eclipse can run normally with no problem. And Eclipse will never try to find the JRE by using JAVA_HOME variable.
And in eclipse, I know that I can add installed JREs in the window preference and choose a JDK folder instead of a JRE folder. And for each project, we can change the compiler level.
Since Eclipse can also compile the codes, when is JDK used? Debug? or what?
Eclipse uses its own compiler to compile Java code. It is different than the javac compiler that comes with a JDK. In fact, you don't need a JDK to compile and run normal Java projects in Eclipse. A JRE is obviously needed to reference the required Java libraries.
However if you are using Maven or some other tools that sometimes depend on a JDK component, then you need to install a JDK on your machine. For example, Maven has an option to rely on the tools.jar that comes shipped with a JDK.
Eclipse uses the JRE you specified as default or per project settings. This could be a (only) JRE installation or a JRE from a JDK installation.
I think the more interesting question is: When should I use a JDK instead of an JRE?
The JDK includes tool that are not included in the standalone JRE. E.g. the javadoc.exe for exporting the documentation from javadoc annotated comments in the code. This Program is not included in a standalone JRE. so if you want to export your javadoc documentation you need to add an installed JRE based on a JDK installation first, so Eclipse is able to use the javadoc tool.
It could be a little hard to give a thorough answer to this but I know that at least for using Maven/m2e Eclipse needs to be run in a JDK.
First of all eclipse is a java code it wouldn't run without java installed to prove it (on your personal expence) copy the eclipse folder elsewhere and uninstal the JDK and try to run jave it wouldn't it would output the error message no JDK but instal JDK and run eclipse from the copied location it would run as a first time asking you about the workplace directory!.
I'm getting an error when trying to deploy an project to AppEngine using NetBeans.
I installed the plugin for NetBeans and I can run the application localy using appengine-java-sdk-1.9.0
When I try to deploy the program I get the following message:
Beginning interaction for module default...
0% Created staging directory at: 'C:\Users\Adi\AppData\Local\Temp\appcfg8079434123068806992.tmp'
5% Scanning for jsp files.
8% Compiling jsp files.
Error Details:
Mar 10, 2014 11:50:04 PM org.apache.jasper.JspC processFile
INFO: Built File: \guestbook.jsp
java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
Unable to update app: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
Please see the logs [C:\Users\Adi\AppData\Local\Temp\appcfg5934545421821565182.log] for further information.
Thanks in advance.
First of all, this is my first answer in stackoverflow. Please consider, if I break some rules do not hesitate to tell me whats wrong or should be changed in future.
I run into same problem like Amir Rossert.
I've installed the Bundle "Netbeans 8 + JDK 8" (jdk-8u25-nb-8_0_1-windows-x64.exe from Oracle website). Additionally I have installed JDK 7 which I needed for different cases.
In Netbeans both JDKs were displayed under Tools/Java Platform Manager
JAVA SE
JDK 1.7
JDK 1.8 (Default)
So far so good.
When I changed JAVA_HOME to JDK 1.7 (C:\Program Files\Java\jdk1.7.0_72) I still get
java -version 1.8 !?
Why: Because Netbeans
has installed/copied 3 following files
java.exe
javaw.exe
javaws.exe
into C:\Windows\System32
linked them from directory C:\ProgramData\Oracle\Java\javapath and
after all set system variable Path (not PATH) = C:\ProgramData\Oracle\Java\javapath;
So whenever I wanted to use 1.7 it didn't work, instead 1.8 was used.
And when I wanted to deploy to Google Appengine the Exception occur: Caused by: java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
I solved it this way:
I deleted all three files mentioned above (java.exe, javaw.exe, javaws.exe)
I deleted the directory C:\ProgramData\Oracle\Java\javapath
I deleted the value C:\ProgramData\Oracle\Java\javapath; in system variable Path:
After that I tried out to deploy on Google Appengine again, this time successfully.
I just found an answer to this issue on:
appcfg can't find javac?1
Unfortunately it's more complicated than that. The very first entry in your path points to C:\Windows\system32. There is undoubtedly a java.exe living in that folder who's home is actually the JRE in C:\Program Files\Java\jre6. (You can test this yourself by running a small Java program):
System.out.println(System.getProperty("java.home"));
AppCfg uses the system property, java.home, of the currently running JVM to look for javac. Since you're running the java.exe which belongs to a JRE, it goes looking for the compiler there. Unfortunately, there's no real universally consistent or great way to automagically find the most appropriate java compiler. For our SDK, the rule is that you need to be running the JVM from your SDK, not from a JRE. As I mentioned in my previous post, this is most easily accomplished by just setting your Java SDK at the front of your path. For example,
set PATH=c:\Program Files\Java\jdk1.6.0\bin;%PATH%
We've certainly been mulling over ways to make this simpler and more bulletproof.
After editing the PATH I was able to deploy my app to the appengine with NetBeans.
I'm not familiar with NetBeans but I'll give you the steps to fix this on Eclipse hopefully you will find the equivalent ones:-
Right click on your project and choose properties
Go to java build path
Then under libraries tap, scroll to your selected JRE System Library
Edit the JRE to point to the directory where you installed you JDK.
If the above is already done, and you only see such errors when deploying, do the following
Edit the configuration settings file of your IDE and give it the following argument then restart it, in the Eclipse it is at the main directory where the Eclipse at and called eclipse.ini.
-vm
C:/Program Files/Java/jdk1.7.0_51/bin/javaw.exe
this is hopefully something simple but... Eclipse has been working relatively fine for everything except deploying to GAE.
I can run my GAE app locally, but when I try to deploy to google, I get this message:
java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
I have set the build path to JDK.
It also happens when trying to deploy the same project from more than one system (win7 and win8) so I suspect the problem is to do with the project itself. This particular project is existing and already running on google for years.
Interesting that this error only shows up when I have .jsp files in my app to deploy. If I remove the jsp files, it deploys without error. (kinda need the jsp files tho)
thanks
link to image of my build path
I had the same problem and was able to deploy successfully after forcing Eclipse to use
the JRE within my SDK directory (Win 7 64bit). To force Eclipse to use a particular JRE see this. It seems that the JVM that Eclipse uses, the JVM that app engine spawns, & the JVM that appconfig uses should all be the same. Hope this helps w/ your situation as well.
I tried setting my project jre to be the same as my eclipse jre according to AlohaCode's answer. This was insufficient for me. The answer was in my classpath, there is java.exe in C:\windows\system32 which was BEFORE my java home variable.
The solution is to put the java home path before the C:\windows\system32 entry.
I found the answer here: 2FL5sJ">https://groups.google.com/forum/?fromgroups=#!msg/google-appengine-java/RyFybJWUhU4/78UE_2FL5sJ
In Eclipse, go to: Window->Preferences->Java->Installed JREs , add->Standard VM TO JDK PATH\JRE. and If you had a JRE checked previously uncheck it and check this jre
The given advice solved my problem. The -vm argument cannot be the first line.
-vm
C:\Program Files (x86)\Java\jdk1.7.0_51\bin\javaw.exe
Setting -vm in eclipse.ini did not help. All other settings were seemingly pointing to the JDK. Out of desperation, I uninstalled all JREs from my system, leaving only the JDK. The consequence was that Eclipse would not start as the JDK bin directory was not on my PATH (Windows 8 here). Adding this in environment system variables got Eclipse to start. Thereafter I could deploy to app engine.
Removing the JRE file located in my C:/Program Files(*86)/Java folder , reopening the eclipse IDE resolved the issue.
I had Java JDK installed in my C:/Program Files/Java folder which was not detected earlier.
I recently installed the ubuntu 12.04 final beta
After installing the oracle jdk from the webupd8 ppa, launching eclipse failed complaining about a missing shared library.
Can't load library: /home/bob/.swt/lib/linux/x86_64/libswt-gtk-3740.so
I searched around, and found this quesion: Eclipse cannot load SWT libraries
As the OP recommended, I tried switching to open-jdk, and that worked wonderfully. The problem, however, is that I am working on a project that doesn't support openjdk.
I tried the second solution as well (the one by scott, which was just creating symbolic links to /usr/lib/jni/... in ~/.swt/lib/linux/x86_64/). Eclipse launches and everything is fine, but it still misses some libraries; this is what I get when i try to run my project:
Caused by: java.lang.UnsatisfiedLinkError: /tmp/libgdx/1352105074/libjogl_awt-linux64.so: libjawt.so: cannot open shared object file: No such file or directory
I know libjawt.so is somewhere on my computer:
$ locate libjawt.so
/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/libjawt.so
/usr/lib/jvm/java-7-oracle/jre/lib/amd64/libjawt.so
But eclipse or java seems to think that libraries should be placed in ~/.swt/lib/linux/x86_64, isn't that weird?
Eclipse when launched defaults to its own internal JRE, as I understand. I recommend the following:
Modify your CLASSPATH variable to include the path to the desired libraries;
Set your JAVA_HOME to match the actual JAVA_HOME;
Setup Eclipse to launch from the desired JVM by customizing the eclipse.ini using this information: http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F#eclipse.ini
Also, can you specify the -classpath option when Eclipse is launched?
Try downloading the latest version of Eclipse and running it. For some reason it works fine. I just ditched my older version of Eclipse. I hope this works for others!
Please note that there are two Java runtimes in play here. The one used to run Eclipse itself, and the one you want to run your code. They do not have to be the same!
I would suggest
Run Eclipse with a JDK that works
Download Oracle JDK manually and unzip it to a folder in your home directory
Tell Eclipse about this additional runtime (http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-add_new_jre.htm)
Configure your project to use that JVM instead. (http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-assign_default_jre.htm)
Now your own code is compiled against, and runs with Oracle Java.