How Do I make the Install4j IDE to upgrade to Java7 instead of Java6 - install4j

I have upgraded to Java7 recently.
I had my install4j Project file in Java6.
Now in the Install4j IDE, I go to Media wizard and download 1.7 JRE's and select them for Windows. (I have window 7 64 bit.)
But When I go the Installer tab in IDE , where for some of the screens I have my custom code which is compiled in Java7.
It gives an error for the IDE java version lower than the compiled version(for those class files).
The Common Location where is the JRE for 1.6 was downloaded C:\Program Files\Common Files\i4j_jres
But the JREs for 1.7 somehow are never downloaded in the common location.
How Do I make the Install4j IDE to upgrade to Java7 instead of Java6.
Thanks
Sony

We had the same problem as you, so we just swapped out install4j's built-in JRE with the one we used to compile our custom code.
i.e. - replace "C:\Program Files\install4j5\jre" with the jre you use to build your custom actions.

Under General Settings->Java version, change the minimum version to 1.7

Related

MyEclipse doesnt accept JDK for creating Runtime

I am trying to create a JBoss Runtime in Eclipse. I have added 2 JRE entries in my Eclipse - one for JDK1.7 and another for 1.8.
Still Eclipse wont identify my 1.7 entry. See screenshots attached.
P.S: I got my JDK 1.7 by extracting the MSI/Exe setup file using 7 zip. I have done regular installation of Java 1.8 and My Java_Home is set to 1.8 in the PC. I don't want to modify it to point to lower version as it will impact other projects.
Your JRE definition won't be recognized as valid for the JBoss runtime if it is not a JDK. Your extraction of the JDK may have resulted in a JRE instead. Why not just run the JDK installer and change the installation folder to something other than your Program Files folder; it won't switch your system to Java 1.7 that way (I just tried this myself to check). Then define a new JRE to point to the newly installed JDK 1.7 and you'll be able to use that for the JBoss runtime.

NetBeans 8.2 does not open on Mac OS

I am trying to start NetBeans 8.2 on a Macbook Pro and it's not working.
It shows the splash screen, then after a while it shuts down without starting anything.
Running from the command-line I can see this error:
Oct 02, 2017 7:40:28 PM org.netbeans.ProxyURLStreamHandlerFactory register
SEVERE: No way to find original stream handler for jar protocol
java.lang.reflect.InaccessibleObjectException: Unable to make field transient java.net.URLStreamHandler java.net.URL.handler accessible: module java.base does not "opens java.net" to unnamed module #7823a2f9
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:337)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:281)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:175)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:169)
at org.netbeans.ProxyURLStreamHandlerFactory.register(ProxyURLStreamHandlerFactory.java:82)
at org.netbeans.JarClassLoader.<clinit>(JarClassLoader.java:141)
at org.netbeans.MainImpl.execute(MainImpl.java:178)
at org.netbeans.MainImpl.main(MainImpl.java:85)
at org.netbeans.Main.main(Main.java:83)
Looks like Java 9 got bundled with it and it's causing an error. The documentation implies that NetBeans 8.2 uses JDK 8!?
How to use my own java to run NetBeans, or how to get NetBeans to start without this error?
Yes, NetBeans 8.2 does use JDK 1.8, and specifically does not support JDK 1.9.
It's unclear from the OP which version of Java is desired to run with NetBeans, but the version of NetBeans to use is governed by the version of Java to be used:
[1] For Java 8, use Netbeans 8.2. Note that Java 9 is not supported. You can download NetBeans 8.2 bundled with JDK 8u141 for Mac OS here:
http://www.oracle.com/technetwork/articles/javase/jdk-netbeans-jsp-142931.html
Once it has been installed it no specific configuration for Java should be necessary.
[2] For Java 9 you must use a Development Build of NetBeans. That can be downloaded from http://bits.netbeans.org/download/trunk/nightly/latest/ but be sure that Mac OS X is selected from the Platform drop list before clicking Download.
For any version of NetBeans you can specify your own version of Java as follows:
Start NetBeans and select Java Platforms from the Tools menu.
Click the Add Platform... button.
Complete the wizard to locate the version of Java you want to use.
One final point: there is no problem having multiple versions of NetBeans installed and running concurrently using different JDKs, typically NetBeans 8.2 with JDK 1.8 and NetBeans Dev Build with JDK 1.9.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update:
If NetBeans closes itself down on startup it may have an invalid JDK path. To change the JDK that NetBeans uses:
Locate the file netbeans.conf. It should be in the etc directory under the NetBeans installation directory.
Edit that file in a text editor. Locate the line containing the property netbeans_jdkhome. On my Windows 10 installation it looks like this:
netbeans_jdkhome="C:\Java\jdk1.8.0_121"
Change the value for that property to specify the path to the desired JDK, save the file and restart NetBeans.
As pointed in the comments:
I had tried to set netbeans_jdkhome in /Applications/NetBeans/NetBeans\ 8.2.app/Contents/Resources/NetBeans/etc/netbeans.conf to point to JDK 10, but still it did not work.
I had to install JDK 8, and set netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home"
Uninstalling JDK 10 and using JDK 8 worked for me and setting netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home" worked quite well.
macOS 10.13.5
JavaJDK 10 installed as "System" JVM
I was able to install NetBeans, but unable to get it to function. Window would open, clicking on "New Project" or "New File" did absolutely nothing.
Was able to get it working (all modules and servers) by going into the configuration file at
/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
and editing the commented out path to JDK at the bottom of the file!
Cheers!
Check Java JDK is installed on Mac, NetBeans 8.2 does use JDK 1.8(Java SE 8)
/usr/libexec/java_home -V
Matching Java Virtual Machines (2):
12.0.1, x86_64: "Java SE 12.0.1" /Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk/Contents/Home
1.8.0_211, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
if not , just install (no need remove exist JDK)
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
modify /Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home"
For NetBeans 8.2 JDK 1.8 should be used. If you installed JDK 1.9 or JDK 10.0 to your MacBook, you must uninstall that from your computer.
I had the same issue. I'm using Apache Netbeans 12.0 so I had to change my OpenJDK version from 19.0 to 14.0 and update the path in order to finally work.
No need to uninstall the 19.0, just install the version that works with the Apache that you have and update the path:
netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk14.0.jdk/Contents/Home"

version 1.7 of the jvm is not suitable for this product. version 1.8 greater is required for eclipse nano in window

I am trying to launch Eclipse Nano in Windows 7, but getting the error:
Version 1.7 of the JVM is not suitable for this product. version 1.8 greater is required for Eclipse Nano in Windows
I already have Java 8 installed on the system
Simply download 1.8 JDK from Java SE Development Kit 8 Downloads install it, then copy the jre folder & paste it in:
"C:\Program Files (x86)\EclipseNeon\"
Then rename the folder to "jre", start the eclipse again it should work.
sudo /usr/sbin/update-alternatives --config java
and select the jvm 1.8
I faced the same issue (Windows 10). You need to set the "JAVA_HOME" system environment variable to point to JDK 8 folder and edit the "Path" system environment variable to have a new path to JRE 8's bin folder, this should be at the top of the list.
I too got the same error while installing
Possible reason for the error - The eclipse version, you are installing and the Java version should be of same bit, i.e. either 32 bit or 64 bit
Solution: I have downloaded both the java for 64 bit and 32 bit and installed, now my problem is gone.
Please let me know if it works for you.
When you download the latest eclipse, and extract it, you can find the folder named eclipse-installer with eclipse-inst file inside it. Instead of double-clicking it to start installation, just navigate to the folder in terminal and run ./eclipse-inst command. It does the entire installation for you. It worked for me and hope who also got the same problem(version 1.7 of the jvm is not suitable for this product. version 1.8 greater is required) gets solved. :)
On a Windows system I had the same problem.
Although I had only Java 1.8 installed, I found that I also had a 1.7 upgrade file installed too (which didn't get uninstalled automatically when I installed 1.8).
Uninstalling this upgrade file allowed me to install Eclipse IDE.
I had the same issue and I had a different solution to this problem.
Though I set the JAVA_HOME to 1.8 (Both through CMD and environment variables), the error was persisting.
So I opened CMD prompt, typed:
java - version
to find out 1.7 was the version my system was set to. Until then I had no clue from where it was fetching this version.
And then I changed it to 1.8 using this command:
set path=C:\.....eclipse\jdk1.8.0_141-b15\bin
AND IT WORKED!
Recheck if it is set to 1.8 with the same command:
java -version
You should be good to go now!
if it's a 64-bit Eclipse. You'll need to explicitly download and install the 64-bit Java 8 or later.
download it from here
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
tips for windows users
Version 1.7 of the JVM is not suitable for this product. version 1.8
greater is required
user get above error message because they had multiple jdk version or they do not have latest version of jdk installed , even if you install latest version of jdk and you if you have not removed old version of jdk like 1.7 you will get the above error message , so better to get rid of old version of jdk and jre etc.
-> ignore this step if you have insallted latest version of jdk already
download 32 or 64 bit latest jdk from : https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
-> go to C:\Program Files\Java and look for old version of jdk , let say if you have 1.7 versions of jdk delete them so that you are left only with latest version , you can remove old versions of jre too here just by deleting.
-> next run eclipse you will not get v1.7 message
Find the JVM
If a JVM is installed in the eclipse/jre directory, Eclipse will use it; otherwise the launcher will consult the eclipse.ini file and the system path variable. Eclipse DOES NOT consult the JAVA_HOME environment variable.
To explicitly specify a JVM of your choice, you can use the -vm command line argument:
eclipse -vm c:\jre\bin\javaw.exe ''start Java by executing the specified java executable
eclipse -vm c:\jre\bin\client\jvm.dll ''start Java by loading the jvm in the eclipse process
Go to Eclipse directory, find and open eclipse.ini configuration file then modify below parameter to your desired version, it will work.
-Dosgi.requiredJavaVersion=1.8
It worked for me
Eclipse will consider the version that is mentioned in eclipse.ini file, this error
means that your installed java version (in environment variable) and the mentioned java
version in eclipse.ini file is not matching.
You may just change the java version there (it will be in eclipse-installation-dir).
Change the property as below:-
-Dosgi.requiredJavaVersion=
Updating below line in eclipse.ini worked for me
-Dosgi.requiredJavaVersion=1.8
Two things:
Check this question here as it's similar and has some good pointers Eclipse - no Java (JRE) / (JDK) ... no virtual machine
Also, get the latest JRE and JDK from Oracle vs from java.com http://www.oracle.com/technetwork/java/javase/downloads/index.html
Today I meet the same question. I download the file that named "eclipse-inst-linux64.tar.gz". When I open the eclipse, it shows "Version 1.7.0_121 of the JVM is not suitable for this product. Version: 1.8".Then execute
cd /usr/bin/
sudo ln -s /Your_JAVA_PATH /usr/bin/java
Then you can install eclipse.
Make sure java and eclipse versions are same(32bit or 64bit)
Try running eclipse-installer as administrator(this worked for me)
If you need to skip this step just simply change Required Version number, ex:
open with any text editor instalation path/AptanaStudio3.ini
and change
-Dosgi.requiredJavaVersion=1.8 to -Dosgi.requiredJavaVersion=1.7
This is just for skipping this step.
I had both 1.7 and 1.8 in path and 1.7 was on top and 1.8 below in Pah, so i moved 1.7 below 1.8, thats it it worked.
Go to Oracle's website and download the newest version of Java JDK. (https://www.oracle.com/java/technologies/javase-downloads.html)
Install the program on your computer.
Remove all old environment variables related to Oracle and Java.
Set the environment variables related to the new installation all the way to the bin folder. (include the bin folder in the environment variables section)

Netbeans - Can not install jdk 1.9.0 Build b53

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.

How to specify which JRE to use in Netbeans?

I have two JRE in my system. One is 32-bit and the other one 64-bit. In Eclipse I can configure both and choose which one to use when running my application.
I'm wondering if I can do the same thing in Netbeans. I've tried to go to Project Properties, Libraries and then tried to configure a new JRE there, through Manage Platforms, but it doesn't accept the directory of my JRE. How should I proceed?
Be aware that I'm talking about JRE, and not JDK ;)
EDIT: I managed to make it work by downloading a new 32-bit JDK and selecting its directory. I still couldn't make it accept a JRE directory.
Whether or not you can run Netbeans with just the JRE depends on what bundle you have downloaded. In Netbeans 7 only C/C++ and PHP bundles can be run with the JRE.
Older versions of Netbeans include more languages under this JRE umbrella, but the principle is the same.
The JDK contains the JRE plus tools to debug and compile code, so if you're doing anything Java based apart from just running the IDE, netbeans depends on the JDK.