From: Ali M. <so...@sy...> - 2004-11-08 02:36:09
|
Hi, I used the following steps to compile a jni enabled dll on windows Pre-requisite: 1. Microsoft Visual C compiler version 12.00. It is part of visual studio 6. 2. nmake.exe utility. It is downloadable from microsoft.com Steps: 1. download the latest tarball from the following link http://plplot.sourceforge.net/cvs-tarball/ 2. Use winzip to expand the compressed tar file to the C drive. On my machine I have it installed under c:\plplot 3. open "c:\plplot\src\plcore.c" file in a text editor. search for "getcwd()" and change it to "_getcwd()". save the file. 4. Open up a dos shell in windows. Go to the following folder c:\plplot\sys\win32\msdev type "nmake" and press enter. (Assuming nmake is defined in the system path) 5. Within dos shell go to the following folder c:\plplot\sys\win32\msdev\plplib type "nmake plplib.mak" and press enter 6. make a folder "core" under c:\plplot create a text file in this folder with the name "run.bat" Type in following in this file. set JAVA_HOME=C:\j2sdk1.4.2_01 cl /I%JAVA_HOME%\include /I%JAVA_HOME%\include\win32 /Id:\plplot\include /LD c:/plplot/bindings/java/plplotjavac_wrap.c /Fejplplot.dll /link c:\plplot\sys\win32\msdev\plplib\plplot.lib /NOD USER32.lib GDI32.lib KERNEL32.LIB MSVCRT.LIB make appropriate changes based on your system environment Run this batch file from command prompt. On successful completion of all the above steps you will have jplplot.dll in "c:\plplot\core" folder. In any java application using plplot APIs should load this dll first. e.g., static { System.load("jplplot.dll"); } If you have any questions or difficulty, please feel free to email me. Regards, Ali Muhammad ----- Original Message ----- From: "Alan W. Irwin" <ir...@be...> To: "PLplot development list" <plp...@li...> Cc: "Maurice LeBrun" <mj...@ga...> Sent: Friday, November 05, 2004 11:50 AM Subject: Re: [Plplot-devel] How to set the title of a plot? > On 2004-11-05 05:36-0500 Ali Muhammad wrote: > > > Hi, > > > > I am using plsetopt("plwindow", "Figure 1") but it shows the default title. I am using java binding on windows. > > > > Please advise. > > Note, I document a tk bug I found for Maurice below. > > It turns out that plwindow is a valid option, but I frankly had never > heard of it because Maurice (or whoever put this together) is a tricky guy :-) > > Normally, I use the -h command-line option to find particular options, but > it turns out some of those are hidden (including the -showall and -plwindow > options), and the only way to reverse that is to use the -showall option. > > java plplot.examples/x10 -showall -h |grep plwindow > * -plwindow name Name of PLplot container window (tk or dp driver) > > Actually, this is poor documentation since we don't have a dp driver any > more, and in fact I found this option only works for the xwin devices on the > Unix side of things, e.g., > > java plplot.examples/x10 -plwindow "hello world" -dev xwin > > If I try -dev tk instead, I get the following error message: > > wrong # args: should be "plw::create w ?client_id?" > wrong # args: should be "plw::create w ?client_id?" > while executing > "plw::create hello world tk" > ("after" script) > > Maurice, it looks like bit-rot has set in, and you may wish to either > remove this option altogether from the tk device or fix it. > > Ali, your interactive device driver on windows is different from xwin so at > this time the plwindow option may just not be implemented. If you want to > look into this further have a look at the source code for the device that > you are using for interactive display on the windows side. I believe > (although Arjen should know for sure) that is in > .../sys/win32/msdev/src/win3.cpp file. Anyhow, that file has no mention of > plwindow. I presume you could implement handling of the plwindow option by > following what occurs for drivers/xwin.c. If you could get it to work, I am > sure we would be happy to accept your patch. > > BTW, Ali, I believe you are the only user to get java to work on the windows > side. Could you document what you did so other windows/java users could > benefit? > > Alan > __________________________ > Alan W. Irwin > email: ir...@be... > phone: 250-727-2902 > > Astronomical research affiliation with Department of Physics and Astronomy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the FreeEOS equation-of-state implementation > for stellar interiors (freeeos.sf.net); PLplot scientific plotting software > package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the > Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project > (lbproject.sf.net). > __________________________ > > Linux-powered Science > __________________________ > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > _______________________________________________ > Plplot-devel mailing list > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-devel |