|
Attention! Read the forum rules carefully before posting a topic.
Try to find an answer in Wiki before asking a question. Submit programming questions in this forum only. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
I can’t get the application to run outside the Netbeans IDE.. |
markg
|
Post subject: I can’t get the application to run outside the Netbeans IDE.. |
Post rating: 0
|
Posted: Mon 19 Mar, 2012, 08:11
|
|
User rating: 1
Joined: Thu 23 Feb, 2012, 11:22 Posts: 23
|
I can’t get the application to run outside the IDE..
I imported the project into NetBeans 7.1. as per the instructions provided on the wiki page..
Using JForex-API-2.6.60
The main class has been set in
Project -> Properties -> Run… Main Class: Main.Timer_Utility
When I build the project the manifest.mf contains only:
----- Manifest-Version: 1.0 Ant-Version: Apache Ant 1.8.2 Created-By: 1.7.0_02-b13 (Oracle Corporation) ----- There is no Main-Class: , Class-Path: or other manifest files.
I noticed that during the build process the Manifest file can’t be written to as it is read only.
When I open the file in "files" view, it opens as a read-only file. I opened the files-properties dialog box for the file and did not see an option to make it writable.
This is my first project so I may be doing something wrong.. I have run out of ideas..
Any help would be appreciated
Regards
Mark
|
|
|
|
|
API Support
|
Post subject: Re: I can’t get the application to run outside the Netbeans IDE.. |
Post rating: 0
|
Posted: Mon 19 Mar, 2012, 08:21
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
|
markg
|
Post subject: Re: I can’t get the application to run outside the Netbeans IDE.. |
Post rating: 0
|
Posted: Mon 19 Mar, 2012, 08:48
|
|
User rating: 1
Joined: Thu 23 Feb, 2012, 11:22 Posts: 23
|
Hi Support,
I have read that article.
The problem I can see is that the Manifest file generated from the imported project is "Read-Only" and can't be written to during the build proccess.
I can't see a way of changing the Manifest file to make it writable.
|
|
|
|
|
API Support
|
Post subject: Re: I can’t get the application to run outside the Netbeans IDE.. |
Post rating: 0
|
Posted: Mon 19 Mar, 2012, 10:49
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Another option is to include libraries in the build. 1) Project -> Properties -> Build -> Packaging -> Check "Copy Dependent Libraries" 2) Build the project 3) run the project: "java -jar "Standalone.jar" "
|
|
|
|
|
markg
|
Post subject: Re: I can’t get the application to run outside the Netbeans IDE.. |
Post rating: 0
|
Posted: Mon 19 Mar, 2012, 11:27
|
|
User rating: 1
Joined: Thu 23 Feb, 2012, 11:22 Posts: 23
|
After trying what you suggested the Manifest file is now being written to during the build process..
The dist folder also now contains a lib folder with Jar Files.
this is the contents of the Manifest file now...
------- Manifest-Version: 1.0 Ant-Version: Apache Ant 1.8.2 Created-By: 1.7.0_02-b13 (Oracle Corporation) Class-Path: lib/DDS2-jClient-JForex-2.14.26.jar lib/JForex-API-2.6.60. jar lib/DDS2-Connector-1.1.53.jar lib/DDS2-Charts-5.52.jar lib/greed- common-177.jar lib/dds2-common-2.3.82.jar lib/transport-client-2.3.82 .jar lib/log4j-1.2.14.jar lib/mina-core-1.1.7.jar lib/mina-filter-ssl -1.1.7dc.1.jar lib/slf4j-api-1.5.8.jar lib/slf4j-log4j12-1.5.8.jar li b/ta-lib-0.4.4dc.jar lib/7zip-4.65.jar lib/jcalendar-1.3.3.jar lib/ec j-3.5.2.jar lib/libs Main-Class: Main.Timer_Utility ------
but when trying to run the application outside the IDE I am getting the following message box from the Java Virtual Machine Launcher
“Could not find the main class: Main.Timer_Utility. Program will exit”
|
|
|
|
|
API Support
|
Post subject: Re: I can’t get the application to run outside the Netbeans IDE.. |
Post rating: 0
|
Posted: Mon 19 Mar, 2012, 14:37
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
What are you doing to run the application?
|
|
|
|
|
markg
|
Post subject: Re: I can’t get the application to run outside the Netbeans IDE.. |
Post rating: 0
|
Posted: Mon 19 Mar, 2012, 15:02
|
|
User rating: 1
Joined: Thu 23 Feb, 2012, 11:22 Posts: 23
|
I’m navigating to the projects dist folder and double clicking on the Jar File with the projects name.
|
|
|
|
|
API Support
|
Post subject: Re: I can’t get the application to run outside the Netbeans IDE.. |
Post rating: 0
|
Posted: Mon 19 Mar, 2012, 15:25
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
You should start it from console using the following expression: java -jar "Standalone.jar"
|
|
|
|
|
markg
|
Post subject: Re: I can’t get the application to run outside the Netbeans IDE.. |
Post rating: 0
|
Posted: Tue 20 Mar, 2012, 06:16
|
|
User rating: 1
Joined: Thu 23 Feb, 2012, 11:22 Posts: 23
|
It will run from the console with the code you provided and connects ok but I get a warning..
Log4j:WARN No appenders could be found for logger (Main.Dukascopy_Client). Log4j:WARN Please initialize the log4j system properly.
I don’t get this when running the code within the IDE..
Is it possible to run the jar file from vb.net code?
|
|
|
|
|
API Support
|
Post subject: Re: I can’t get the application to run outside the Netbeans IDE.. |
Post rating: 0
|
Posted: Tue 20 Mar, 2012, 17:32
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
you need to include the log4j.properties file in the jar classpath.
|
|
|
|
|
nen
|
Post subject: Re: I can’t get the application to run outside the Netbeans IDE.. |
Post rating: 0
|
Posted: Sun 04 Jun, 2017, 14:27
|
|
User rating: 0
Joined: Sat 25 Mar, 2017, 19:13 Posts: 6 Location: RomaniaRomania
|
API Support wrote: you need to include the log4j.properties file in the jar classpath. I tried with: javac -cp .:./JForexClientLibrary/libs/*:./JForexClientLibrary/libs/log4j.properties Trade.java but I still get those warnings WARN No appenders could be found for logger (com.dukascopy.api.impl.connect.DCClientImpl). WARN Please initialize the log4j system properly. I am using the libs from the JForexClientLibrary.zip file
|
|
|
|
|
nen
|
Post subject: Re: I can’t get the application to run outside the Netbeans IDE.. |
Post rating: 0
|
Posted: Sun 18 Jun, 2017, 19:50
|
|
User rating: 0
Joined: Sat 25 Mar, 2017, 19:13 Posts: 6 Location: RomaniaRomania
|
fixed. was not using all the newest jar files.
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|