I've a problem with the application installers generated by Netbeans. I have a Netbeans application project with one module. The Java target platform is set to 1.7. The development system is Netbeans 8.0.1 on Mac OS. I generate the installers with "Package as" => "Installers".
When i try to run the installer on an Ubuntu with JRE 1.7 installed it fails with an UnsupportetClassVersionError. When I run the ZIP-packaged application it works fine.
It seems that the class version of the installer is not compatible to 1.7.
So, my question is: Is there any way to configure the Java version of the installer itself?
Try to run NetBeans using JDK 1.7. See the file NetBeans 8.0.1/etc/netbeans.conf - there is a property netbeans_jdkhome - change it to point to a JDK 1.7 home and restart NetBeans IDE.
Related
I have a few applications that I am giving to my colleagues on customer support. I made all of these applications using JRE 1.8, and most of the machines that are being used are using a JRE of 1.6 or 1.7. I have refactored the code so that it will work with these versions of Java.
However, how am I supposed to test that these applications will in fact run on a machine with these versions of Java installed? Do I have to use another computer? Is there any way of testing this from my own PC?
I'm using launch4j to create an .exe file that will run the application (they're just tools to help some troubleshooting processes)
Just to try be more clear, I have the latest version of Java installed on my PC, and I want to test that PCs with Java 1.6/1.7 will still run the .exe file generated from launch4j; so how do I do this on my own PC?
In your IDE (for example eclipse) you can change the project properties
for the java compiler "Compiler compliance level" from 1.8 to 1.6. Then
build the new code.
(By the way, if you like to support Java 1.6 you should only compile with
this compliance level)
If you have still installed old Java-JRE-Versions on your
PC you can set JAVA_HOME environment to the JRE 1.6 folder
(Checks %PATH% too and rename your java 8 JDE and java 8 JRE folder
temporaerly for safety).
I am using Eclipse Luna on Mac Maverick.
I have downloaded GlassFish and extract it.
I have downloaded the Glassfish toolkit from the marketplace.
I am using Eclipse EE.
JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin
When I try to define a new server, why isn't glassfish showing up as an option? What have I missed?
The problem is actually Eclipse. JDK 7 only works with Eclipse EE in 64 bits version. So, basically if want to make glassfish an available server: you need to:
Use Eclipse EE 64 bits version
Use JDK-7
Make sure your JAVA_HOME is set/updated
(In Mac, it usually sits under /Library/Java/JavaVirtualMachines/)
In Eclipse marketplace, download and install Glassfish-toolkit
(and restart the IDE of course)
Make sure your Eclipse EE/Project is using the correct JDK
(Preference -> Java -> Installed JREs)
I want to make Java Desktop Application but Netbeans 6.9.1 is not working on windows 8.1 (it crashes on double click to run). I have installed JDK8 along with Jre7 (both 32 and 64 bit). How to make it run, Netbeans 8 is working properly.
Netbeans 6.9.1 is not working on windows 8.1
You must have JDK 6.0 on your system to install and run NetBeans IDE 6.9.1.
Source NetBeans IDE 6.9.1 Release Notes.
To make Netbeans run on JDK 6, if you have more than one JDK do this:
You can change the JDK for Netbeans by modifying the config file:
Open netbeans.conf file available under etc folder inside the NetBeans
installation. Modify the netbeans_jdkhome variable to point to new JDK
path, and then Restart your Netbeans.
Sample
# Default location of JDK, can be overridden by using --jdkhome <dir>:
#netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_45"
netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_45"
mainly the problem is that your netbeans and jdk are not compatible. you should download lastest jdk 8 and netbeans which you can from here.
DONT FORGET TO SET PATH.
I got a Solution
You must have JDK 6.0 on your system.
Then SET PATH at time of installation to JDK 6.0 .
I want to run my Eclipse in a newer Java version (jdk 1.7) because of compatibility problems with the Window Builder Plugin
"Eclipse is running under 1.6, but this Java project has a 1.7 Java compliance level, so will not be able to load classes from this project. Use a lower level of Java for the project, or run Eclipse using a newer Java version."
So I suppose, I've to change the vm of Eclipse in the configurations.
-vm
C:\Program Files (x86)\Java\jre6\bin\client\jvm.dll
eclipse.home.location=file:/C:/Program Files (x86)/Eclipse IDE for Java EE Developers/
eclipse.launcher=C:\Program Files (x86)\Eclipse IDE for Java EE Developers\eclipse.exe
eclipse.launcher.name=Eclipse
eclipse.p2.data.area=#config.dir/../p2/
eclipse.p2.profile=epp.package.jee
eclipse.product=org.eclipse.epp.package.jee.product
eclipse.startTime=1351770082498
eclipse.vm=C:\Program Files (x86)\Java\jre6\bin\client\jvm.dll
eclipse.vmargs=-Dosgi.requiredJavaVersion=1.5
But I'm not realy familiar with all the statements, and my question is which ones do I've to change in order to run Eclipse with jdk 1.7?
Edit the eclipse.ini file to point -vm to JDK 7
I am working with Eclipse Indigo on a MacBook Pro running Mac OS 10.5.8. I am trying to run the latest version of the Google Android plugin (version 18) but am receiving the following error when I try to create a new Android project:
The selected wizard could not be started.
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectWizard.
Bad version number in .class file
From what I can tell, the issue is that Eclipse is running under a VM with Java version 1.5. No matter what I do the Eclipse installation details configuration page is reporting:
-vm
/System/Library/Frameworks/JavaVM.framework
java.class.version=49.0
java.endorsed.dirs=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/endorsed
java.ext.dirs=/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext
java.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
java.io.tmpdir=/var/folders/N-/N-YaOpnxGXqmE8+CqS2VxE+++TI/-Tmp-/
java.library.path=.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition
java.runtime.version=1.5.0_30-b03-389-9M3425
java.specification.name=Java Platform API Specification
java.specification.vendor=Sun Microsystems Inc.
java.specification.version=1.5
I have tried setting -vm in the eclipse.ini file and also in Info.plist I added: -vm/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands/java
What am I doing wrong? I'm very frustrated here.
Make sure you run the 64-bit Cocoa version of Eclipse 3.5.1, and make sure your JAVA_HOME is set to 1.6.0 and not 1.5.0. Also, set your Preferences->Java->Compiler to 1.6 inside Eclipse.