Jar file not running on double click. [message #1589416] |
Wed, 28 January 2015 12:31 |
Swati Sharma Messages: 4 Registered: January 2015 |
Junior Member |
|
|
Hi,
After building the javafx project I am getting the following ...
No base JDK. Package will use system JRE.
The jar libs\js-14.jar has a main class org.mozilla.javascript.tools.shell.Main that does not match the declared main com.msat.frameworks.keyword_driven.iaf.iAF_UI
The jar libs\selenium-server-standalone-2.35.0.jar has a main class org.openqa.grid.selenium.GridLauncher that does not match the declared main com.msat.frameworks.keyword_driven.iaf.iAF_UI
BUILD SUCCESSFUL
Total time: 4 seconds
The jar file gets created successfully. But it doesn't run on double click or even by using CMD prompt.
[Note: I have tried creating small applications without using external jars and they worked perfectly fine.]
I have attached the build.xml file.
Any help would be much appreciated. Thanks in advance.
-
Attachment: build.xml
(Size: 7.33KB, Downloaded 223 times)
[Updated on: Thu, 29 January 2015 06:24] Report message to a moderator
|
|
|
|
|
|
Re: Jar file not running on double click. [message #1598806 is a reply to message #1597619] |
Tue, 03 February 2015 07:01 |
Swati Sharma Messages: 4 Registered: January 2015 |
Junior Member |
|
|
Hi Tom,
Thanks
The code in Main looks something like this:
public class iAF_UI extends Application {
public static int threadcount1;
public static String jarDir;
public static iAF_Controller controller;
private Stage stage;
private BorderPane root;
@Override public void start(final Stage stage) throws Exception {
CodeSource codeSource = iAF_UI.class.getProtectionDomain().getCodeSource();
File jarFile = new File(codeSource.getLocation().toURI().getPath());
jarDir = jarFile.getParentFile().getPath();
FXMLLoader loader = new FXMLLoader();
loader.setLocation(iAF_UI.class.getResource("iAF_GUI.fxml"));
root = (BorderPane) loader.load();
controller = (iAF_Controller)loader.getController();
controller.setMainApp(this);
Platform.setImplicitExit(false);
//stage.setMaximized(true);
stage.setTitle("IAF-Draft!");
stage.setScene(new Scene(root));
stage.initStyle(StageStyle.UNIFIED);
stage.getIcons().add(new Image(getClass().getResourceAsStream("logo.png")));
stage.show();
stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
@Override
public void handle(WindowEvent t) {
Platform.exit();
System.exit(0);
}
});
}
public Stage getStage() {
return stage;
}
public static void main(String[] args) { launch(args); }
}
Thanks,
Swati
[Updated on: Tue, 03 February 2015 07:18] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05763 seconds