Solved

How to generate executable jar file from JSystemTrader with Eclipse ?

Posted on 2007-04-03
9
1,269 Views
Last Modified: 2008-01-09
Hi,

Eclipse 3.2
I try to generate executable jar file from this Java program under BSD licence :
http://www.myjavaserver.com/~nonlinear/JSystemTrader/JSystemTrader.html

I do :
Menu / file / Export...
Etc.

I have the following Error dialogue box :

JAR creation failed. See details for additional information.
Exported with compile warnings: /JSystemTrader/source/com/ib/client/EReader.java
Exported with compile warnings: /JSystemTrader/source/com/jsystemtrader/backdata/BackDataDialog.java
Exported with compile warnings:

Then warning about all class
Then  this error message :

Resource is out of sync with the file system: /JSystemTrader/log/EventLog.htm.

I think it is not the warning which stop generate Jar.
I think it is the last error message :
Resource is out of sync with the file system: /JSystemTrader/log/EventLog.htm.

How to generate executable jar file from JSystemTrader with Eclipse ?

Thanks.
0
Comment
Question by:Couturier
  • 5
  • 3
9 Comments
 
LVL 10

Accepted Solution

by:
Jaax earned 500 total points
ID: 18842434
I could add the JSystemTrader into eclipse and compile it. Try refreshing the workspace using F5
0
 

Author Comment

by:Couturier
ID: 18844726
Hi Jaax,

Could you show me MANIFEST.MF file or ant script ?
0
 
LVL 92

Expert Comment

by:objects
ID: 18847214
theres a field in the about the 3rd jar export screen to enter the Main Class
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:Couturier
ID: 18849007
Hi Jaax,

I try F5 and it help me to do a step.
Now I do a jar file but when I double click I have the following error box :

Failed to load Main-Class manifest attribute from S:\testJSystemTrader.jar


0
 
LVL 92

Expert Comment

by:objects
ID: 18849141
u need to specify the main class when exporting the jar
0
 

Author Comment

by:Couturier
ID: 18849190
Hi objects,

I have specified the main class during the exporting process.
But I have the message :

Failed to load Main-Class manifest attribute from S:\testJSystemTrader.jar
0
 
LVL 92

Expert Comment

by:objects
ID: 18849219
check you have specified the correcxt class name

and try running it from command line to see if there are any exceptions at startuip

java -jar testJSystemTrader.jar
0
 

Author Comment

by:Couturier
ID: 18858876

I think that only a ready to use built.xml ant file could realy help me.
Could someone to made it ?

0
 

Author Comment

by:Couturier
ID: 18863938
Hi,

Eclipse 3.2

Eclipse 3.2
I try to generate executable jar file from this Java open source program under BSD licence :
http://www.myjavaserver.com/~nonlinear/JSystemTrader/JSystemTrader.html

Source code :
http://www.myjavaserver.com/~nonlinear/JSystemTrader/JSystemTrader.zip

There is a tutorial How to install JSystemTrader under Eclipse here :
http://groups.google.com/group/JavaTraders

I have already write 2 files :
A batch file to launch JSystemTrader.jar with the current directory parameter :

RunJST.bat

JSystemTrader.jar  cd
pause


And a xml for ANT

build.xml

<?xml version="1.0" encoding="UTF-8"?>

<project name="JST.makejar" default="makejar" basedir=".">

      <target name="compile" description="Compile the project">
            <javac fork="yes" srcdir="source/" destdir="bin/" classpath="lib/" />
      </target>

      <target name="makejar" description="Create a jar for the JSystemTrader project">
            <jar destfile="JSystemTrader.jar" basedir="bin/" compress="true">
                  <manifest>
                        <attribute name="Main-Class" value="com.jsystemtrader.client.JSystemTrader" />
                        <attribute name="Class-path" value="./;resources/;lib/jfreechart-1.0.0.jar;lib/jcommon-1.0.0.jar;lib/liquidlnf.jar" />
                  </manifest>
            </jar>
      </target>

</project>


The ANT xml  create 2 error dialogue boxs.
The first is :
Unable to set custom look & feel. The default L&F will be used.

Please help me to terminate this ANT xml.



0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
xampp tool 12 56
mysql jsp example issue 32 53
Is Applet the way to go for my drag and drop system? 8 25
Cisco ASA: Java web start no go, asdm launcher no go 3 39
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question