i had created a java application that has netbean frame work , but now am not able to run its exe file on other computeer then mine , its showing main class not fine error .

can anyone help me in creating manifest file for the same

Recommended Answers

All 9 Replies

i had created a java application that has netbean frame work , but now am not able to run its exe file on other computers , its showing main class not fine error .

can anyone help me in creating manifest file for the same

first of all: a "netbean frame work"? I assume you mean "a project built using Netbeans"?
secondly: it's exe file? if you wanted an exe file, you shouldn't have chosen for Java. creating an exe file for a Java application is nonsense.

what problem do you have creating the manifest file? netbeans actually creates that for you, if you declared the correct class on creation of the project, if not.. it's just adjusting a flat-text file in notepad

Member Avatar for iamthwee

You gotta assume the client machine has the java runtime on it as well. There are ways to create a standalone exe but it is way too much hassle. Not worth it.

Simply follow the instruction in you chosen IDE that will create your jar file for you without the need to issue any command line prompts although you can go that route if needed.

stultaske

Ya its java written code but is is using JForm , that means am not able to run this file using cmd panel , i had created its jar file and also exe file but that file is running only in my system.
Please suggest some needful

Must install JRE on the system which run your program.
All java aplication need JRE to run.

Manu_5: first of all, if you can't run it through the command prompt, you won't be able to run it through using an exe neither. it just means that either you don't know how to run applications, or that you didn't provide a main method.

next of all, I was not talking about running it from the command prompt, I was talking about the .jar file, which is already an executable, but is also portable. an exe limits you to a Windows OS, which is not what Java was meant for.

as albucurus states: each system on which you want to run the application must have a valid JRE installed. With valid, I don't mean just any official JRE, but if you compiled it using Java 7, the JRE of Java 6 won't do.

also, they might not have their environment settings set.

and who knows what 3rd party jars he's inadvertently pulled in by using netbeans to generate his screens for him...
It's got better, but many IDEs still have a tendency to generate code that has dependencies on all kinds of custom (and these days open source) libraries.
And as there's no "JForm" class in the standard API, at least not in the standard Java API (might exist in the JavaFX APIs but I don't have those installed here) he's got at least one such dependency already.

"might exist in the JavaFX APIs but I don't have those installed here"

That's very worrying from a security viewpoint. JavaFX is included with Java 7 update 6 and all later versions.

yes, but the documentation isn't. It's a separate download, and I don't have that one (and am too lazy to go browse through a heap of jar files).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.