santhoshtmail / indic-keyboards

Automatically exported from code.google.com/p/indic-keyboards
0 stars 0 forks source link

Not able to create jar file in windows #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I followed the document
http://code.google.com/p/indic-keyboards/wiki/HowToBuild to build
indic-keyboards in windows.

I am able to compile the keyboards, but could not create jar files.

I find it gives error in the following statement:
    <unjar src="${swt}" dest="./swt" /> (line number 82)
It says i could not find the jar file.  Pls help.

Following is the command I issued and the error I got:
E:\mugunth\apps\indic-keyboard\indic-keyboards>ant -f build-win32-x86.xml
jar -D
swt=swt-3.4-win32-win32-x86.jar
Buildfile: build-win32-x86.xml

init:

compile:
     [echo] Compiling indic-keyboards-win32-x86

jar:
    [mkdir] Created dir: E:\mugunth\apps\indic-keyboard\indic-keyboards\dist
    [mkdir] Created dir: E:\mugunth\apps\indic-keyboard\indic-keyboards\swt
    [unjar] Expanding:
E:\mugunth\apps\indic-keyboard\indic-keyboards\swt-3.4-wi
n32-win32-x86.jar into E:\mugunth\apps\indic-keyboard\indic-keyboards\swt

BUILD FAILED
E:\mugunth\apps\indic-keyboard\indic-keyboards\build-win32-x86.xml:82:
Error whi
le expanding
E:\mugunth\apps\indic-keyboard\indic-keyboards\swt-3.4-win32-win32-
x86.jar
java.io.FileNotFoundException:
E:\mugunth\apps\indic-keyboard\indic-keyboards\sw
t-3.4-win32-win32-x86.jar (The system cannot find the file specified)

Total time: 0 seconds

Original issue reported on code.google.com by mugunth on 2 Dec 2009 at 6:22

GoogleCodeExporter commented 9 years ago
I just noticed following warnings in the compile step which might be the reason 
for
my jar creation failure:

init:
    [mkdir] Created dir: E:\mugunth\apps\indic-keyboard\indic-keyboards\bin

compile:
     [echo] Compiling indic-keyboards-win32-x86
     [echo]  swt-3.4-win32-win32-x86.jar
    [javac] Compiling 725 source files to
E:\mugunth\apps\indic-keyboard\indic-keyboards\bin
    [javac]
E:\mugunth\apps\indic-keyboard\indic-keyboards\src\org\iisc\mile\indickeyboards\
UI.java:42:
warning: sun.management.ManagementFactory is Sun proprietary API and may be 
removed
in a future release
    [javac] import sun.management.ManagementFactory;
    [javac]                      ^
    [javac]
E:\mugunth\apps\indic-keyboard\indic-keyboards\src\org\iisc\mile\indickeyboards\
UI.java:408:
warning: sun.management.ManagementFactory is Sun proprietary API and may be 
removed
in a future release
    [javac]                                             String pid =
ManagementFactory.getRuntimeMXBean()
    [javac]                                                          ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 warnings

Original comment by mugunth on 2 Dec 2009 at 6:46

GoogleCodeExporter commented 9 years ago
The warnings are not the reasons for not being able to create a JAR. Though we 
have
mentioned in detail how to build in our HowToBuild wiki page, I would again 
walk you
through the steps.

I am assuming that JDK is installed and the necessary additions to the Path
environment variable is done. (If not, let us know and we will post how to do 
it)

Since you are trying to build on Microsoft Windows, make sure that Microsoft 
Visual
C++ is installed and properly set up. MS Visual Studio is not available freely 
but
the express edition can be downloaded free of cost. The link to the download 
page is
given in the SystemRequirements wiki page. If everything is set up properly, 
you will
find a "Microsoft Visual C++ Expres Edition" group in the windows' menu. Use the
command prompt which comes with VC++ to build. (NOTE : If you are using a 32-bit
windows, the dlls present in the repository will work. You don't need to
compile/re-build them again)

Apache Ant also must be installed. Ant binaries are available only as *.zip, 
*tar.gz
and *.tar.bz2. A single click installer is not available. So it needs a little 
effort
to setup Ant. You can refer the HowToBuild wiki page which contains a link to 
Ant's
manual. A very nice step-by-step guide is available there.

Next, you need the SWT library to compile. It can be obtained from the Eclipse 
SWT's
page. Download the appropriate version. The download will be a zip file which 
will
contain few files inside it. The latest one is swt-3.5.1-win32-win32-x86.zip. It
contains a jar file inside named "swt.jar". Just extract the file to the 
directory
which contains the indic-keyboards source. 

Now, in the build-win32-x86.xml ant script, "the default name expected is
swt-3.4-win32-win32-x86.jar". To override it, edit the ant script or better, 
use the
command line switch while compiling. Ex : ant -f build-win32-x86.xml jar 
-Dswt=swt.jar

Use ant -f build-win32-x86.xml -p to see all the targets.

I hope this solves your problem. Also, this is not an issue. For queries 
related to
building or other queries in general, please use the user mailing list or the
developer mailing list (which ever is appropriate).

Original comment by abhinav.zoso on 2 Dec 2009 at 7:21