Java 1.8.65 javac is missing - java

I downloaded the newst 1.8.65 JDK a few days ago an the javac file is missing
in case someone believes I accidently downloaded the JRE, here are 2 screenshots
when I browse to the directory I installed the JDK in
C:\Enwicklung\JDK\1.8.65\bin
the javac.exe file isn't there where it should be, as you can see in this second screenshot
can anyone confirm this? tried to install the JDK a second time without any change.
EDIT: of course I searched the whole drive for a javac.exe, no match was found

I was able to solve the "problem" myself. after rechecking every letter of the installation process.
During installation, the installer asks you where you want to install the JDK
I chose the folder C:\Enwicklung\JDK\1.8.65\
A progress bar is displayed and installation continues
Then you are asked
for non-German native speakers
Zielordner = target folder
Ă„ndern = change
In this view, the installation process is asking in which folder I want to install Java
I chose the folder C:\Entwicklung\JDK\1.8.65\ again this leads to the following conflict
in C:\Entwicklung\JDK\1.8.65\ there was a bin\ folder of the JDK installation
The JRE aka its alias Java, which a mindful reader should have noticed, but I obviously missed twice, was installed in the same location overwriting the bin\ folder of the JDK with the bin\ folder of the JRE, deleting all files.
An unneeded mistake on my side. Unfortunately, the German installation process doesn't state anywhere that the JRE is being installed except in the folder name of the Zielorder view and that it's installed in the base folder structure.
In my defense, the installation process does not state explicitly that the JRE is being installed next and the installation, at least in this German version, doesn't warn that folders and files are going to be overwritten, which is an undesirable effect from my point of view.
NOTE: I left the predefined folder name as C:\Program Files\Java\jre1.8.0_65 because otherwise after changing it to C:\Entwicklung\JDK\1.8.65\ there would have been no indication for you to know that the JRE is being installed

Related

What identifies the jdk installation directory?

I want to set my java_home variable,
but have a custom enough OS not to be able
to find my jdk dir as prompted everywhere
(it's a chromium os, and has installed jdk8 by chromebrew...).
What i have is a usr/local/jre folder,
and few java* binaries in usr/local/bin.
Can the jre I have be the same that
everyone refers to as /usr/java or /usr/java/jdk?
The jre folder includes a bin, lib and plugin folder and some tl;dr files.
Thanks a lot!
There is no "standard" definition for the JAVA_HOME, that is you can point it to the folder where either the JRE or the JDK is installed.
The only requirement (which is in fact more of a generally accepted convention) is that $JAVA_HOME/bin/java should start the Java runtime.
This happens if you point JAVA_HOME to either the JDK or JRE folder, in both cases there is a folder /bin and inside the "java" executable.
In your case, since you identified the JRE installation folder, you can point JAVA_HOME to it.

Generating a runnable .jar file from a libgdx project in intelJ

I basically just spent the whole day trying to get a runnable .jar file from my libgdx project working. In previous projects on a diffrent pc I used to simply navigate my way into the project root folder with cmd and used "gradlew desktop:dist" command. However right now I'm getting error message whenever I try this method.
error
How do I know which folder gradle searches my "tools.jar" file from? I tried even copying it to a few places with no success. I'm using windows OS.
For IDE, I'm using intelJ idea with newest version. I tried to use the "build artifacts" method from IntelJ but what ends up happening with the generated file is that it instantly closes/crashes whenever opened. When running the generated file throught command prompt I get a huge host of errors too numerous to name let alone fix. It seems like it doesen't include the required structures / project folders properly when using artifacts build.
Seems, your environment variable points to the installed JRE(Java Runtime Environment), but has to the Java Development Kit (JDK), because tools.jar is one of the files used by the development tools. You can take a look at the JDK and JRE File Structure to figure out, where is tools.jar located.
So, you have to install JDK(if it was not installed) and make the JAVA_HOME environment variable to points to it.

Copy javax to JRE using Install4J

I am using install4J to distribute my application . However i am using serial port in my program therefore i will need the below file to be copied to the target JRE folder
%JAVA_HOME%/lib/ext/comm.jar
%JAVA_HOME%/bin/win32com.dll
%JAVA_HOME%/lib/javax.comm.properties
Is there any way i can do it by getting the Java Home Path via Install4J ?
Thanks
Since JAVA_HOME is not a Windows variable, it will be tricky to get it, and Install4J does not have a JAVA_HOME variable to my knowledge. While JAVA_HOME could be set on some computers, it is not safe to assume it is set on all computers.
What I would do, personally, is not touch the user's JRE. Bundle your own custom JRE with those files included into your install file generated with Install4J. That way, your program will always work with its own custom JRE that is independent of the system's JRE.
Copy the files to
${installer:sys.javaHome}
This is the JRE that the installer and subsequently your launchers run with. If you bundle a JRE, the value of this variables changes after the "Install files" action runs.

Installing Oracle JDK 6u38 on Fedora 17 in user home directory

In the older version of Java 6, Oracle provides the tar.gz distribution for their JDK, which can be extracted and run in user home directory without installing to system folder. However, the latest versions of Java are no longer distributed as tar.gz format for downloading anymore. Does anyone know how to install the bin distribution in user folder without root privilege?
I have tried to extract the bin files but it's not usable since most of the jar files are encrypted (or packaged) in some weird format (.pack), e.g. rt.pack instead of rt.jar. I have also tried to use --prefix in the rpm command line but it requires root permission. They seems to make it impossible to install java in user home directory.
Here it says:
The Java Development Kit files are installed in a directory called
jdk.6.0_ in the current directory.
And it looks quite simple, it just says to give execution permissions and execute a bin file.

Ant error when trying to build file, can't find tools.jar?

When I run ant it says:
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar
Buildfile: build.xml does not exist!
Build failed
What package can I use to download the file required > C:\Program Files\Java\jre6\lib\tools.jar
I just downloaded this one:
jre-6u19-windows-i586-s.exe
but unfortunately it appears that it was not on it...
Java ships in 2 versions: JRE & SDK (used to be called JDK)
The JRE in addition to not containing the compiler, also doesn't contain all of the libraries available in the JDK (tools.jar is one of them)
When you download Java at: http://java.sun.com/javase/downloads/index.jsp, make sure to select the JDK version and install it. If you have both a JDK & JRE, make sure that ANT is using the JDK, you can check JAVA_HOME (environment variable), and on the commandline if you do "javac -version" you should get a version description.
You need JDK for that.
Set JAVA_HOME to point to the JDK.
Using suggestions from answers on this page and this other one (ANT_HOME is set incorrectly or ant could not be located), the ultimate fix was the following:
Adding a ANT_HOME environment variable that points to the ROOT directory of your Apache ant directory location. (Not the bin sub-dir!)
Adding a JAVA_HOME environment variable that points to the ROOT directory of your Java JDK (or SDK) directory location. (NOT your JRE and not the bin sub-dir!)
Appended %ANT_HOME%\bin;%JAVA_HOME%\bin to the PATH environment variable.
Make sure you close any command window(s) that were open prior to the changes above. Only command windows opened after the changes will have the updated environment variables.
I was having the same problem, none of the posted solutions helped. Finally, I figured out what I was doing wrong. When I installed the Java JDK it asked me for a directiy where I wanted to install. I changed the directory to where I wanted the code to go. It then asked for a directory where it could install the Runtime Environment and I selected the SAME DIRECTORY where I installed the JDK. It over wrote my lib folder and erased the tools.jar. Be sure to use different folders during the install. I used my custom folder for the JDK and the default folder for the RE and everything worked fine.
I found that even though my path is set to JDK, the ant wants the tools.jar from jre folder. So just copy paste the tools.jar folder from JDK to jre.
I was also getting the same problem, but i uninstalled all updates of java and now it is working very fine....
Just set your java_home property with java home (eg:C:\Program Files\Java\jdk1.7.0_25) directory.
Close command prompt and reopen it.
Then error relating to tools.jar will be solved.
For the second one("build.xml not found ") you should have to ensure your command line also at the directory where your build.xml file resides.
Sometimes while installing JDK, you may get a dll is missing error. Because of this, it won't copy the tools.jar file to the java folder. So please reinstall the JDK in a different location and if it is successful then you will see the tools.jar file.

Categories

Resources