Java executable jar file is not running properly - netbeans

I have built an executable jar file using netbeans IDE, it works fine in my system but yesterday I gave it to my friend and he is complaining that the file is not running, it just show the splash screen and then closes, he has JRE 6 installed.
I am unable to resolve the issue. Can someone help?

The problem is, you build the jar using JDK7 and you want to run it on JDK6. It will become error. Try to downgrade and build jar again using JDK6.
Right-Click on your project properties and select Libraries and change the Java Platform.
If the JDK6 didn't come out, please make sure to add it from Tools > Java Platforms and Add Platform...

Related

Problems creating a project with CodenameOne in Netbeans

Install Netbeans 12.6 on a Windows 10 machine. I was able to install the CodenameOne plugin with no problem. When creating a project I get the following error message:
Cannot invoke "org.openide.filesystems.FileObject.getFileObject(String)" because "folder" is null
I've been surfing the internet and can't find a way to fix it.
Thank you for your support.
This approach is no longer supported. The plugin is only used for legacy applications and no longer works in newer IDEs due to breaking changes in almost all IDEs.
Starting with Codename One 7.x we moved to maven projects which don't require the plugin and can be created in https://start.codenameone.com/
I have followed the instructions in the manual and it mentions as important:
"Before opening the project in NetBeans, you need to copy the contents of the tools/netbeans directory into the root project directory. These files are required by NetBeans to build, run, and debug the project correctly. "
But I can't find this folder in netbeans version 12.6.

Eclipse Error-The Eclipse executable launcher was unable to locate its companion shared library

I Downloaded Eclipse from-https://eclipse.org/downloads/
From where i got -eclipse-inst-win64.exe
After intalling it,when i launch it, It is throwing me an error
The Eclipse executable launcher was unable to locate its companion shared library.
I am having Windows 8.1-64 bits, Java SE Runtime Environment-Build 1.8.0_77-b03
very simple and easy solution for this problem. This problem occurs only because of versioning of eclipse . so need to clear the versions of jars which are in the eclipse.ini . Easy way to fix this is just remove eclipse.ini and run your eclipse application file it will automatically creates new eclipse.ini as per your environment

Eclipse Mars 1.0 Build Path Missing From Properties Menu

I have just reinstalled my OS and made a clean install of Eclipse.
I want to import my previous projects made on a previous version of Eclipse and that is no problem. However when I try to run it then it says: "The selection cannot be run on any server".
I read around I need to go into Properties => Build Path and do something there.
Only problem is my Properties menu does not have a Build Path option. I have searched around Eclipse for a long time now to find Build Path but stil no luck.
Does anyone now where og why my Build Path is no where to be found?
By Chance i found the solution myself.
I originally installed the Eclipse Php Mars version of Eclipse which i still can't get to work. But install the Eclipse Jee Mars (Java EE IDE) version instead solves the problem.
First time you run the code though you might have to run it through the main menu in the top and not by the convenient Run icon botton.
I have no clue why this is but now i can continue my work.

Problem in eclipse configuring tomcat

I have trouble when I want to configure eclipse. This error appears, but I dont know where is my problem. I copied apache-tomcat-7.0.5 folder in E:\Java folder, where is java installed.
Tomcat requires a Java SDK in order to compile JSP files. Ensure that the JRE preference settings point to an SDK install location.

How is the Eclipse JDK setting affecting the system's JDK setting

I was trying to compile a Grails application referencing third party JARs on Mac OSX. Although my system's JRE and JDK is set to Java 1.6 I always got a Compilation error: java.lang.UnsupportedClassVersionError: Bad version number in .class file
when accessing classes in the JAR. Also when testing an existing Grails app the default stats of the app where showing that it's running with Java 1.6. So I really didn't have more ideas than to try to change the Java settings in Eclipse - I thought that's stupid as I'm not using Eclipse for the devlopment of this application - but voila - now the compilation of my app on the command line works just fine!
Can anyone explain me what Eclipse is doing here behind the scenes?
I've had set the JAVA_HOME manually before with no effect.
The JDK (JAVA_HOME) used to launched eclipse is not necessarily the one used to compiled your project.
To see what JRE YOU y can select for your project, check the preferences
General > Java Installed JRE
By default, if you have not added any JRE, the only one declared will be the one used to launched eclipse (which can be defined in your eclipse.ini).
You can add any other JRE you want, including one compatible with your project.
After that, you will need to check in your project properties (or in the general preferences) what JRE is used, with what compliance level: