Advice needed... should I write it using JNI?

Hi all - I'm experienced with both Java & c++. I've got a set of libraries written in c++, and I need to write a test harness. It's been suggested that I write it using JNI. I've no experience with JNI, only gone through the tutorials.
The library & test harness will be used on a multitude of platforms (Windows, Sun, Linux, Netware, AIX, oh many more...).
Based on my very limited understanding of JNI, I'd basically have to write a harness in c++ (I can't touch the libraries themselves) using JNI-friendly methods and then access it with a pure Java app. Various reasons as to why this might be a good idea have been suggested, but I'd like some more experienced input.
Is this a worthy use of JNI? I'm quite happy to learn it & do it, but is this the type of situation where I'd want to? And am I totally off on what I'd have to do?
Thanks in advance,
Suzanne

Hi,
I had been working on JNI as well. It was a nice experience trying to communicate from java through c and finally to fortran libraries built long ago. Since rewriting the code was tedious Job we came out with this idea of JNI. During my reserach on JNI I came across with javah -stubs option. To my understanding if you could generate the stubs based header files. You can talk to c programs with minimum changes in interface. If this is just a test program then you can also communicate through sockets and built a interface between these two high level languages, where all the returned output will be redirected to ports where in finally you extract it from Java side and vice versa. I haven't tried the second idea but would be interesting to try though. Do let me know what u finally decide to do on forum.
Thanks,
Regards,
RaviKiran.

Similar Messages

  • Advice Needed - Should I just do a Clean Install?

    I've got an older 17" iMac FP that I handed down to the kids (6 and 9). The mainly use Garageband and Pages. Since this was my original machine (before getting my new 20" iMac G5) I decided to leave my account on there, just for a backup. Lately they've been getting lots of "Program quit unexpectedly" on lots of apps, including Garageband, iTunes, TextEdit, and Marble Blast Gold. Things have gotten worse since the 10.4.7 upgrade. I just ran a "fix permissions" and "Verify Disk" all looked good. The machine is in good shape, lots of RAM and about 15G of disc space available.
    So, what's my question... I've been thinking of just starting over; doing a clean install. This machine was originally upgraded from 10.2.8 directly to 10.4.x. I just think that maybe starting from a clean disk would help things out.
    Some questions. What is the best way to backup the kids accounts? I have a FW drive connected to it, so I can back up stuff to it. I really don't want a "clone" just a decent backup. Also, is it a good idea to delete my and my wife's user accounts (I hear a disk image of each account is created). I could copy those over to the FW just as insurance. I've been moved over to the new G5 for about 3 months now, so I'm pretty sure I got everything over. But you know what happens, as soon as I wipe the old system I will discover I am missing something form the old machine.
    What do you all suggest I do? I realize that even after wiping the drive I will probably end up with 10.4.7 after all is said and done. I just think that a clean system may be a good start.
    Thanks,
    Alfredo

    Hi, Alfredo.
    1. You wrote: " Lately they've been getting lots of "Program quit unexpectedly" on lots of apps..."See my "Multiple applications quit unexpectedly or fail to launch" FAQ for advice on troubleshooting this issue.
    2. I trust you've enabled Parental Controls, Simple Finder, etc. to keep the children from discarding system-related files? I presume they do not know the Admin password on that computer and their accounts are not set up as Admin, yes?
    3. You wrote: "What is the best way to backup the kids accounts? I have a FW drive connected to it, so I can back up stuff to it. I really don't want a "clone" just a decent backup."The advantage of duplicating (cloning) is that if you decide to reinstall Tiger from scratch, you can restore their accounts simply using the Migration Assistant from the clone on the FireWire drive after you've set up the an Admin account for yourself to manage their Mac. It's a little-known fact that you can use the Migration Assistant to migrate from an a duplicate of the startup disk of an "old" Mac on a FireWire drive vs. Target Disk mode.
    That would also settle the question of saving a backup of your account and your wife's account on that computer for the time being. At some point you could startup from that clone, then use the instructions in "Mac OS X 10.4 Help: Deleting a user account" to delete those accounts from the clone and move the disk images for such to another drive on your new Mac. Note that if one of the accounts you are deleting from such is the only Admin account, you may want to first create another Admin account on the clone and use it to delete-and-preserve your account and that of your wife as you need to use an Admin account to remove accounts.
    For advice on the backup and recovery solution I employ, see my "Backup and Recovery" FAQ.
    4. If you're going to perform a full, fresh reinstall of Tiger on your children's computer, I also recommend — after cloning the drive and assuring you have good, bootable clone — to first "zero" the drive to remove any bad sectors that may have developed. See "Disk Utility 10.5 Help: Securely erasing disks." Select at least the "Zero Out Data" security option.
    5. FYI: If your children access the Internet, see my "Internet Safety for Children" FAQ for my advice on protecting your children on the Internet. This FAQ lists some Mac-based solutions, tips I have suggested in prior posts, and a list of links for additional information.
    Note that some of the information above is from the "Moving to a New Mac" and "Zeroing Volumes" chapters of my book, Troubleshooting Mac® OS X, Tiger Edition.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X
    Note: The information provided in the link(s) above is freely available. However, because I own The X Lab™, a commercial Web site to which some of these links point, the Apple Discussions Terms of Use require I include the following disclosure statement with this post:
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • Advice needed for WAP4410n to authenticate using active directory ?

    Hello,
    We have a couple of Cisco WAP4410n newly purchased for our organisation.
    1)We already have a windows 2003 active directory with domain and users.
    2)We have installed a machine with ubunto linux.It has freeradius configured
    in it.we have also installed the certificate server in this machine.
    3)we have given the linux machine's ip to the freeradius settings in  wap4410n.
    4)Our logic is that when a wireless users tries to connect to wap4410n the linux
       free radius server will communicate with the windows active directory and grant
       access to the wireless user.
    However when we try to connect a wireless user we are getting certificate related
    errors.
    Can someone advice us on the settings (PEAP and certificate issues) with respect to freeradius and wap4410n
    so that the active directory users can be authenticated.
    Thanks & regards.....

    Hi Sabeesh,
    if you get a certificate warning, then you should check what it is complaining about.
    -If you go for PEAP, you're supposed to install a certificate on the radius server and to have the clients to trust it.
    -Usually people configure the windows peap client to NOT validate the server certificate, which bypass this problem. However a certificate still has to be installed on the Radius server but it can be invalid.
    Hope this helps
    ===
    Don't forget to rate answers that you find useful

  • I'm trying to update iOS 7 and it says I need 3.4 GB of storage to update.. I currently have on my storage 797 MB and 12,6 GB used. How much storage should it write for me to be able to update?

    I'm trying to update iOS 7 and it says I need 3.4 GB of storage to update.. I currently have on my storage 797 MB and 12,6 GB used. How much storage should it write for me to be able to update?

    If your ipad has only 797 MB free and it tells you that you need 3.4 GB to update, then you need to begin deleing files, whatever it takes to free up space.
    Consider...
    Delete apps you don't use.
    Delete videos you don't want (these take up a lot of space).
    Do you have a lot of emails stored on the device?
    Are there apps that store data files, like a PDF reader?  If there are a lot of these, you need to delete some.
    The bottom line is that you need to remove data and/or apps on your device to make more storage available.
    But for videos and photos, always sync them to a computer first to archive them.

  • I need help from chile and use a language translator to write and not turn my iphone4

    I need help from chile and use a language translator to write and not turn my iphone4

    http://support.apple.com/kb/TS3281       
    Not turn on

  • I am using InDesign CS5. I have a body of text which is ranged left with tabbed indents. My client now wants the copy to be justifed, keeping the tabbed indents. Help and advice needed please!

    I am using InDesign CS5. I have a body of text which is ranged left with tabbed indents. My client now wants the copy to be justifed, keeping the tabbed indents. Help and advice needed please!

    Hi
    That screen grab helps a lot. There’s a much easier way of doing what you’re doing.
    Remove all your tabs and set the text in justified paragraphs.
    I’ve typed in dummy text in the example I made below, but after “19.1” put in a space and put your blinking cursor after the space and before the ’N’ of ‘Notices'.
    Then hold down the Command key and hit Backspace (on Mac at least - it’s the key between the Inverted commas/ apostrophe key and the return key).
    The text will jump into place the way you want it to.
    Hope that helps
    Paul
    PS You can set a tab, instead of using a space, in the description I gave above. So, after 19.1 or 19.2 or 19.185 etc etc insert a tab, then hit the Command Backspace after every paragraph number and they'll all line up exactly together. You'll find that editing text within the paragraphs
    after you've set it will be LOADS easier this way.
    You can put the tab anywhere you want it to be using 'Command-ShiftT' and putting a 'left align' tab just after the number. Just type the Command Backspace after the paragraph number and it'll work

  • HT201442 i have updated my iphone 4s to the new ios 7.1 ,but it stuck on active mode and it needs my account because i used "find my iphone" before ,but the problem is my account is banned by apple i dont know why ,so what should i do ?

    i have updated my iphone 4s to the new ios 7.1 ,but it stuck on active mode and it needs my account because i used "find my iphone" before ,but the problem is my account is banned by apple i dont know why ,so what should i do ?

    You need to update iTunes to 11.1 on your PC

  • MOVED: Various advice needed to overclock cpu using my MSI k8n platinum sli

    This topic has been moved to Overclockers & Modding Corner.
    Various advice needed to overclock cpu using my MSI k8n platinum sli

    what HSF for cpu/ cooling for the case do you use? And also, where are the flashing lights?

  • IBook and external HDD - Advice needed

    Hi all,
    I am using an old G3 white dual USB iBook with OS X 10.2.8. The backlight cable broke a year ago, and I finally worked up the nerve to replace it myself...and while I'm in there, I'd like to drop in a new 120GB Seagate hard drive to replace the practically full 30GB in there now. Now before I do all this, I really want to back everything up to an external hard disk.
    I have an old Western Digital Caviar 60GB disk that I put into an external enclosure (an AcomData 509), but so far I've had no luck getting Disk Utility to reformat it. Disk Utility sees the hardware and reports it as "0,00 Bytes DMI" and gives the correct model number for the disk, however DU simply won't reformat.
    When I tried to put an Apple Extended partition on there, it popped up a progress window saying "Setting up partition map" with a blue candy cane progress bar and then just sits there doing nothing. CPU usage doesn't go up, the drive light never flickers, and right clicking DU in the Dock never reports that the app isn't responding. If I try to quit, it just beeps and won't quit. The console has the following lines:
    May 19 13:00:18 c<edited IP address out> kextd[507]: a link/load error occured for kernel extension (null)
    /System/Library/Filesystems/msdos.fs/msdos.util: device safe_read error @ 0, Device not configured
    The same thing happens even if the option to zero the disk is selected. In either case, DU must be force quit.
    So, with no success there, I decided to try to format it as an MS-DOS File System. Clicking Erase makes a progress window with the candy cane bar very quickly pop up and then disappear with no indication that anything happened at all. The console had the following lines after that:
    /System/Library/Filesystems/msdos.fs/msdos.util: device safe_read error @ 0, Device not configured
    /sbin/newfs_msdos: warning: /dev/disk2 is not a character device
    /sbin/newfs_msdos: meta data exceeds file system size
    If I select the zero disk option, the progress window pops up flashing "Remounting Volume" then "Writing zeros" and then DU abruptly crashes. If anyone needs the crashdump log, I'll be happy to post it, but it is very long.
    Typing "diskutil list" in the terminal shows:
    /dev/disk2
    #: type name size identifier
    0: *0.0 B disk2
    1: 0.0 B disk2
    Typing "diskutil info /dev/disk2" reports
    Device Node: /dev/disk2
    Device Identifier: disk2
    Mount Point:
    Volume Name:
    can't open: /dev/disk2 (Permission denied)
    File System:
    Partition Type:
    Media Type: Generic
    Protocol: USB
    Total Size: 0.0 B
    Free Space: 0.0 B
    Read Only: No
    Ejectable: No
    I thought it might be interesting to try the eraseDisk for diskutil, but here's what happened:
    sudo diskutil eraseDisk HFS+ BackupDisk /dev/disk2
    Password:
    error -5344 making new partition
    Unmount old disk
    Erasing disk2
    /sbin/newfs_hfs: write (sector 0, 45568 bytes): Device not configured
    Remounting volume
    Could not mount disk
    I'm not very familiar with using fdisk, but when I tried to run it with "sudo fdisk" it told me it must be run as root...ok?
    This drive originally had Redhat Linux 7 with one large ext2 partition if I remember right. Clearly something happened to it, but I don't know what.
    Since I really need this data backed up, I tried using my 3rd gen 20GB iPod, but unfortunately, when I try to copy over my home directory I routinely get an error -50. This happens on specific files, but even when I try to copy one at a time, I still get a message that certain files or folders couldn't be copied. The iPod is formatted FAT32, if that makes any difference.
    So, I need some advice. Should I go buy a new had drive to put in the enclosure and hope this one works? Would it be better to find a NAS, and if so, what's a good model? Should I get a 2.5" external enclosure and put the old iBook hard drive in there and try to mount that once I've installed Tiger on the new Seagate? (I know there are bound to be permission issues with getting into my home directory like that...)
    Any suggestions would be very much appreciated. Thank you in advance.
    iBook dual USB, 600MHz G3, 30GB HD   Mac OS X (10.2.x)  

    Thank you for the suggestions.
    I tried the repartitioning, but DU stalled out with the message "Preparing drives ... unmounting old volumes." It still didn't report any higher cpu usage, the drive light never flashed, and DU wouldn't quit normally. I tried using diskutil partitionDisk at the command line, and that returned an "error -5344 making new partition" and "You have specified partition sizes which will not fit on the device." I tried 60G as the size, and when that didn't work, I tried all the way down to 30G, still with the same result. (Interestingly, DU no longer says the disk is a WD600 as before - it just says "DMI" under the description.) What could I be doing wrong?
    Oh, with the iPod I was trying to copy only a few folders, like a "School" folder, from my home directory, not the whole thing at once. It copied fine for a while, then it returned the error -50 and stopped. The message dialog with the error -50 stayed up there and would never go away, and if I tried to log out or restart, I'd be told the Finder couldn't quit because some operation was still in progress.
    If I tried to copy a different folder, or copy smaller batches of files, I'd either still get that error, or the Finder would say that it couldn't copy a file, and ask if I wanted to stop or continue. Whichever choice I made, the message dialog wouldn't go away, even if the rest of the copy completed successfully. Trying to log out or restart would again tell me the Finder couldn't quit as before.
    I should mention that the exact same thing happens when I try to copy some things out to my USB drive (a SanDisk Cruzer Micro). A few years ago, when I tried to copy some school files from the iBook onto a Windows 2000 (NTFS) machine over a network, I had a similar problem with the error -50. I got around that by going to the Win machine and using it to do the copy. Copying onto the iBook from either machine worked just fine, though.
    Anywho, those other drive enclosures are very nice, but they're so expensive, and if I had to get a new drive, too, I might have to not eat for the rest of the month, lol. And I doubt I could get one shipped and get this little machine all fixed up before school starts next week (and I'll definitely be needing it for school, unfortunately).
    So barring a good enclosure, do you think I'd have better luck with a MyBook external or something similar? Or a NAS? What worries me is that if I'm already having trouble copying onto the iPod and the USB drive, what are the chances it'll be any better with one of those? Could it just be some issue with FAT32?
    Would it be possible for me to get a 2.5" enclosure and put the iBook's current disk in there, do my repairs, install Tiger on the new Seagate, and then mount the old disk over Firewire and move my files to the new disk that way? How would I make my files public so the new install will let me read them? In Windows, making the folder shared was enough...any suggestions for something equivalent in OS X (Jaguar)?
    Again, thanks for your help, very much appreciated. ~:o)
    iBook dual USB, 600MHz G3, 30GB HD Mac OS X (10.2.x)
    iBook dual USB, 600MHz G3, 30GB HD Mac OS X (10.2.x)

  • Urgent advice needed: Road Trip Editing

    i used to work as a director (sports and variety) at a TV boardcasting firm in Hong Kong, i have quited recently and now freelancing.
    i need a mac to do editing while i am on a road trip, it is a reality tv show abt the olympic torch relay, the show is due on-air as we travel, we will FedEx dv tape to Hong Kong every 5-6 days or so.
    1 min program: Mon to Thur
    2 mins program: Mon, Wed, Fri
    24 mins program: Fri
    i want to do simple cut while on the road because i want to share the post-pro workload. There is only one editing team to work on this project in hong kong. i used to work on DBeta panel and had been using non-linear editing (FCP 5.1) for only a year.
    i am thinking of getting te new MBP 15" 2.4 with 4G ram, should i keep on using FCP 5.1 or get a more friendly FCE as my assistant and the script writer have no experience in mac.
    any advice? i am departing coming tuesday
    thank you in advance

    The MBP will work perfectly for what you're trying to do.
    As far as the software, Final Cut Express is more than capable of editing short clips like those you described. Of course, FCP will do it as well, but it's more expensive and harder for your team to learn in a hurry if they have no video editing experience. They can pick up FCE is about 20 minutes if you have them sit down and watch the tutorial videos on apple.com.
    If I were you, I'd go with the MBP and Final Cut Express.

  • We are using jni.h but its getting errors, please check it this

    We are using jni.h but its getting errors, please check it this
    Calling from a .dll using Java and JNI - by Borland Developer Support Staff
    Abstract:Basic JNI example: making a Win32 API call
    Making Native Windows API calls from within a Java Application
    One of the main points of Java is to be completely platform independent. However, sometimes it will occur that the developer of an
    application will know that his or her application is only going to be run on a specific platform, for example, Win32.
    NOTE: This example assumes that you are using JDK 1.2 or later.
    Below are the steps for writing a Java application that makes a Win32 API call. The application generates a Swing Jframe and makes it
    system modal, or gives it the �Always On Top� functionality, similar to that of the Windows NT Task Manager.
    Steps to follow:
    1. Write the Java code for the application
    2. Run javah.exe on your .class file to generate a C header file
    3. write the implementation of your native methods
    4. create the shared library
    5. run the application
    1. Write the Java code for the application
    import java.awt.*;
    import sun.awt.*;
    import sun.awt.windows.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class Frame1 extends JFrame {
    int windowHWND = 0;
    JButton jButton1 = new JButton();
    public Frame1() {
    //windowHWND = this.getHwnd();
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    public int getHwnd() {
    DrawingSurfaceInfo w = (DrawingSurfaceInfo) ((DrawingSurface) getPeer()).getDrawingSurfaceInfo();
    w.lock();
    WDrawingSurfaceInfo win32 = (WDrawingSurfaceInfo) w;
    int hwnd = win32.getHWnd();
    w.unlock();
    return hwnd;
    static {
    System.loadLibrary("windowOnTop");
    public static native void WindowAlwaysOnTop(int hwnd, boolean flag);
    public static void main(String[] args) {
    Frame1 frame11 = new Frame1();
    frame11.setSize(400,400);
    frame11.setVisible(true);
    private void jbInit() throws Exception {
    jButton1.setText("jButton1");
    this.addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowOpened(WindowEvent e) {
    this_windowOpened(e);
    public void windowClosing(WindowEvent e) {
    this_windowClosing(e);
    this.getContentPane().add(jButton1, BorderLayout.NORTH);
    void this_windowOpened(WindowEvent e) {
    windowHWND = this.getHwnd();
    System.out.println("the value is: " + this.getHwnd());
    this.WindowAlwaysOnTop(windowHWND, true);
    void this_windowClosing(WindowEvent e) {
    System.exit(0);
    Once the code is written, compile it with Jbuilder or the command line javac.exe tool which will result in a generated .class file. You will use
    this .class file in the next step.
    2. Run javah.exe on your .class file to generate a C header file
    The following line represents the basic syntax for running javah.exe:
    javah Frame1
    where Frame1 is the name of the argument class.
    When you run javah.exe, it will generate a header file by the same name as your implementation but with a .h file extension. For this
    example the .h file that was generated from the above Java code will be emitted being that it is quite large.
    NOTE: Make sure that when you run javah.exe, it is the javah.exe that came with the same JDK that you will be compiling with as there may
    be some issues with using a version of javah.exe that is different from that of the JDK you are using to compile.
    3. write the implementation of your native methods
    Now that you have your Java source and your C header file, it is time to write the implementation of your native methods.
    Following is the C code that corresponds to the native methods declared in the Java code listed in step 1:
    #include "jni.h"
    #include "Frame1.h"
    #include <stdio.h>
    #include<windows.h>
    JNIEXPORT void JNICALL Java_Frame1_WindowAlwaysOnTop(JNIEnv *env, jclass obj, jint hwnd, jboolean flag)
    if (flag)
    SetWindowPos((HWND) hwnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
    else
    SetWindowPos((HWND) hwnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
    return;
    You will notice several things: one is that the function signature has �Java_Frame1_� preceeding the name of the function. If there was a
    package statement in the Java source, it would appear after ��Frame1_� in the function signature.
    Second, you will notice the #include �jni.h�. Normally this would be #include<jni.h>, depending on how you have your libraries set up within
    your C compiler.
    4. create the shared library
    Now you are ready to create the shared library. Using your C compiler, create a .dll file with the code from the C implementation file. Refer
    to the doccumentation of the C compiler for details on creating a .dll file.
    For those interested in using Borland C++ Builder:
    If you have got it installed, you could use Borland C++ Builder 3 or C++ Builder 4 to create your DLL file. If this is the case, you would use
    File | New... | DLL C++ Builder will then generate some code for you, and you will just need to add your implementation code to the code
    which was generated.
    Remember in the Java code in step one there is a line:
    static {
    System.loadLibrary("windowOnTop");
    �windowOnTop� is the name of the .dll file. You can name it whatever you want, just make sure that you specify the appropriate name when
    loading the library.
    5. run the application
    Finally you are ready to run the application. From the command line use java.exe and as the argument specify the name of the class that
    you compiled in step one. Once the system loads your DLL, the window that the VM creates should mimic the �Always On Top�
    functionality.
    We are getting errors like this
    �Compiling JNI.H:
    Error JNI_MD.H 23: , expected
    Error JNI.H 115: Declaration missing
    Error JNI.H 200: ) expected
    Error JNI.H 202: ) expected

    #include "jni.h"
    #include "Frame1.h"
    #include <stdio.h>
    #include<windows.h>
    JNIEXPORT void JNICALL Java_Frame1_WindowAlwaysOnTop(JNIEnv *env, jclass obj, jint hwnd, jboolean flag)
    if (flag)
    SetWindowPos((HWND) hwnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
    else
    SetWindowPos((HWND) hwnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
    return;
    We are getting errors like this
    �Compiling JNI.H:
    Error JNI_MD.H 23: , expected
    Error JNI.H 115: Declaration missing
    Error JNI.H 200: ) expected
    Error JNI.H 202: ) expected

  • How to invoke a window using JNI?

    Hello,
    I need to invoke a C++ DLL from a Java Applet using JNI. The DLL should display an image in a separate window. Further I should be able to set the position of the DLL window, and should be able to minimize, maximize the DLL window from the Applet.
    Well I am fairly new to C++. Any suggestions regarding how I should proceed?
    GLim

    Hi jschell,
    Thanks for the reply.
    But I am sorry that I am not sure whether I understood your point. What I understood is I make an exe that displays the image and run it from Java like SHELL function in VB. In that case can I specify a particular image to be loaded from the applet? The applet and exe needs to be constant touch as the location , size etc of the window displaying the image could be controlled by the applet.
    I have created a DLL which displays the specified the image in a modeless dialog box. I have succeded in invoking the DLL from applet. But the dll window hangs as soon as it loads! I got a suggestion to implement the display of modeless dialog box inside thread. Now I am investigating how to implement thread :) Please send in your advice if you have any?
    Also it could be real help if you could mentions common problems that might occur in such situations.
    Thanks in advance
    gLim

  • Urgent advice needed!

    Hi,
    I'm not even sure this is the right place to be asking this question, as I can't quite figure out what the problem is, but I'm hoping someone else might know the answer.
    I've been given a DVD of some photos from a professional photographer, that I need to do a tiny amount of retouching on before the images go to print. However, when I open them in Photoshop CS3 and do the work, I can't save the results. I've copied them to my hard drive with no problem, but they seem to be locked: "Get Info" says they are 'read only'. I can change the status to 'read and write' in the Get Info window, but this still doesn't allow me to save them after I've worked on them.
    I've spoken to the photographer, and he hasn't set them to be 'read only' (indeed, why would he?), and doesn't know why they should be like this. No previous work I've had from this photographer has had this problem.
    The photos went through Photoshop and Lightroom on a Windows PC before being burned to DVD, if that's any clue....
    So, does anyone know if there is anything I can do to change the permissions on these files so that I can save my work? I have a deadline to hit, so it's quite urgent!
    Many thanks.

    Some more specific details:
    I've been given approx 24 photos in 3 formats each: a set of 72dpi JPG's, a set of 300dpi JPG's, and a set of 600dpi PSD's. Apart from the slight retouching, all will also need to be converted from RGB to CMYK.
    None of the files can be saved, or saved as something else: I've just been through them all trying to save as CMYK, or TIFF, or PSD. When I try, I get an error message that says the file can't be saved because it is locked, and suggest I open the 'Get Info' window to unlock it.
    When I open the 'Get Info' window, the locked checkbox is not checked, but the little padlock bottom right is locked. I can appear to unlock it via the padlock, and change the status, but this still doesn't allow me to save the file.
    In the short term, my best course of action would be to get the photographer to do the retouching and save them as CMYK files in the form I need them, so I can use them without any alteration on my part. The problem is he's on another shoot today. But in any case this isn't a very good long term solution: if I can't alter and save files I'm sent, then my whole job is pointless!
    I'm under pressure to get this solved today, as they are supposed to go to print tomorrow, so if anyone's got any better suggestions I really would like to hear them!
    Many thanks.

  • Deploying a WAR file containing .jsp and servlets (also uses JNI)

    Deploying a WAR file containing .jsp and servlets (also uses JNI) on Windows 2000
    We had problems making it initially work on Sun ONE Web Server 6.0 Service Pack 1 because of lack of good iPlanet Web
    Server documentation on deploying such files.
    This is how we went about it:
    1) Make one of the servlet and JSP (must call another Java Class) web application (.war) examples work with iPlanet Web
    Server.
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\HelloWorld\HelloWorld.war
    and
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    a) Go to your Web Server Administration to deploy the application using GUI Web Application Deploy.
    (We usually use command line, we experienced some issues with the GUI version, but maybe it is fixed in the new Web Server
    service packs)
    From browser, open http://yourserver:8888/
    Click on Select a Server:Manage
    Click on Virtual Server Class
    Click on https-yourserver
    Click on the Web Applications Tab
    Then, click on Deploy Web Application
    Enter the following -
    WAR File On: Local
    WAR File Path: C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Application URI: /jakarta
    Installation Directory: c:\iPlanet\examples\jakarta-examples
    By clicking on OK it deployed the application.
    I can verify that it is deployed by selecting "Edit Web Applications" and I see the following entry:
    Edit     /jakarta     c:/iPlanet/examples/jakarta-examples
    Also, c:/iPlanet/examples/jakarta-examples should have the similar following directory structure ..
    - [images]
    - [jsp]
    - index.html
    - [servlets]
    - [META-INF]
    - [WEB-INF]
    - [classes]
    - [tlds]
    - web.xml
    - index.html
    I restarted the server and accessed it using the following URL from my IE browser:
    http://yourserver/jakarta/index.html
    Then I clicked on the JSP Examples and tried some JSP examples.
    b) Alternatively, you can also deploy the same example from the command-line.
    Make sure C:\iPlanet\Servers\bin\https\httpadmin\bin\ is in your path
    wdeploy deploy      -u /jakarta
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\jakarta-examples
              C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Restart the web server (I don't think you have to restart, but .. might as well).
    2)Deploy your web-application
    My Foo.war has the following structure.
    You can use jar tf Foo.war to look at the file contents from command line (assuming you have JDK installed and the bin is
    in your PATH)
    Foo.war
    - [META-INF]
    - [WEB-INF]
    - web.xml
    - [classes]
    - Bar.class
    - MoServlet.class
    - [lib]
    - ThirdParty.jar
    - [natlib]
    - extlib.dll
    - foo.jsp
    Here is our application scenario:
    foo.jsp uses a class call Bar (it is not in any package). The Bar java class uses classes from ThirdParty.jar. The
    ThirdParty.jar in turn uses JNI to load library extlib.dll. foo.jsp also calls /servlet/Mo as well.
    Now to deploy it, do the following:
    (a) Make sure that within foo.jsp, you import the Bar class ( I don't know why you have to do it, but if you don't you get
    JSP compile error).
    <%@page language="java" import="Bar" contentType="text/html"%>
    (b) Check web.xml (for Servlets)
    Within web.xml, make sure you have the following mappings:
    <servlet>
    <servlet-name> MoLink </servlet-name>
    <servlet-class> MoServlet </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name> MoLink </servlet-name>
    <url-pattern> /servlet/Mo </url-pattern>
    </servlet-mapping>
    (c) Deploy the application
    Using command line:
    wdeploy deploy      -u /foo
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\foo-dir
              Foo.war
    (d) Change web-apps.xml file (for picking up ThirdParty.jar)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    You should see something similar to following after successful deployment.
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true"/>
    Change it to look like following to pick up the ThirdParty.jar
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true">
    <class-loader reload-interval="300"
              classpath="C:/iPlanet/examples/foo-dir/WEB-INF/lib/ThirdParty.jar"
              delegate="false"/>
    </web-app>
    (e) Change jvm12.conf file (for JNI)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    Add or uncomment the following lines:
    #optional - just helps with instrumenting the jsp and servlet code
    jvm.include.CLASSPATH=1
    jvm.enableDebug=1
    nes.jsp.enabledebug=1
    jvm.trace=7
    jvm.verboseMode=1
    #required for JNI
    java.compiler=NONE
    jvm.classpath=.;C:\JDK1.3.1\lib\tools.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar;
    jvm.option=-Xrs
    jvm.option=-Xnoagent
    # not sure if this is needed for iPlanet web server
    jvm.option=-Djava.library.path=C:/iPlanet/examples/foo-dir/natlib/ -Djava.compiler=NONE
    (f) Change magnus.conf file (for JNI)
    We HAD to change this file in order for ThirdParty.jar file to pick up the native C++ code using JNI. Apparently, the
    iPlanet Web Server doesn't pick the Environment Variable Path. Because when we had the directory containing the DLL just
    in Path, it didn't work.
    Change Extrapath directive:
    ExtraPath C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    to
    ExtraPath c:/iPlanet/examples/foo-dir/natlib;C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    (g) Apply changes from the Web Server Administration Console and Restart the web server.
    You should be able to see the behaviour that you want from your application.
    http://yourserver/foo/foo.jsp
    Hope this was helpful!!!
    Sonu

    Deploying a WAR file containing .jsp and servlets (also uses JNI) on Windows 2000
    We had problems making it initially work on Sun ONE Web Server 6.0 Service Pack 1 because of lack of good iPlanet Web
    Server documentation on deploying such files.
    This is how we went about it:
    1) Make one of the servlet and JSP (must call another Java Class) web application (.war) examples work with iPlanet Web
    Server.
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\HelloWorld\HelloWorld.war
    and
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    a) Go to your Web Server Administration to deploy the application using GUI Web Application Deploy.
    (We usually use command line, we experienced some issues with the GUI version, but maybe it is fixed in the new Web Server
    service packs)
    From browser, open http://yourserver:8888/
    Click on Select a Server:Manage
    Click on Virtual Server Class
    Click on https-yourserver
    Click on the Web Applications Tab
    Then, click on Deploy Web Application
    Enter the following -
    WAR File On: Local
    WAR File Path: C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Application URI: /jakarta
    Installation Directory: c:\iPlanet\examples\jakarta-examples
    By clicking on OK it deployed the application.
    I can verify that it is deployed by selecting "Edit Web Applications" and I see the following entry:
    Edit     /jakarta     c:/iPlanet/examples/jakarta-examples
    Also, c:/iPlanet/examples/jakarta-examples should have the similar following directory structure ..
    - [images]
    - [jsp]
    - index.html
    - [servlets]
    - [META-INF]
    - [WEB-INF]
    - [classes]
    - [tlds]
    - web.xml
    - index.html
    I restarted the server and accessed it using the following URL from my IE browser:
    http://yourserver/jakarta/index.html
    Then I clicked on the JSP Examples and tried some JSP examples.
    b) Alternatively, you can also deploy the same example from the command-line.
    Make sure C:\iPlanet\Servers\bin\https\httpadmin\bin\ is in your path
    wdeploy deploy      -u /jakarta
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\jakarta-examples
              C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Restart the web server (I don't think you have to restart, but .. might as well).
    2)Deploy your web-application
    My Foo.war has the following structure.
    You can use jar tf Foo.war to look at the file contents from command line (assuming you have JDK installed and the bin is
    in your PATH)
    Foo.war
    - [META-INF]
    - [WEB-INF]
    - web.xml
    - [classes]
    - Bar.class
    - MoServlet.class
    - [lib]
    - ThirdParty.jar
    - [natlib]
    - extlib.dll
    - foo.jsp
    Here is our application scenario:
    foo.jsp uses a class call Bar (it is not in any package). The Bar java class uses classes from ThirdParty.jar. The
    ThirdParty.jar in turn uses JNI to load library extlib.dll. foo.jsp also calls /servlet/Mo as well.
    Now to deploy it, do the following:
    (a) Make sure that within foo.jsp, you import the Bar class ( I don't know why you have to do it, but if you don't you get
    JSP compile error).
    <%@page language="java" import="Bar" contentType="text/html"%>
    (b) Check web.xml (for Servlets)
    Within web.xml, make sure you have the following mappings:
    <servlet>
    <servlet-name> MoLink </servlet-name>
    <servlet-class> MoServlet </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name> MoLink </servlet-name>
    <url-pattern> /servlet/Mo </url-pattern>
    </servlet-mapping>
    (c) Deploy the application
    Using command line:
    wdeploy deploy      -u /foo
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\foo-dir
              Foo.war
    (d) Change web-apps.xml file (for picking up ThirdParty.jar)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    You should see something similar to following after successful deployment.
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true"/>
    Change it to look like following to pick up the ThirdParty.jar
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true">
    <class-loader reload-interval="300"
              classpath="C:/iPlanet/examples/foo-dir/WEB-INF/lib/ThirdParty.jar"
              delegate="false"/>
    </web-app>
    (e) Change jvm12.conf file (for JNI)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    Add or uncomment the following lines:
    #optional - just helps with instrumenting the jsp and servlet code
    jvm.include.CLASSPATH=1
    jvm.enableDebug=1
    nes.jsp.enabledebug=1
    jvm.trace=7
    jvm.verboseMode=1
    #required for JNI
    java.compiler=NONE
    jvm.classpath=.;C:\JDK1.3.1\lib\tools.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar;
    jvm.option=-Xrs
    jvm.option=-Xnoagent
    # not sure if this is needed for iPlanet web server
    jvm.option=-Djava.library.path=C:/iPlanet/examples/foo-dir/natlib/ -Djava.compiler=NONE
    (f) Change magnus.conf file (for JNI)
    We HAD to change this file in order for ThirdParty.jar file to pick up the native C++ code using JNI. Apparently, the
    iPlanet Web Server doesn't pick the Environment Variable Path. Because when we had the directory containing the DLL just
    in Path, it didn't work.
    Change Extrapath directive:
    ExtraPath C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    to
    ExtraPath c:/iPlanet/examples/foo-dir/natlib;C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    (g) Apply changes from the Web Server Administration Console and Restart the web server.
    You should be able to see the behaviour that you want from your application.
    http://yourserver/foo/foo.jsp
    Hope this was helpful!!!
    Sonu

  • Need help writing host program using LabView.

    Need help writing host program using LabView.
    Hello,
    I'm designing a HID device, and I want to write a host program using National Instrument's LabView. NI doesn't have any software support for USB, so I'm trying to write a few C dll files and link them to Call Library Functions. NI has some documentation on how to do this, but it's not exactly easy reading.
    I've written a few C console programs (running Win 2K) using the PC host software example for a HID device from John Hyde's book "USB by design", and they run ok. From Hyde's example program, I've written a few functions that use a few API functions each. This makes the main program more streamlined. The functions are; GetHIDPath, OpenHID, GetHIDInfo, Writ
    eHID, ReadHIC, and CloseHID. As I mentioned, my main program runs well with these functions.
    My strategy is to make dll files from these functions and load them into LabView Call Library Functions. However, I'm having a number of subtle problems in trying to do this. The big problem I'm having now are build errors when I try to build to a dll.
    I'm writing this post for a few reasons. First, I'm wondering if there are any LabView programmers who have already written USB HID host programs, and if they could give me some advice. Or, I would be grateful if a LabView or Visual C programmer could help me work out the programming problems that I'm having with my current program. If I get this LabView program working I would be happy to share it. I'm also wondering if there might already be any USB IHD LabView that I could download.
    Any help would be appreciated.
    Regards, George
    George Dorian
    Sutter Instruments
    51 Digital DR.
    Novato, CA 94949
    USA
    [email protected]
    m
    (415) 883-0128
    FAX (415) 883-0572

    George may not answer you.  He hasn't been online here for almost eight years.
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

Maybe you are looking for