I have to use JDK 8 for a project and want to give google OR Tools a try, which I included as jar library. When I ran the program it said, that my jdk is to old. Is google or tools also available for jdk 8?
well you can rebuild it from source with any jdk.
Just setup your JAVA_HOME env
ps: personnaly I use open jdk 8
Related
Does Eclipse Neon support Java 9? I know Eclipse Oxygen can be used but we have some constraints to not use other Eclipse than Neon.
We are using Maven for Building our J2EE project and Git for source control.
I appreciate if you can back your answer with some links/proofs. Thanks!
Does eclipse Neon support Java 9?
It depends what you mean by "support". If you mean "Is the use of Java 9 officially supported with Neon?" then the answer is no. For example, see this DZone article:
You need an Oxygen-based install of Eclipse – ensure you’re using the
R version and not milestone or integration builds.
Also, from Eclipse's site:
Users who install Eclipse Oxygen 4.7.1a are able to launch with Java 9
and get Java 9 support
But if you mean "Is it possible to get Java 9 running under Neon?" then the answer is yes. Here's a snippet from an article titled Eclipse Java™ 9 Support (BETA) for Neon from a brave soul who did it back in 2015!...
I downloaded the early access version of Java 9 JDK from java.net in
the form of a tar.gz file that I decompressed into a local directory:
/home/apps/jdk1.9.0. I made no other changes to my system.
I downloaded the Eclipse SDK 4.6 (Neon) M2 from the Eclipse Platform
downloads and decompressed it into its own directory. I made a small
change to the eclipse.ini file to make the new configuration run using
the Java 9 runtime...
Of course, that was done with an early access release of Java 9, and I wouldn't automatically assume that Neon will still work with the latest release of Java 9.
~~~~~~~~~
Update:
I just noticed this SO question titled Neon: how to run on jdk9? which may offer further useful information.
I'm trying to install jdk 1.9.0 early release package to be used with NetBeans 8. I realized that jdk is installed without private jre (there is no jre folder inside of jdk1.9.0 folder). And Netbeans don't work . In Java Platform Manager after selecting jdk1.9 field under Class tab contains no platform classpaths.See picture below.
jre1.9.0 folder is installed only as a seperated folder.
What can I do about it so I could compile and run my programs?
There will not be jre folder in JDK 9, as it is restructured. Plus you don't really need it as JDK has all files to compile and execute code.
As internal files of JDK and format are changed too, any IDE will not work, until it is updated to Java 9 support.
NetBeans9.0 is planned to be supporting JDK9 and JPMS.
You can though get started to use Java9 modules with the Early Access build of the same.
There is a confluence wiki to keep track of the new and noteworthy features marked to be exposed with the GA release of NetBeans.
When I run javafxpackager, I get the following warning/info:
No base JDK. Package will use system JRE.
It's not clear from the docs for Deploying JavaFX Applications how one would specify an alternative JDK. There isn't an option for it, that I can see (maybe I'm blind). Is it a system property?
Thanks.
There is an old Oracle blog which mentions this. Don't know if it is still applicable or relevant to your case or not though:
Self-Contained Applications: Select Java Runtime to bundle
Packager tools in 7u6 assume current JDK (based on java.home property)
is the source for embedded runtime. This is useful simplification for
many scenarios but there are cases where ability to specify what to
embed explicitly is handy. For example IDE may be using fixed JDK to
build the project and this is not the version you want to bundle into
your application.
To make it more flexible we now allow to specify location of base JDK
explicitly. It is optional and if you do not specify it then current
JDK will be used (i.e. this change is fully backward compatible).
New 'basedir' attribute was added to tag. Its value is
location of JDK to be used. It is ok to point to either JRE inside the
JDK or JDK top level folder. However, it must be JDK and not JRE as we
need other JDK tools for proper packaging and it must be recent
version of JDK that is bundled with JavaFX (i.e. Java 7 update 6 or
later).
Here are examples ( is part of task):
<fx:platform basedir="${java.home}"/>
<fx:platform basedir="c:\tools\jdk7"/>
Hint: this feature enables you to use packaging tools from JDK 7
update 10 (and benefit from bug fixes and other features described
below) to create application package with bundled FCS version of JRE 7
update 6.
When run with the parameter -Bruntime:
javapackager.exe -Bruntime="c:\Program Files\Java\jdk1.8.0_76\jre\" ...
you get the following info:
Using base JDK at: c:\Program Files\Java\jdk1.8.0_76\jre
In case it helps anyone, I wanted to use javapackager to bundle the 32-bit Java 8 JRE. I was running into issues because the JDK was the 64-bit Java 8 JDK. I was able to solve my issue by setting JAVA_HOME to the 32-bit JRE.
I have just solved same problem:
NetBeans ID - Tools - NetBeans Platform Manager - "Sources" tab
button Add ZIP/Folder
(there were no sources set so I set it and "No base JDK. Package will use system JRE."
disappeared)
When using Eclipse I get this error:
...re are no JREs installed in the workspace t...
Anyone knows what I have to do? Or which JRE (whatever this is) I need?
Just started this for school so I don't know a lot about Eclipse yet.
(First word is 'Build' in the error)
Edit:
Solved! New version of eclipse + JDK 7
You need to install JDK 7 for Mac. Also please review notes.
After installation the JVM should be located in: /Library/Java/JavaVirtualMachines/ path.
Java 6 is supported by Apple, so try to check path: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home. Suppose, concrete recipe to installation Java 6 on your Mac depends on your hardware and Mac OS version.
JRE is the Java Runtime Environment. Do you have Java installed? It is not part of the OSX package any more.
I see JRE all over the place, but i can not be sure which JDK is compiling my code. How do i find out?
You can still check/set which JDK version you want to compile to. If you go to Window->Preferences, then click "Java" from the menu on the left and then "Compiler". The first setting allows you to see which JDK version is being complied with.
I know this doesn't directly answer your question since JDK isn't actually compiling it, but hopefully it helps!
Actually Eclipse has its own compiler. You can develop java apps using only the JRE and Eclipse
You don't find JDK explicitly mentioned anywhere because way to point to a JDK is under the name of 'Installed JRE'. That is Window > Preferences > Java > Installed JREs. This is useful when using m2e plugin.
secondly apart from having it's own built in compiler, it is recommended to you install one of your own to support development of Java programs. Except below from eclipse wiki page :
If you intend to use Eclipse for Java development, then you should install a JDK