Path problem in linux

hi,
i have problem with file path accessing in linux. my java class is accessing a abc.cvs file and and getting all data. it is working fine in windows xp. but i run this same file in linux it does not access the abc.cvs file and does not get any data.
my project structure
Search
abc.cvs
search.SearchMain
i am sccessing this cvs file in this SearchMain class by this way file name = "abc.cvs"
It is working fine with window but problem with linux.
when i place this abc.cvs in a folder as "./data/abc.cvs" also working fine with windows but not in linux.
I am new for linux.
Please give me solution.
Thanks in advance
Ravi

There shouldn't be any differences between Linux and Windows here, it's all about your environment. In order to access abc.cvs class (I presume that abc is package name) from search.SearchMain class you need to have a directory (or .jar file) containing abc/cvs.class in your CLASSPATH environment variable.
Try setting it with
export CLASSPATH=your_dir_or_jar_file:$CLASSPATH
and then running the app again.

Similar Messages

  • File problem in linux OS.

    hi,
    I am creating one jar file . In my program, when I click one survey menu in my GUI,it will collect information from remote device and store it in log file located LOG folder. In my case, I put one folder " Cal" and inside it I put myjar.jar file and that log (LOG) folder.
    In Windows, when I click survey menu in GUI, the log information automatically stored in log foder as survey.txt file. And also, i create one show dialog box to show where the log file located.
    my code is,
    String  ss=new String(" HIllo"+"loginfo" );           
                     byte b[]=ss.getBytes ();
                           OutputStream f0=new FileOutputStream               ("LOG/survey.log",true);
                           f0.write(b);
                           f0.flush();                      
                           f0.close ();    the above code is file writing in txt file.
    for display dialog box,
    if(source==Survey)
                    File file = new File("LOG/Survey.log");                      
                    file = file.getAbsoluteFile(); 
                    javax.swing.JOptionPane.showMessageDialog(MainFrame, "The LOG FILE is stored at -- \t \t"+file);
                 }In windows, where can i install that Cal folder (inside it JAR file and LOG folder), and click that jar , all are working fine. The log file stored correctly inLOG folder and dialog box show the located path.
    eg. log file stored at D:/sbk/Cal/LOG/survey.log
    But my problem in linux.
    when i click survey menu, it will defaultly stored in root folder and log folder. Actually i am not creating LOG folder in root folder.
    I am changing file writer as , to store that JAR folder and want to store that log file in home directory.
    if(no_of_ssid!=null){
                    String  ss=new String(""HIllo"+"loginfo\n" );          May
                     byte b[]=ss.getBytes ();
                           OutputStream f0=new FileOutputStream ("/home/Cal/LOG/Survey.log",true);
                           f0.write(b);
                           f0.flush();                      
                           f0.close ();    but, now also that file stored in rot directory.
    what can I do.
    how can I store log file in home/Cal/Log folder in Linux.
    any one help this problem

    Use System get prop user.home?

  • Jdk path problem...

    may i know how do i can set the PATH inside the linux FC2???
    i hav try to set the PATH like tis :-
    PATH=/home/seng/Desktop/java/jdk1.6.0/bin
    inside the bashsrc file
    but it not work, n make some problem to my PC now..

    when you set PATH=/home/seng/Desktop/java/jdk1.6.0/bin the previous entries in your PATH variable is lost. You shoud set it as PATH=%PATH%;=/home/seng/Desktop/java/jdk1.6.0/bin
    I think it will work if the path of the jdk bin is right.
    :)

  • Path problem for "Load VRML File.vi" in EXE

    Hello,
    The new integrated 3d Picture Control functionality in LabVIEW 8.20 is amazing.  It is a really easy to use implementation of OpenGL.  I've discovered one bug/issue when building VI's to an exe that includes the 3d Picture Control:
    If "Load VRML File.vi" is used, in the executable, you will encounter a LabVIEW Error 7 due to a path problem in the following vi:
    NI_3D Picture Control.lvlib:Load VRML File.vi->NI_3D Picture Control.lvlib:NI_Old 3D Toolkit.lvlib:Read WRL file.vi->NI_3D Picture Control.lvlib:NI_Old 3D Toolkit.lvlib:Initialize.vi
    The File Not Found problem will prevent the vrml file from loading.  Navigating down into the subVI's of the "Load VRML File.vi" shown above easily reveals the problem.  I've included a screenshot of the diagram of that VI.  The relative
    path resulting from the double "Strip Path" operation is not valid
    in the executable.  I'm not sure where that "definitions" file resides
    in the runtime deployment or if it's even included, so fixing the path to account for the differences in the exe vs. development environment path is not an option.   I'm also usually very hesitant to make any mods to anything in vi.lib.
    For the development environment, the "definitions" file can be found at: [LabVIEW 8.2 dir]\vi.lib\picture\3D Picture Control
    The easy fix is to include the "definitions" file in the same directory as your exe when you build.  Fortuitously, this does the trick because the first strip path gives the path to the exe and then the second strip path results in the path to the directory where the exe resides.
    Hopefully NI will fix this path reference properly in future revisions.
    Enjoy!
    Attachments:
    WRL Debug.jpg ‏77 KB

    Hi Chris,
    Thanks a lot for the feedback!  This was reported to R&D (# 47F9DJIQ) for further investigation.
    Regards,
    Justin D

  • Path problem while refering the file in tomcat

    In the jsp file i am going to update one property file which resides in the same folder using file output stream.
    it gives path problem.how can refer the path of that file

    try using getServletContext().getRealPath(java.lang.String path)..You can check out the API for more detail regarding this method.

  • Path problem when moving from Mac to PC

    Adobenoob wrote:
    Hi,
    I'm trying to move our Adobe InDesign installation from Mac to PC, but I ran into a path problem. A lot of our publications/documents in Adobe InDesign have linked to pictures in the filesystem (Windows 2008 R2 server). It goes like this:
    DTP:Produktbilleder:0893ny:0893_467+468_05_Agrp frit_.tif
    And is linked like this directly from InDesign.
    The actual path is:
    /Volumes/DTP/Produktbilleder/0893ny/0893_467+468_05_Agrp frit_.tif
    On the PC I cannot use that path notation and have to go like this:
    F:\DTP\Produktbilleder\0893ny\0893_467+468_05_Agrp frit_.tif
    When the publication/document in InDesign have the Mac link "hardcoded" the PC path will not work.
    Is there a relatively easy way to get the InDesign on PC to use the Mac link or does one have to change all the "hardcoded" links in the publications/documents?
    I hope you understand my question - don't hesitate to ask for more info.
    Best Regards
    Brian

    Hi,
    I have just tested the function - and it seems that the files have to be in the same folder. It is not recursive as I see it. And since we have tens of thousand of pictures in thousands of different folders it does not seem to work.
    Any other suggestions?
    Regards

  • Path problem in windows os

    Dear friends,
    some time I meet a strange class path problem under windows enviroment. that is, the class path uses "/" to splite directory while not "\". so java will report error message like "NoClassFoundError: com/boland/...". I think there should be a way to adjust this environment problem. but I don't know how to set this. I will greatly appreciate if you happen to know this and let me know.
    Best wishes,
    Sam

    You reported an error in a package statement or reference. This is nothing to do with the OS folder structure per se, altho that is how it is implemented on a given platform like windows. Classpath statements are NOT platform independent, due to path separator issues. You should not use a system-wide classpath variable anyway, as this is really quite bad practice. Instead, create a run script for you program, and put the -cp switch in there. In any case, you should be referencing packages (separated by dots) in there anyway, not actual paths.

  • Path problem during  Change of Original

    Hello,
    I am facing path problem while changing the Original file in a DIR.
    let say i created a DIR x and attached file a.txt from c:\ and  saved the DIR.
    Now if i use cv02 and select a original for change the popup window comes with data carrier and original file path  the path is shown as c:\a.txt which is actual original path.
    if i click on continue it is opening the c:\a.txt files and  changes are done on the original file on my pc.
    This way my original file is changed on pc and in DIR also.
    I want to know how to avoid this?.
    Regards
    Shiv

    That is why they call it document "Management".  The Original File is in the "Vault" where it can be managed, not on the desktop.  If you want to protect/save the file on your desktop, set the flag in the config of the workstation application to not allow "rename" of the temporary file.  You are just attempting to circumvent the intended design of the system. What you should really do is set the flag to "delete" the file after check-in.

  • File path problem

    I have looked an read through almost all the file path problem post possible and I am still having issues maybe one of you guys can help me, here are my files
    I am doing this as an example so that I can apply it to all of my file problems....
    Harold Timmis
    [email protected]
    Orlando,Fl
    *Kudos always welcome
    Attachments:
    pathexample.zip ‏122 KB

    First of all, to troubleshoot the problem it would help to put some filepath indicators at each point so that you can see what is going on. Also, in your exe having an error dialog "Simple Error Handler.vi" to let you know what LabVIEW didn't like in the exe.
    Now, when you run a top level ("Main.vi") and use the "Current VI's Path " in the development mode it returns <Filepath>\"Current path"\Main.vi. So stripping once will get you to  <Filepath>\"Current path" .    Now if you make it into an exe the "Current VI's Path" returns <Filepath>\"Current path"\"Name.exe"\Main.vi so you are "nested" one deeper.
    I use the following construct to determine whether the vi is being used as in the development environment or as an exe, the parse the path accordingly, although in this instance it is used to supply different directory names to a little more complex file system.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Unicode filename problems in linux

    I'm running into a problem in linux (Ubuntu). The following test code will throw an exception at the "FileInputStream fis... " line with the file has a unicode filename. However, Windows passes this without problems.
    try {
         File dir = new File("a directory that exists");
         File[] files = dir.listFiles(); //get file list
         for (int i = 0; i < files.length; ++i) {
              System.out.println("file " + files.getAbsolutePath());
              FileInputStream fis = new FileInputStream(files[i]);
    } catch (Exception e) {
         System.out.println("Exception: " + e.getMessage());
    Does anyone know how to fix this? Thanks!

    But the characters are actually chinese. And since
    it's on Ubuntu, it would be in UTF-8 encoding
    wouldn't it?
    The characters display fine in ubuntu but when I try
    to read them in using FileInputStream, it fails for
    some filenames with strange characters.
    I just don't understand why some characters make it
    fail and others are fine. It seems that it should
    all work or all not work? Perhaps I'm wrong.On my Fedora Core 6,
    the result of
    echo $LANG
    is:
    ja_JP.UTF-8
    And I tried your program on a directory that has &#30334;&#24230;MP3��&#20840;.txt file in it.
    import java.io.*;
    public class AlsKdj{
      public static void main(String[] args){
        try {
          File dir = new File(".");
          File[] files = dir.listFiles();
          for (int i = 0; i < files.length; ++i) {
            System.out.println("file " + files.getAbsolutePath());
    FileInputStream fis = new FileInputStream(files[i]);
    System.out.println(" " + fis.toString());
    catch (Exception e) {
    e.printStackTrace();
    The output from the program is:
    file /root/test/./AlsKdj.class
      java.io.FileInputStream@1a46e30
    file /root/test/./&#30334;&#24230;MP3��&#20840;.txt
      java.io.FileInputStream@3e25a5
    file /root/test/./bbs.txt
      java.io.FileInputStream@19821f
    file /root/test/./WMP.txt
      java.io.FileInputStream@addbf1As shown above, the result is normal if LANG is really UTF-8.
    My Java version is:
    java version "1.6.0_01"
    Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
    Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)

  • HEAVY Problems with Linux x86_64 on K8T Neo

    Hello, Community!
    I experience *HEAVY* Problems with Linux on my MSI K8T Neo (FSR). Since the customer support of the german dependancy seems to ignore my call for help I'm in good hope that maybe you can help me out or give me some useful advise.
    First some Hardware Specs of my system:
    MSI K8T Neo FSR, Rev 1.1, BIOS 1.5
    AMD Athlon 64 3000+
    3x 512MB Kingston DDR400
    Enermax EG365P-VE (350W) PSU (3.3V/5V 185W Combinded)
    MSI GeForce FX5200 TDR 128
    Adaptec ATA RAID AAR1200A (HPT370A) in PCI Slot 3
    Hauppauge WinTV PCI in PCI Slot 5
    Maxtor 4K040H2 (40GB) as Primary Master
    JLMS XJ-HD166S DVD-ROM as Primary Slave
    LiteOn LDW-411S DVD+/-RW as Secondary Master
    LiteOn LTR-52327S CD-RW as Secondary Slave
    2x Maxtor 6Y060L0 (60GB) on HPT370A as Primary Master/Slave
    Seagate ST380020A (80GB) on HPT370A as Secondary Master
    Maxtor 32049U3 on HPT370A as Secondary Slave
    KeyTronic KT2001 USB Keyboard
    Microsoft Optical Wheel Mouse Blue USB
    I've downloaded Fedora Core 1 x86_64 as well as the lately released Fedora Core 2 test 3 x86_64 distribution. Both CD sets have been burnt ok.
    If I try to install Core 1 x86_64 (Kernel 2.4.22-1.2179) the kernel crashes with a "attempted to kill idle task" panic. As far as I've learned the workaround is to give idle=poll as kernel parameter. This resolves the kernel panic, but the installer randomly crashes with segfaults at a random stage; sometimes while loading anaconda, sometimes during package install.
    If I try to install Core2 test 3 x86_64 (Kernel 2.6.5) I get a, completely new, error message while the kernel does the PCI Scan:
    ******* Your BIOS seems to not contain a fix for K8 errata #93
    ******* Working around it, but it may cause SEGVs or burn power
    ******* Please consider a BIOS update
    ******* Disabling USB legacy in the BIOS may also help
    I removed my USB keyboard, connected a PS/2 keyboard, disabled to USB Legacy option (I need it enabled in order to use Ghost) in the BIOS and booted again.
    The error message is gone now, but as in Core 1 the installer still crashes randomly with segfaults. I'm still unable to go all the way through the installation routine.
    I even tried to install Fedora Core 1 "i386": again there are segfaults during install.
    Contrary to the problems I experience while trying to install Linux my Windows XP (32-Bit), as well as a test installation of Windows XP 64-Bit, run like a charm without any problems. Strange but true.
    Since I already read trough several posts in this forum I already tried running my system with memory sticks from another manufacturers as well as with a more powerful PSU. I even removed my tv-card and raid-controller.
    Nogo - Linux still crashes randomly and Windows still works without any flaws.
    Has anyone a clue what I can/must do to successfully install Linux?
    Might it be that the BIOS has some flaws that might cause the problems?
    Has anyone managed to install Linux (what distribution) on this Mainboard?
    I would greatly appreciate any help. If you need to know something I haven't provided here please feel free to ask. I'll answer ASAP.
    Thank you in advance.
    P.S.: The system is *NOT* overclocked in any way.

    And now even the last problem is solved ...
    Since I was successful in installing a basic Gentoo system but still failed to install Fedora I reflashed BIOS 1.5. This time I cleared the CMOS by unplugging the PSU, setting the jumper and removing the backup battery.
    Yesterday I only flashed it with the /a switch, which should have cleared the CMOS as well - so far for the theory. However, it once went fine as I upgraded from BIOS 1.1 to 1.4.
    After setting up the BIOS options again I gave it another try and booted from Fedora (Core 2 test 3) install CD: No more complains about the CPU errata, although USB legacy is enabled, and I even went through the installation without any problems.
    It seems as I will stick with Gentoo as my primary distribution since the kernel makes a more "mature" impression than the one from Fedora (i.e. the K8 PowerNOW! Driver seems to be missing in Fedora's Kernel 2.6.5).
    By using an spare Athlon XP Mainboard I worked out that only one of my three Kingston memory sticks had errors - I'm going to replace the faulty stick tomorrow.
    Now for the conclusio:
    Thanks, especially you JLP, for helping me with my issue. Without the advise to use Gentoo, and the included MemTest86, I wouldn't have been able to track down the error to a faulty memory stick that fast since Windows always ran fine.

  • Help File Path Problem

    Hi,
    I recently upgraded to a new computer and I have Develope toolbox and some other extensions from Web Assist and curiously when I click on HELP button in any of them I receive in error message like the one below.....virtually all of the error messages are the same. I known that it is a path problem, but when I follow the path indicated in the error message I find the file exactly where it should be on the computer.....hmmmm...any ideas out there?
    Firefox can't find the file at /MacHD/Users/jimelander/Library/Application Support/Adobe/Dreamweaver 9/Configuration/Shared/DeveloperToolbox/classes/temp.htm

    I think un install ADDT then reinstall it..
    Hope this helps
    Mohnkhan
    http://www.mohitech.com

  • Shortest path problem in ABAP

    Hi experts,
    Is it possible to write the code for the "Shortest path problem" in ABAP?If yes, what is the code?
    Moderator Message: Don't expect members to spoon-feed you
    Edited by: Suhas Saha on Jul 25, 2011 11:13 AM

    Hi munish,
    I dont think there is any thing wrong with the ABAP code.
    Try testing your ABAP mapping using transaction code SXI_MAPPING_TEST in XI.
    Enter the Details asked and then enter TEst data in XML format.. 
    Also, you can make use of the Trace element to find out if there is any thing wrong with the code.
    Include the following Statements after every step in the ABAP code to ensure that the particular step is completed successfully.
    data : l_trace type string.
    concatenate l_trace '<Message you want to display>' into l_trace.
    trace->trace(level = '<level>'
    message =l_trace).  
    The trace is visible in SXMB_MONI (click on "Trace" in the left pane to view).
    using this you will get to know i the code is functioning as desired.
    Regards,
    Yashaswee.

  • Custom mySQL  - updating path / problem with pre-installed mySQL

    I've got a custom mySQL installation setup and humming along on a 10.6.4 server. The problem is although I've updated the paths to search on usr/local/mysql/bin, when I try to access by using the shortcut mysql i get this error: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' . To be clear, mySQL is working fine - it's just the shortcut that's not.
    This makes me think that the shell is looking first at the default [not enabled] apple mysql install. So something in my paths must be wiggy.
    I had this working perfectly on my 10.4 Xserve but the no one, I'm at a loss.
    Has anyone else run into this - any tips? I'm not going to be running the Apple install of mySQL.

    Actually, my problem is not with the socket location but with the data directory location. But I think is caused by the same path problem to data as yours was with socket. I have posted this question to the Mac OS X Technologies > Unix forum. If you could take a look, I would appreciate it.
    Thanks.

  • Help Files Path Problem

    Hi,
    I recently upgraded to a new computer and I have Develope
    toolbox and some other extensions from Web Assist and curiously
    when I click on HELP button in any of them I receive in error
    message like the one below.....virtually all of the error messages
    are the same. I known that it is a path problem, but when I follow
    the path indicated in the error message I find the file exactly
    where it should be on the computer.....hmmmm...any ideas out there?
    Firefox can't find the file at
    /MacHD/Users/jimelander/Library/Application
    Support/Adobe/Dreamweaver
    9/Configuration/Shared/DeveloperToolbox/classes/temp.htm

    OleLena wrote:
    > Firefox can't find the file at
    /MacHD/Users/jimelander/Library/Application
    > Support/Adobe/Dreamweaver
    > 9/Configuration/Shared/DeveloperToolbox/classes/temp.htm
    I'd check to ensure that you have the latest versions of the
    WebAssist extensions as this may have been fixed. I seem to recall
    seeing this issue when the primary browser (from Dreamweaver's
    perspective, the one that F12 or preview in browser opens up) is
    not open when the help is accessed. Try having your browser open
    and then access the help.
    Danilo Celic
    |
    http://blog.extensioneering.com/
    | WebAssist Extensioneer
    | Adobe Community Expert

Maybe you are looking for

  • ESS Working Time - Start Time  and End Time in Weekly View

    Hello, I'm having a problem with the business package ESS - functionality Working Time (cat2). I need that information to Start Time and End Time appear in the Weekly View of the portal. In Daily View that information are already visible, but In Week

  • Problem with the Mail

    When I like to send a message with My Mailprogram , is there a problem with sending Attachment . Missing Plug ins

  • IWeb page size?

    Why doesnt iweb allow me to change the size of my page. i have gone onto the inspector, clicked on 'layout' and typed in the figures in the 'content height' bar and pressed return but no changes. what has happened?

  • Importing multiple proj (just name, start & end)

    Anyone know how to import a list of projects (just project name and maybe start and end date..no detail or activities necessary) into P6? I have my current list of project names in Excel. Thanks Peter

  • SLD page cant open in web browser

    Drear Friends    I have installed ECC6 IDES server,  when I wish to open my SLD page it gives me page cannot be displayed message in web browser.  where my ECC Exchange infrastructure related page is displayed in web browser and other links such as I