Package problems in Linux

I'm working on a large program and when all files are located in the same directory, everything works well. To organize things, I want to use packages and package statement, declared the files public and stored them in what should be the appropriate directories. I have the following.
package visortool.interaction;
import ...;
public class DisplayWindow extends JFrame
and a second class
package visortool.fraf;
import visortool.interaction
public class FrafViewer
My classpath is
/home/simon/school/java/visortool/
Any Linux/Java expert that could helpe me?
regards
simon

From there, I ran "java visortool/VisorTool" and it
worked, but why can I not execute the program from the
directory containing the VisorTool.class file?Because you're including "." (current directory) in your classpath, which in this case is not valid, since that directory does not contain classes in the "root" package (no package statement). Including the "current" directory (or any directory for that matter) is only valid when that directory has classes in it which correctly follow the package hierarchy.

Similar Messages

  • 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.

  • 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.

  • Debtap - A script to convert .deb packages to Arch Linux packages

    I wrote this script in my free time to help people who, for any reason, want to convert a .deb to an Arch Linux package. It works in a similar way with alien (which converts .deb packages to .rpm packages and vice versa), but, unlike alien, it is focused on accuracy of conversion, trying to translate Debian/Ubuntu packages names to the correct Arch Linux packages names and store them in the dependencies fields of the .PKGINFO metadata in the final package. In other words, it won't only create an Arch package with the data of the original .deb package, but also it will try to create a valid and as accurate as possible .PKGINFO metadata file in the converted package. It uses pkgfile and pacman utilities to achieve this accuracy. The final package can be installed like any local Arch Linux package. Debtap is now available on AUR!
    FAQ
    Q: What "debtap" stands for?
    A: DEB To Arch (Linux) Package
    Q: Isn't better to download an official package or write a PKGBUILD in case I need to compile a package or convert a .deb package to an Arch Linux package?
    A: Sure it is, and I truely encourage you to do so. Debtap was written to create packages that either cannot be compiled (closed source packages) or cannot be built from AUR for various reasons (error during compiling or unavailable files), as a quick 'n' dirty solution and an extra option for creating Arch Linux packages for Arch Linux users.
    Q: So debtap will help me only in case I need to convert specific .deb packages to Arch Linux packages?
    A: No. In case you need to write a new PKGBUILD for a package that already exists in the Debian/Ubuntu distributions, by converting its .deb package to Arch package with debtap, thanks to the packages names translator function inside the script, it can help you determine which dependencies are needed for the package you write the PKGBUILD for and complete the necessary fields.
    Q: What are the minimum requirements to run this script?
    A: You need to have installed these dependencies: bash, binutils (provides ar utility for extracting .deb package), pkgfile, and fakeroot. You must run at least once (preferably recently) "debtap -u" to create/update pkgfile and debtap database (you do this with root privileges).
    Q: Debtap needs a lot of time to convert a package. So, why this is happening?
    A: Like I said, debtap is focused on accuracy. It won't just unpack a .deb package and then repackage its data to an Arch Linux package, ignoring metadata. Depending on the speed of your processor and the package itself, conversion can take from a few seconds to several minutes.
    Q: During conversion I get several warning messages, why?
    A: Debtap cannot be 100% accurate for several reasons,  the main reason for this is the complexity of packages names. If you want to check the freshly generated .PKGINFO and .INSTALL (this is optional file) metadata files or even fix the untranslated packages names inside .PKGINFO, debtap offers you the option to edit these files before compressing the final package.
    Q: How do I use debtap?
    A: The syntax is quite simple actually: debtap [option] package_filename
    For example: debtap world-of-goo-demo_1.0_i386.deb
    Any recommendations or questions for debtap are welcomed!
    Last edited by helix (2015-05-21 22:54:17)

    Hi helix. I've had trouble trying to use your script with ubuntu software from The Open University
    debtap OpenUniversity-ubuntu-0.1.3.20130104.deb
    ==> Extracting package data...
    ==> Fixing possible directories structure differencies...
    ==> Generating .PKGINFO file...
    debtap OpenUniversity-ubuntu-0.1.3.20130104.deb
    ==> Extracting package data...
    ==> Fixing possible directories structure differencies...
    ==> Generating .PKGINFO file...
    :: Enter Packager name:
    NewPepper2013
    :: Enter package license (you can enter multiple licenses comma seperated):
    closed
    :: If you want to edit .PKGINFO file, press (1) For vi (2) For nano (3) For a cu                                                                                                    stom editor or any other key to continue:
    ==> Generating .MTREE file...
    ==> Creating final package...
    xz: unrecognized option '--1-any.pkg.tar'
    xz: Try `xz --help' for more information.
    mv: cannot stat ‘*.xz’: No such file or directory
    ==> Removing leftover files...
    ==> Package successfully created!
    The software is called NewPepper 2013 but i've not been able to find it online except on the ou website.

  • TS3074 im can u please help me out this issue im trying to install iTunes  in windows 7 some error showing " windows installer package problem DLL require to complete this installation" this message showing.

    im can u please help me out this issue im trying to install iTunes  in windows 7 some error showing " windows installer package problem DLL require to complete this installation" this message showing.

    Try the following user tip:
    " ... A DLL required for this installation to complete could not be run ..." error messages when installing iTunes for Windows

  • 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?

  • 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)

  • How to resolve AVCHD package problem in mountain lion

    how to resolve AVCHD package problem in mountain lion

    Thanks, David. I know this workaround. And one more with creating right-click Service. That's why I've used "uncomfortable" instead of "impossible". In my opinion, Apple should leave ability to choose OS's behavior, and I hoped somebody knew where to find it .

  • Apparent SDL package problem

    I installed kdenlive and mlt from community and have a problem with the configuration. A dev on the kdenlive IRC channel said I should ask the mlt devs who in turn said it must be a SDL packaging problem. So I'm here now with this bit:
    #kdenlive
    [19:38] <dust__> need some help getting this program started
    [19:43] <dust__> says it can't find melt or SDL profiles and module
    [19:43] <dust__> but when I run it as root everythings OK
    [19:46] <xzhayon> distro?
    [19:47] <dust__> Arch. I installed both mlt and kdenlive from community repos
    [19:49] <xzhayon> run melt -query consumers 2>&1 | grep sdl
    [19:49] <xzhayon> and show me the results
    [19:49] <dust__> - sdl_image
    [19:51] <dust__> when I run that as su I get this
    [19:51] <dust__> - sdl - sdl_audio - sdl_preview - sdl_still
    [19:53] <xzhayon> as su?
    [19:53] <xzhayon> but that's the output of query consumers
    [19:56] <dust__> just that Im getting different output as su than user
    [19:57] <xzhayon> what's the output of melt -query consumers 2>&1 | grep sdl not run as su?
    [19:57] <dust__> - sdl_image
    [19:58] <xzhayon> that's definitely wrong
    [19:58] <xzhayon> try reinstalling mlt
    [19:58] <dust__> did that at least twice
    [19:59] <dust__> 0.5.10
    [19:59] <dust__> kdenlive 0.7.8
    [20:01] <xzhayon> may i see the pkgbuild for this package?
    [20:03] <dust__> http://repos.archlinux.org/wsvn/community/mlt/repos/community-x86_64/PKGBUILD
    [20:12] <xzhayon> im' sorry but i have no clue on what's happening
    [20:15] <dust__> please tell me what the output above means briefly
    [20:17] <xzhayon> well, that shows the producers and consumers available to melt
    [20:17] <xzhayon> but that's not the expected output
    [20:17] <xzhayon> what you see with "su"
    [20:18] <xzhayon> i what should appear when run as normal user
    [20:18] <xzhayon> while what you see when run as normal user
    [20:18] <xzhayon> is what you should see when querying producers, not consumers
    [20:18] <xzhayon> try asking on [email protected]
    mlt-devel replied as follows:
    Perhaps ask the SDL packager; I doubt the MLT packager will be of much
    help. This appears to be some permission issue with SDL and its access
    to things. Maybe you need to add your account to some groups. Does
    ffplay at the command line work? It too uses SDL. If that does not
    work either, then perhaps 'strace melt -query consumers'. strace is a
    very verbose output, but it might show what it is failing to access.
    any thoughts?

    allan@mugen ~
    > melt -query consumers 2>&1 | grep sdl
    - sdl
    - sdl_audio
    - sdl_preview
    - sdl_still
    Maybe try creating a new user and see if it works for them.

  • OpenSPARC T2 package 1.2, linux: problem with simv linking

    Dear all,
    I'm experiencing a problem with the package OpenSPARC T2 v. 1.2. When running the sims and regressions everything seems to goes fine, but the simv is not created and the regression tests not executed.
    I'm getting error when link is searching for libstdc++. I mean, I'm compiling all the stuff on a 64 bit machine, so I have 64 bit stdc++ library, but within the Makefile in csrc of the simv model there's the flag -m32.
    Have I to install a 64 bit VCS?
    Following is the last part of compile.log:
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.0.2/libstdc++.so \
    when searching for -lstdc++
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.0.2/libstdc++.a \
    when searching for -lstdc++
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.0.2/libstdc++.so \
    when searching for -lstdc++
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.0.2/libstdc++.a \
    when searching for -lstdc++
    /usr/bin/ld: cannot find -lstdc++
    collect2: ld returned 1 exit status
    make: *** [product_timestamp] Error 1Any help will be very appreciated.
    Thanks in advance,
    Ale

    Hello Joseph!
    Is your problem still an issue or is it solved?
    Ashwani S.
    Applications Engineer
    National Instruments Sweden

  • Oracle 10.2.0 DB installation problem on Linux RedHat 4

    When I install Oracle 10g release 2 database on my Linux RedHat 4 platform, I got the following error message (from action log file):
    INFO: /u01/app/oracle/product/10.2.0/db_1/bin/genorasdksh: Failed to link liborasdkbase.so.10.2
    INFO: make: *** [liborasdkbase] Error 1
    INFO: End output from spawned process.
    INFO: ----------------------------------
    INFO: Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target 'all_no_orcl ihsodbc' of makefile '/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oracle/oraInventory/logs/installActions2006-10-05_11-17-26AM.log' for details.
    Exception Severity: 1
    Can someone help me to solve this problem?
    Your kind assistance will be highly appreciated!

    I didn't install the whole OS but just some packages that contain required rpms by Linux Redhad 4. I guess I accidently missed a package. In order to make sure that I have installed all necessary packages, I just re-installed the OS with care. Thanks for your advices.
    The Oracle DB installation was successful, however, after I installed the Oracle HTTP Server and then stop the HTTP Server, I can't start it again. The following is the error message.
    [oracle@linuxkm database]$ /u01/app/oracle/product/10.2.0/http_1/opmn/bin/opmnctl startproc ias-component=HTTP_Server
    opmnctl: starting opmn managed processes...
    ================================================================================
    opmn id=linuxkm:6200
    0 of 1 processes started.
    ias-instance id=standalone
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ias-component/process-type/process-set:
    HTTP_Server/HTTP_Server/HTTP_Server
    Error
    --> Process (pid=23484)
    failed to start a managed process after the maximum retry limit
    Log:
    /u01/app/oracle/product/10.2.0/http_1/opmn/logs/HTTP_Server~1
    Thank you very much for your help!

  • Pro*C 8051 problem AIX -- Linux

    Hello. This is my problem trying to port an application from AIX
    to Linux.
    I installed redhat 6.0 on PII350 128Mb ram. kernel 2.2.5
    I installed Oracle 8051 enterprise edition, the glibcpatch,
    inserted
    the defines:
    define=_STDIO_H
    define=_STRING_H
    define=_STDLIB_H
    into pcscfg file
    I am able to compile the sample files (I tried for sample1 and
    sample2, inserting the size_t definition into .pc files) so pro*C
    is ok.
    Trying to porting from AIX 4.3.2 to linux an application:
    I inserted the demo_proc.mk file for settings into the original.
    I run:
    make -r VER=linux -f bz201l.mk \
    /aixdev/S6/security/lib/liblinux/bz201l.a
    Into the original .pc file there were
    #include <stdarg.h>
    #include <stddef.h>
    and leaving them inside I got
    Error at line 29, column 10 in file
    /aixdev/S6/security/source/bz201l00.pc
    #include <stdarg.h>
    .........1
    PCC-S-02015, unable to open include file
    So I cut them from the .pc file and so:
    Syntax error at line 23, column 48, file ../include/bz201.h:
    Error at line 23, column 48 in file ../include/bz201.h
    void(*)(),void(*)() , FILE *, ...);
    ...............................................1
    PCC-S-02201, Encountered the symbol "FILE" when expecting one of
    the following:
    ... auto, char, const, double, enum, float, int, long,
    OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIDate,
    OCINumber, OCIRaw, OCIString, register, short, signed,
    sql_context, sql_cursor, static, struct, union, unsigned,
    varchar, void, volatile, a typedef name, exec oracle, exec,
    exec sql, exec sql begin, exec sql type, exec sql var,
    The symbol "enum," was substituted for "FILE" to continue.
    What is the problem? I have to add other define in pcscfg.cfg
    file?
    The header file bz201.h is below
    *BZ201.h - definitions/declarations for BZ201_AcceptSqlcode
    routine
    *Purpose:
    * This file defines the values and functions
    * used for BZ201_AcceptSqlcode routine.
    #ifndef BZ201_END_PARM_LIST
    #define BZ201_END_PARM_LIST 0xF0F0F0F0,__LINE__,__FILE__
    #endif
    /* function prototypes */
    void BZ201_AcceptWSqlcode(
    void(*)(),void(*)() , FILE *, ...);
    if I don't eliminate the stddef and stdarg definitions, but
    add to the proc command line include= setting also these two
    directories
    /usr/i386-glibc20-linux/include/linux and
    /usr/lib/gcc-lib/i386-glibc20-linux/egcs-2.90.29/include
    I have not the errors for the stddef and stdarg but I get an
    error inside the time.h header
    Syntax error at line 135, column 15, file /usr/include/time.h:
    Error at line 135, column 15 in file /usr/include/time.h
    extern size_t strftime __P ((char *__restrict __s, size_t
    __maxsize,
    ..............1
    PCC-S-02201, Encountered the symbol "strftime" when expecting one
    of the following:
    and then also the one reported above in the first case for the
    bz201.h header (also with a core dumped after segm fault).
    Anyone knows how to set correctly the include dirs and/or the
    pcscfg.cfg file?
    Thanks in advance and sorry for the lenght of the message.
    Gianluca
    null

    Gianluca Cecchi (guest) wrote:
    : Hello. This is my problem trying to port an application from
    AIX
    : to Linux.
    : I installed redhat 6.0 on PII350 128Mb ram. kernel 2.2.5
    : I installed Oracle 8051 enterprise edition, the glibcpatch,
    : inserted
    : the defines:
    : define=_STDIO_H
    : define=_STRING_H
    : define=_STDLIB_H
    : into pcscfg file
    : I am able to compile the sample files (I tried for sample1 and
    : sample2, inserting the size_t definition into .pc files) so
    pro*C
    : is ok.
    : Trying to porting from AIX 4.3.2 to linux an application:
    : I inserted the demo_proc.mk file for settings into the
    original.
    : I run:
    : make -r VER=linux -f bz201l.mk \
    : /aixdev/S6/security/lib/liblinux/bz201l.a
    : Into the original .pc file there were
    : #include <stdarg.h>
    : #include <stddef.h>
    : and leaving them inside I got
    : Error at line 29, column 10 in file
    : /aixdev/S6/security/source/bz201l00.pc
    : #include <stdarg.h>
    : .........1
    : PCC-S-02015, unable to open include file
    : So I cut them from the .pc file and so:
    : Syntax error at line 23, column 48, file ../include/bz201.h:
    : Error at line 23, column 48 in file ../include/bz201.h
    : void(*)(),void(*)() , FILE *, ...);
    : ...............................................1
    : PCC-S-02201, Encountered the symbol "FILE" when expecting one
    of
    : the following:
    : ... auto, char, const, double, enum, float, int, long,
    : OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIDate,
    : OCINumber, OCIRaw, OCIString, register, short, signed,
    : sql_context, sql_cursor, static, struct, union, unsigned,
    : varchar, void, volatile, a typedef name, exec oracle, exec,
    : exec sql, exec sql begin, exec sql type, exec sql var,
    : The symbol "enum," was substituted for "FILE" to continue.
    : What is the problem? I have to add other define in pcscfg.cfg
    : file?
    : The header file bz201.h is below
    : *BZ201.h - definitions/declarations for BZ201_AcceptSqlcode
    : routine
    : *Purpose:
    : * This file defines the values and functions
    : * used for BZ201_AcceptSqlcode routine.
    : #ifndef BZ201_END_PARM_LIST
    : #define BZ201_END_PARM_LIST 0xF0F0F0F0,__LINE__,__FILE__
    : #endif
    : /* function prototypes */
    : void BZ201_AcceptWSqlcode(
    : void(*)(),void(*)() , FILE *, ...);
    : if I don't eliminate the stddef and stdarg definitions, but
    : add to the proc command line include= setting also these two
    : directories
    : /usr/i386-glibc20-linux/include/linux and
    : /usr/lib/gcc-lib/i386-glibc20-linux/egcs-2.90.29/include
    : I have not the errors for the stddef and stdarg but I get an
    : error inside the time.h header
    : Syntax error at line 135, column 15, file /usr/include/time.h:
    : Error at line 135, column 15 in file /usr/include/time.h
    : extern size_t strftime __P ((char *__restrict __s, size_t
    : __maxsize,
    : ..............1
    : PCC-S-02201, Encountered the symbol "strftime" when expecting
    one
    : of the following:
    : and then also the one reported above in the first case for the
    : bz201.h header (also with a core dumped after segm fault).
    : Anyone knows how to set correctly the include dirs and/or the
    : pcscfg.cfg file?
    : Thanks in advance and sorry for the lenght of the message.
    : Gianluca
    Can I make a suggestion? I don't know too much about the Pro*C
    compiler but I do know of some useful packages on Linux. It may
    be possible to use a standard Linux package called "automake" to
    port the code and set it up for use in a Linux environment. What
    this package basically does is take input files and automatically
    outputs properly made config files to setup the program depending
    on which type of Unix you are porting it to. I would suggest you
    take a look at it's documentation. Here is a good URL:
    http://developer.gnome.org/tools/build.html
    They have a tutorial on how to use the tools and they have some
    other good links ;-)
    Sincerely,
    Kevin M.
    null

  • Sun Java Studio Enterprise 8 UML Round Trip Engineering Problem on Linux

    Hi all,
    I know Linux is an unsupported platform but I thought I'd mention that the "Navigate to Source" context menu when trying to generate source from UML is missing.
    If you try to work through the "UML Modeling: Developing Applications" tutorial (http://developers.sun.com/prodtech/javatools/jsenterprise/learning/tutorials/jse8/uml_fe.html) on a linux box, everything goes to plan until step 3 "Choose Navigate To Source from the contextual menu" of the "Continuing Development Using Round Trip Engineering" section.
    I haven't tested it on Solaris but it definately appears on Windows.
    Cheers!
    Mike.

    I just tried on JDS3 Linux and I was able to complete this tutorial from the beginning to the end without any issue. I tried the Navigate to Source option on all classes from the project tree under the "bankpack" package node and source file for all classes were opened in the source editors. In fact, all UML quickstart tutorials have been tested and working as expected on all platforms including JDS3 Linux.
    Which Linux system are you having this problem on?
    Which JSE 8 build are you using (look at product line from Help->About, click on Detail tab)?
    Are you able to see "Navigate to Source" from the contextual menu for any other class from this tutorial?
    As Trey indicated in his response that the source must exist to have this menu option, do you see the corresponding source file generated in the Java project?
    Thanks,
    --Peter                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Runtime.exec() problem with Linux

    Hi All,
    I have a java program which I am using to launch java programs on all platforms.
    I am using the Runtime.exec() method to start the process in a separate JVM.
    But, I had a problem with the -classpath switch if the directories contained spaces. So I modified the java command which I am passing to the exec() method to something like:
    java -classpath \"./my dir with spaces\" com.harshal.MainThis I had to do because of the problem in windows. But, if I use double quotes in Linux (for the classpath switch in my exec() method), it won't work.
    Can anyone correct me so that I can use the Runtime.exec() method on all platforms to launch the java application even if the classpath directories contains spaces.
    Thank you very much.

    I was reading about the command line args on java's
    tutorial and I found a shocking news. Mac OS doesn't
    support command line args, That's news to me. Could you please elaborate ?
    More important is: I got it working. I figured out I had forgotten to try something before, or, to be more correct, I made an error when trying malcommc's envp suggestion: I used "classpath" as key, not "CLASSPATH", as it should have been.
    Ran a new test, got it working.
    Sample:
    Given a rootdir. Subdirectory "cp test" with a classfile (named "test") without package declaration. Running another class in another directory, using:
    String[] cmd = new String[]{
        "java", "test"
    String[] envp = new String[]{
        "CLASSPATH=rootdir:rootdir/cp test" // <-- without quotes.
    Runtime.getRuntime().exec(cmd, envp);It's been my wrong all the time. I didn't check hard enough. It simply had to work somehow (that's the kind of things that's easy to say afterwards :-)).

  • JFrame setlocation problems on linux

    When you drag a JFrame, you can move it anywhere you want, even if some of its boundary goes outside the screen...
    Fortunately It's true on windows, mac and linux SUN JREs.
    On windows and mac, you get the same effect if you decide to do it programatically with for example :
    package testframe;
    import javax.swing.JFrame;
    public class Main {
        public static void main(String[] args) {
        JFrame jf=new JFrame();
        jf.setVisible(true);
        jf.setSize(400, 400);
        jf.setLocation(-300, 50);
    }But this code doesn't work as expected on linux distros. I tried on kde, gnome and xfce, and I always get the same problem : the JRE (probably because of calls to window manager) refuses to place the window a little bit outside the screen boundaries. So in my example, jf.setLocation(-300,50) have the same effect as jf.setLocation(0,50).
    Of course, when the windows appear at the (0,50) coordinates, it's always possible on linux to move it manually to a negative x-coordinate place.
    setBounds method will lead to the same trouble...
    Of course this piece of code is only here to show exactly what's wrong on linux sun jre's. In my "real code", I need to deal with undecorated Jframes, so I have to manage myself the mousepressed and mousedragged events on my custom titlebar, and I would really want the linux version of my application behave the same as windows and mac versions ...
    The weird thing is that if I try to do that with JWindows in place of JFrames, it work's fine on Linux as well. But the problem is not here : in my case I need JFrames...
    Anyone knows how to fix this on linux ?

    When you drag a JFrame, you can move it anywhere you want, even if some of its boundary goes outside the screen...
    Fortunately It's true on windows, mac and linux SUN JREs.
    On windows and mac, you get the same effect if you decide to do it programatically with for example :
    package testframe;
    import javax.swing.JFrame;
    public class Main {
        public static void main(String[] args) {
        JFrame jf=new JFrame();
        jf.setVisible(true);
        jf.setSize(400, 400);
        jf.setLocation(-300, 50);
    }But this code doesn't work as expected on linux distros. I tried on kde, gnome and xfce, and I always get the same problem : the JRE (probably because of calls to window manager) refuses to place the window a little bit outside the screen boundaries. So in my example, jf.setLocation(-300,50) have the same effect as jf.setLocation(0,50).
    Of course, when the windows appear at the (0,50) coordinates, it's always possible on linux to move it manually to a negative x-coordinate place.
    setBounds method will lead to the same trouble...
    Of course this piece of code is only here to show exactly what's wrong on linux sun jre's. In my "real code", I need to deal with undecorated Jframes, so I have to manage myself the mousepressed and mousedragged events on my custom titlebar, and I would really want the linux version of my application behave the same as windows and mac versions ...
    The weird thing is that if I try to do that with JWindows in place of JFrames, it work's fine on Linux as well. But the problem is not here : in my case I need JFrames...
    Anyone knows how to fix this on linux ?

Maybe you are looking for