when trying to run/reinstall protege 3.5 it fails because it uses the wrong java path: it's trying to run c:\ProgramData\Oracle\Java\javapath\bin\java.exe, in reality the correct javapath is c:\ProgramData\Oracle\Java\javapath\java.exe but I don't know where protege gets this from? I'm using the web installer (launchanywhere).
I've looked at the environment variables and there's nothing that mentions javapath\bin... however ...\java\javapath; is part of the path variable, how can I change protege and its installer to acknowledge this java path?
thanks
I tried using install_protege_3.5.exe LAX_VM "C:\ProgramData\Oracle\Java\javapath\bin\java.exe" as suggested here: http://rivix.com/Tech_Tips/tech_tip_win3.php for other launchanywhere package.
but the installer seem to ignore my parameters, I then proceeded to download the full version including the vm, I previously had downloaded only protege.
With the full version (e.g. including the vm) I was able to launch the installer to choose my preferred vm. It's all working now, thanks
Related
So I have java 1.6.0_65 and it is in my path and works, however it is not a recent enough version to install Eclipse. I have added the new version to my path through the bash_profile and bashrc. when $echo $PATH is ran, it shows java 1.8 but eclipse still only recognizes 1.6. have tried to disable 1.6 only to have java -version reveal nothing. Im not sure what exact information needed to help me solve this 3 day riddle, but ask and I will get it.
One way to force eclipse to start with a certain JVM is by turning to the eclipse.ini file.
Example: in my Linux system, I simply extracted the eclipse archive to /opt.
Directly in the root directory, there is an eclipse.ini.
(for me, that would be /opt/eclipse-jee-neon-2-linux-gtk-x86_64/eclipse.ini). You simply open that ini file in an editor and then you can use -vm in order to specify the java binary to use when eclipse starts.
See here for the official documentation - including a MacOS example.
Target Environment
Windows 7 (6.1)
Java 1.8.0_121 64bit
I recently created a minimal java environment consisting of just the single file java.exe in a newly created, empty directory and successfully ran a simple HelloWorld.class file simply by copying it to the same directory and typing:
.\java HelloWorld
I found this kind of surprising, and wondered if maybe because the version of java I was using (jre 1.8.0_72) had been installed from an .exe file whether there was something in the Windows registry telling java.exe where to find rt.jar and such.
Running the java control panel, you can certainly see java 1.8.0_72 is in there:
I if I used a java version which was NOT installed (i.e. a standalone java version) would I get a different result?
Well, before trying a stand-alone version I think I'll try a computer having NO java on it at all. Same exact set up as before.
Found part of the answer on my wife's Windows 10 computer (which has no java on it):
Clearly, I should copy java.dll somewhere. Think I'll put it in the same directory as everything else (i.e. the same one as the java.exe), and try that.
Nope. Same as before.
So clearly java is looking in the registry to find its .dll.
I've downloaded jre-8u121-windows-x64.tar.gz. I'm going to try the same experiment with that.
Tried the same experiment with java from the tarball above. Exact same symptom. Cannot find java.dll.
Having done a little reading, I see that Embedded Java SE has a way to create custom deployments of java. There appears to be no official analogous mechanism for Java SE for Windows.
Doing a little more reading, I see that there is a mechanism called the Invocation API which can be used to run java, bypassing java.exe. This might be something to try. Might also be time to start surfing the HOTSPOT code.
More on the Invocation API here: http://docs.oracle.com/javase/6/docs/technotes/guides/jni/spec/invocation.html
An intriguing note I also ran into during my reading said this:
Private vs. public JRE - Installing the JDK installs a private Java SE Runtime Environment (JRE) and optionally a public copy. The private JRE is required to run the tools included with the JDK. It has no registry settings and is contained entirely in a jre directory (typically at C:\Program Files\jdk1.6.0\jre) whose location is known only to the JDK.
I read this here: http://www.oracle.com/technetwork/java/javase/install-windows-142126.html
You might try this experiment with THAT jre.
Today I also face same problem .and I found the solution for this go-to your JDK bin copy path from there and peast this path to environment variable path and the priority should be first that mean it should be peast in starting of all path.
everybody .I have been working on this issue for hours .The problem is that I cant debug my Database class.Once the break point hit this line
final Database db=new Database(this);
I am trying to step into my Database class But eclips says “Source not found” and shows a buton named “Changed attach source” .So I have searched an explanaition on internet .I have found one here
to be able to fix this error.I have to find the where JDK is but I couldnt under this location.Just JRE folder is available There is no JDK
C:\Program Files\Java
If you don't have JDK you should probably install it. Find it here
JDK/Java SDK = Java Development Kit/Java Software Development Kit - what you need to write programs that require Java or use libraries written in Java. For example, if you were to write your own word-processing tool in Java.
JRE = Java Runtime Environment - what you need to run programs/software that require Java or use libraries written in Java. For example, OpenOffice requires the Java Runtime Environment
JRE allows you to run Java, whereas JDK allows you to program with it.
You need to install JDK from here http://www.oracle.com/technetwork/java/javase/downloads/index.html. what you are having is JRE, but you dont have jdk. remove existing JRE and install JDK from the site.
What is the Fully qualified name for Database class ?
You need to install JDK from
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Then from JDK folder u will find file called src.zip which is include all the source code of the standard class's . But i believe
this will not show the source for this Database class since its not standard class if you can get the fully qualified name of the class you can find its jar from
http://www.findjar.com
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
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.