Cannot compile my Hello World

Hello I am new to Java,
I am running openSUSE 11.1.
on running the javac compiler this is what I get.:
alon@linux-6xrt:~/java> javac Ch2Sample1.java
/usr/lib/gcc/i586-suse-linux/4.3/../../../crt1.o: In function `_start':
/usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/i386/elf/start.S:115: undefined reference to `main'
collect2: ld returned 1 exit status
alon@linux-6xrt:~/java> This is my java code
import javax.swing.*;
public class Ch2Sample1  {
     public static void main  (String [] args  )   {
     JFrame      myWindow;
     myWindow = new JFrame();
     myWindow.setSize(300, 300);
     myWindow.setTitle("My First Java ");
     myWindow.setVisible(true);
     System.out.print("Hello World");
}I am pretty much at a loss.

Thank you
I followed your advice and
javac -v
Using built-in specs.
Reading specs from /usr/lib/gcc/i586-suse-linux/4.3/libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
Target: i586-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,fortran,java --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3 --enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.3-1.5.0.0/jre --with-ecj-jar=/usr/lib/gcc/i586-suse-linux/4.3/ecj.jar --enable-java-awt=gtk --enable-gtk-cairo --disable-libjava-multilib --disable-libmudflap --with-slibdir=/lib --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.3 --enable-linux-futex --without-system-libunwind --with-cpu=generic --build=i586-suse-linux
Thread model: posix
gcc version 4.3.2 [gcc-4_3-branch revision 141291] (SUSE Linux)
alon@linux-6xrt:/usr/lib/jvm> I guess I am using gcj
BTW I am using openSUSE, I use geany editor and I type all the command the terminal.. no IDE for me.
I gather I should down the java compiler from Sun then?.
I have found this
java                        java-gcj       jre-1.6.0-openjdk
java-1.5.0                  jre            jre-gcj
java-1.5.0-gcj              jre-1.5.0      jre-openjdk
java-1.5.0-gcj-4.3-1.5.0.0  jre-1.5.0-gcj
java-1.6.0-openjdk-1.6.0    jre-1.6.0
alon@linux-6xrt:/usr/lib/jvm> So I guess I have the openjdk?
Your advice?

Similar Messages

  • IPhone SDK 3.1: Problem compiling first Hello World App

    Hi,
    I am new to XCode, Mac OS and iPhone Development.
    I had already installed the earlier iPhone SDK (version prior to the latest 3.1) into my Mac OS 10.6. I was not able to run
    the hello world program through xCode as while opting for Build and Run, the simulator it was giving me an error saying that it cannot find the right SDK.
    I had assumed that the old SDK is not compatible with the new Mac OS 10.6 (Snow Leopard). I had then uninstalled the old
    iPhone SDK using Terminal tool, using the command line given in the xCode uninstall guide.
    Installed the latest iPhone SDK (version 3.1), and then tried to compile the hello world app through xCode. Now I am getting the following error:
    *error: can't exec '/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2' (No such file or directory*)
    I had located the above mentioned directory and could not find the file: "gcc-4.2" as mentioned in the error. Instead
    executable files like "i686-apple-darwin10-gcc-4.2.1" are present there.
    My Project Settings are:
    Project Format - xcode 3.2 -compatible
    Base SDK - iPhone Simulator 3.1
    Compiler Version - System Default (GCC 4.2)
    I am totally confused here, as I don't know how to correctly set up the ENV, as I thought the iPhone installer SDK does that automatically.
    Please help me out.
    Thanks in advance for your time,
    JC.
    Error Messages:
    Build helloworldxc of project helloworldxc with configuration Debug
    ProcessPCH /var/folders/P-/P-zMg0EzHree36VYyqKEvU+TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/helloworldxcPrefix-gylsydenhucpkgfnujlgvzvhfhzd/helloworldxcPrefix.pch.gch helloworldxc_Prefix.pch normal i386 objective-c com.apple.compilers.gcc.4_2
    cd "/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc"
    setenv LANG en_US.US-ASCII
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr /bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c-header -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D_IPHONE_OS_VERSION_MINREQUIRED=30000 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1 .sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/Deb ug-iphonesimulator/helloworldxc.build/helloworldxc-generated-files.hmap -I/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/D ebug-iphonesimulator/helloworldxc.build/helloworldxc-own-target-headers.hmap -I/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/D ebug-iphonesimulator/helloworldxc.build/helloworldxc-all-target-headers.hmap -iquote /Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/Deb ug-iphonesimulator/helloworldxc.build/helloworldxc-project-headers.hmap -F/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/Debug-iphonesimulato r -I/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/Debug-iphonesimulato r/include -I/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/D ebug-iphonesimulator/helloworldxc.build/DerivedSources/i386 -I/Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/build/helloworldxc.build/D ebug-iphonesimulator/helloworldxc.build/DerivedSources -c /Users/jaideepchakravorty/Jaideep/R&D/helloworldxc/helloworldxc_Prefix.pch -o /var/folders/P-/P-zMg0EzHree36VYyqKEvU+TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/helloworldxcPrefix-gylsydenhucpkgfnujlgvzvhfhzd/helloworldxcPrefix.pch.gch
    while compiling hellowworldxc_Prefix.pch,
    error: can't exec '/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2' (No such file or directory)

    Could you let me know as where is the xcode setting through which it is looking for the compiler in the following path ? This path is probably wrong (Pls refer to the error messages)
    I'm not sure this will be of any help to you -- I'm not sure if it's the answer you're looking for, since I don't really know enough on the subject. However, this may answer your question, or at least maybe help you find the answer for yourself, so it's worth a shot. Try going to Edit Project Settings in the Project menu, and once the Project Settings open, select the Build tab. Search through this and see if you find any preferences along the lines of what you are looking for. In particular I would try the sections toward the bottom about the GCC 4.0 compiler. Sorry if this was a waste of time, but I wanted to try...

  • Cannot get a HELLO WORLD

    Please take the time to answer this very simple but ANNOYING question.
    does anybody know a good (preferably free) C compiler to build java compatable dll files??
    The ones that are supposedly "the best out there, ect" seem to alway want to link dll's to exe's which defeats the whole point of a dll
    Thanks in advance. Bamkin

    Installation
    Install the IDE; Sun's JDK with NetBeans for Java and Cygwin Unix shell for WinXXxx with GNU's gcc for C/C++ and Fortran
    Install Netbeans with JDK as a co-bundle
    Read More about J2SE http://java.sun.com/j2se/overview.html
    Read More about NetBeansTM http://www.netbeans.org/
    Download the Download NetBeans IDE v 3.5.1 with J2SE v 1.4.2 COBUNDLE
    http://java.sun.com/j2se/1.4.2/download.html
    For:
    Windows (.exe)
    Now install both at one step JDK and NetBeans
    Install the Netbeans-Module "cpp"
    This module adds the functionality of an C/C++ and Fortran editor with syntax-highlighting for view and print:
    1) Open your NetBeans
    Go with your browser to: http://www.netbeans.org/catalogue/32-stable.html
    and select the download button for CPP support: http://www.netbeans.org/download/nbms/33/stable/Unmaintained/cpplite.nbm
    If your NetBeans installation is valid you can open it direct with your browser for the NetBeans installation process.
    Configure the syntax highlighting in Java and in ?cpp? as you like in font, color and font-settings.
    For print:
    at: Menue>Tools>Options/IDE Configuration/System/Print Settings/C and C++Editor>Font & Colors(click)>Button?...?(click)>Frame:?Print Fonts and Colors?
    At this Frame you have a list of the recognized syntax-elements and on the right side you can change there styles in font, font-settings, colors and see a preview of the actual settings.
    For java, XML and all other do the same in the ?Print Settings? as you like most.
    For screen-view:
    at: Menue>Tools>Options/Editing/Editor Settings/C and C++Editor>Font & Colors(click)>Button?...?(click)>Frame:?Fonts and Colors?
    The frame works as that for print does.
    Install Cygwin, the UNIX-Shell running in windows!
    I will explain the way starting from web:
    Go to:
    http://www.cygwin.com/setup.exe
    and start the setup.exe
    You have to choose:
    1) Install from Internet
    2) your directory for cygwin like: "D:\Programme\cygwin" and the install for all or just for you
    3) choose a local package directory like "D:\Programme\cygwin"
    4) choose the settings to access the web like "Use IE5 Settings"
    5) choose the nearest you download server
    6) Selection of the required packages
    The Developer Package:
    A tree of packages is listed you have to click at 6. line (+Devel) at the word Default
    +Devel # Default
    Default should changed to:
    +Devel # Install
    ...this is your developer-pack including gcc
    The Win32-API libraries:
    but further you have to go to Libs (line 12) and now click to the '+' -sign:
    + Libs # Default
    The lib tree should now opened.
    go up to the 5. last line at the 6. column "Package" you should read w32api: Win32 API header and library ...
    look back to column 3 "New" there stands Skip click on it [as long] that you see the version number (2.5-1) or any better
    The Documentation:
    The Documentation should help but it is not necessary to install it:
    + Doc # Default (line 7)
    so that it changes to
    + Doc # Install.
    Now you can finish your installation!
    Follow the steps to finish the installation.
    Overview to JINI by a simple example
    Java code using an external native dll function from java
    This is the view of the resulting directory-file-structure
    For all the steps sampleRoot stands for your root to work with this sample!
    +- sampleRoot
       +- com
       |  +- myPackage
       |     +HelloWorldCaller.java
       |     +HelloWorldCaller.class
       +HelloWoldImp.c
       +HelloWoldImp.dll
       +com_myPackage_HelloWorldCaller.h
    The Java-code:
    This code have a package-declaration so it resists at the subdirectories sampleRoot/com/myPackage!
    package com.myPackage;
    * HelloWorldCaller.java
    * Created on 26. M?rz 2004, 13:23
    * @author  mike
    class HelloWorldCaller {
        //the declaration for the native method
        public native void displayHelloWorld();
        //this part of code is executed while class is loaded
        static {
            //loads the native library from native systems path
            System.out.println("start to load the library");
            System.loadLibrary("HelloWorldImp");
            System.out.println("load should already be done");
        //the constructor is empty and can be cleared
        public HelloWorldCaller(){
        //this is a caller for the native method but you can do it direct at main
        public void doNativeCall(){
            displayHelloWorld();
        public static void main(String[] args) {
            //instantiate and call from this instance the native method
            new HelloWorldCaller().doNativeCall();
            //this is the same without a calling method between
            new HelloWorldCaller().displayHelloWorld();
    Compile the Code:
    You working-directory is the sampleRoot!
    $ javac com/myPackage/HelloWorldCaller.java
    Generate the C-Header File
    You working-directory is the sampleRoot!
    $ javah com.myPackage.HelloWorldCaller
    The naming convention of the resulting header-file:
    automatic generated by javah
    Syntax of the C-header file name:
    <packagename truncated with '_'>_<classname>.h
    If you use no package this part ?<packagename truncated with '_'>_? is simply left.
    +-- package name truncated with underscore
                  +-- class name
                                  + ending of a header filecom_myPackage_HelloWorldCaller.h
    The naming convention of the resulting method declaration:
    Syntax of the function signature:
    Java_<packagename truncated with '_'>_<classname>_<functionname>
    If you use no package this part ?<packagename truncated with '_'>_? is simply left.
    +-- Java
        + Underscore
         +-- package name truncated with underscore
                       +-- class name
                                       +-- underscore
                                        +-- method nameJava_com_myPackage_HelloWorldCaller_displayHelloWorld
    The generated - com_myPackage_HelloWorldCaller.h -file:
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class com_myPackage_HelloWorldCaller */
    #ifndef _Included_com_myPackage_HelloWorldCaller
    #define _Included_com_myPackage_HelloWorldCaller
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class:     com_myPackage_HelloWorldCaller
    * Method:    displayHelloWorld
    * Signature: ()V
    JNIEXPORT void JNICALL Java_com_myPackage_HelloWorldCaller_displayHelloWorld
      (JNIEnv *, jobject);
    #ifdef __cplusplus
    #endif
    #endif
    The implementation of the native dll function - HelloWorldImp.c -file
    * File:   HelloWorldImp.c
    * Author: mike
    * Created on 26. M?rz 2004, 14:34
    #include <jni.h>
    #include <stdio.h>
    #include "com_myPackage_HelloWorldCaller.h"
    /* The implementation of the native method
    JNIEXPORT void JNICALL Java_com_myPackage_HelloWorldCaller_displayHelloWorld(JNIEnv *env, jobject obj)
        printf("Hello world!\n");
        return;
    Compile the HelloWorldImp.c ? file to a *.dll
    On MS Win with Cygwin, the following command builds a dynamic link library HelloWorldImp.dll:
    This command is one line without line-breaks.
    Check your include because I use the j2sdk1.4.2_04 if you want to do like me than install it.
    For j2sdk1.4.2_04:
    $ gcc -Wall -mno-cygwin  -I/cygdrive/c/j2sdk1.4.2_04/include
    -I/cygdrive/c/j2sdk1.4.2_04/include/win32 -shared
    HelloWorldImp.c -Wl,--add-stdcall-alias -o HelloWorldImp.dllFor j2sdk1.4.2 as co-installation with NetBeans:
    $ gcc -Wall -mno-cygwin  -I/cygdrive/c/j2sdk1.4.2/j2sdk1.4.2/include
    -I/cygdrive/c/j2sdk1.4.2/j2sdk1.4.2/include/win32 -shared
    HelloWorldImp.c -Wl,--add-stdcall-alias -o HelloWorldImp.dll
    The used Switches:
    -Wall : switches on all warnings
    -mno-cygwin : switches off the use of unix-API's, instead of it uses win32-calls
    -I<directory> : defines a path to a directory with include *.h-files
    -shared : advices the compiler to make shared libraries (*.so for linux and *.dll for win)
    -Wl,<option> : Pass an option to the linker (for Wl: l is an L not an 1 and stands for linker)
    -Wl,--add-stdcall-alias : pass the switch --add-stdcall-alias to the linker, advices the linker to add standardcalls so the exports have an standard-call alias as well.
    The exports of the resulting dll:
    If you want to test the exports yourself use : http://ftp.berlios.de/pub/unimatrix-fulda/win-devel/impdef.zip and compile it.
    impdef.exe is a small program resulting the dll's EXPORTS to standard-device, screen:
    $ impdef HelloWorldImp.dll
    EXPORTS
    Java_com_myPackage_HelloWorldCaller_displayHelloWorld
    Java_com_myPackage_HelloWorldCaller_displayHelloWorld@8On Linux:
    Not tested, only a sample copy from an other helping guy's text!
    gcc -I../ -o libtestjni.so testjni.c ***many .a and .o here*** -shared -Wl,-soname,libnative.so
    -I/usr/java/jdk/include -I/usr/java/jdk/include/linux -static -lc
    On Solaris, the following command builds a shared library libhello.so:
    Not tested, only a sample copy from an other helping guy's text!
    cc -G -I/usr/local/java/include -I/usr/local/java/include/solaris \
    HelloWorldImp.c -o libhello.so
    On Microsoft Windows, the following command builds a dynamic link library hello.dll using Microsoft Visual C++ 4.0:
    Not tested, only a sample copy from an other helping guy's text!
    cl -Ic:\java\include -Ic:\java\include\win32
    -LD HelloWorldImp.c -Fehello.dll
    Set Your Library Path
    DOS shell (Windows 95/NT)
    On Windows 9x/NT/2000/(XP), the loadLibrary() method searches for DLLs in the same manner as other language environments do.
    The java.library.path is the same as the systems %PATH%-variable.
    Add the directory where your *.dll-file exists
    SET PATH=%PATH%;X:YourDirectory
    or copy your *.dll-file to one of the allready in the PATH mounted directories.
    UNIX
    % setenv LD_LIBRARY_PATH mylibrarypath
    where mylibrarypath is the name of the directory that contains libhello.so.
    MacOS
    The Java runtime searches the JavaSoft Folder in the Extensions folder in the System Folder for shared libraries. Create an alias to your shared library in the JavaSoft Folder.
    Execute the code
    If it works fine:
    $ java com.myPackage.HelloWorldCaller
    start to load the library
    load should already be done
    Hello world!
    If the dll is not found you get:
    $ java com.myPackage.HelloWorldCaller
    start to load the library
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no HelloWorldImp in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
    at java.lang.Runtime.loadLibrary0(Runtime.java:788)
    at java.lang.System.loadLibrary(System.java:834)
    at com.myPackage.HelloWorldCaller.<init>(HelloWorldCaller.java:24)
    at com.myPackage.HelloWorldCaller.main(HelloWorldCaller.java:34)
    The java.library.path is not as he should be see: ?Set Your Library Path?
    If the dll is loaded, but the native method is not reachable you get something like:
    $ java com.myPackage.HelloWorldCaller
    Exception in thread "main" java.lang.UnsatisfiedLinkError: displayHelloWorld
    at com.myPackage.HelloWorldCaller.displayHelloWorld(Native Method)
    at com.myPackage.HelloWorldCaller.main(HelloWorldCaller.java:25)
    Check the Naming of your native methods C-implementation and the generation of standard-calls.

  • Hello World Servlet Not Working

    Hi,
    I am using apache and eclipse for the first time. I am running into an issue. When I create the HelloServlet.java class, a yellow icon with a question mark appears on top on my web-inf, package, and class. I also notice a yellow line appears under the class name HelloWorld. I place the curso on top of it, and I saw the message below:
    �The serializable class HelloServlet does not declare a static final serialVersionUID field of type long�. I am not sure what I did wrong. When I paste the url in the browser, it does not show the message. It shows me an error 404.
    I am using eclipse 3 with tomcat 6 and java 5.
    P.S. I started tomcat, and all the jsp and html samples are working fine.

    I am getting the error message below when I compile my hello World Servlet.
    Dec 13, 2007 11:45:54 AM org.apache.catalina.core.AprLifecycleListener init
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_14\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jre1.6.0_03\bin\client;C:\Program Files\Java\jre1.6.0_03\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.5.0_14\bin;C:\JDBC\sqljdbc_1.2\enu\sqljdbc.jar;c:\Program Files\Microsoft SQL Server\90\Tools\binn\
    Dec 13, 2007 11:45:54 AM org.apache.coyote.http11.Http11Protocol init
    SEVERE: Error initializing endpoint
    java.net.BindException: Address already in use: JVM_Bind:8080
         at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
         at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:177)
         at org.apache.catalina.connector.Connector.initialize(Connector.java:1059)
         at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
         at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
         at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
         at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
    Dec 13, 2007 11:45:54 AM org.apache.catalina.startup.Catalina load
    SEVERE: Catalina.start
    LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind:8080
         at org.apache.catalina.connector.Connector.initialize(Connector.java:1061)
         at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
         at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
         at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
         at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
    Dec 13, 2007 11:45:54 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 827 ms
    Dec 13, 2007 11:45:54 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Dec 13, 2007 11:45:54 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
    Dec 13, 2007 11:45:54 AM org.apache.tomcat.util.digester.Digester fatalError
    SEVERE: Parse Fatal Error at line 1 column 6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
    org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(XMLScanner.java:689)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(XMLDocumentFragmentScannerImpl.java:750)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(XMLScanner.java:664)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:845)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
         at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
         at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:369)
         at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1062)
         at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4239)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
         at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:516)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Dec 13, 2007 11:45:54 AM org.apache.catalina.startup.ContextConfig applicationWebConfig
    SEVERE: Parse error in application web.xml file at jndi:/localhost/HelloWorld/WEB-INF/web.xml
    org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
         at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
         at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:369)
         at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1062)
         at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4239)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
         at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:516)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Dec 13, 2007 11:45:54 AM org.apache.catalina.startup.ContextConfig applicationWebConfig
    SEVERE: Occurred at line 1 column 6
    Dec 13, 2007 11:45:54 AM org.apache.catalina.startup.ContextConfig start
    SEVERE: Marking this application unavailable due to previous error(s)
    Dec 13, 2007 11:45:54 AM org.apache.catalina.core.StandardContext start
    SEVERE: Error getConfigured
    Dec 13, 2007 11:45:54 AM org.apache.catalina.core.StandardContext start
    SEVERE: Context [HelloWorld] startup failed due to previous errors
    Dec 13, 2007 11:45:55 AM org.apache.coyote.http11.Http11Protocol start
    SEVERE: Error starting endpoint
    java.net.BindException: Address already in use: JVM_Bind:8080
         at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
         at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:515)
         at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:204)
         at org.apache.catalina.connector.Connector.start(Connector.java:1132)
         at org.apache.catalina.core.StandardService.start(StandardService.java:531)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Dec 13, 2007 11:45:55 AM org.apache.catalina.startup.Catalina start
    SEVERE: Catalina.start:
    LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: java.net.BindException: Address already in use: JVM_Bind:8080
         at org.apache.catalina.connector.Connector.start(Connector.java:1139)
         at org.apache.catalina.core.StandardService.start(StandardService.java:531)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Dec 13, 2007 11:45:55 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1244 ms
    Dec 13, 2007 11:45:55 AM org.apache.catalina.core.StandardServer await
    SEVERE: StandardServer.await: create[8005]:
    java.net.BindException: Address already in use: JVM_Bind
         at java.net.PlainSocketImpl.socketBind(Native Method)
         at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
         at java.net.ServerSocket.bind(ServerSocket.java:319)
         at java.net.ServerSocket.<init>(ServerSocket.java:185)
         at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
         at org.apache.catalina.startup.Catalina.await(Catalina.java:630)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:590)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

  • Hello World CANNOT FIND SPECIFIED INSTANCE

    I started with the BPEL PM Training http://www.oracle.com/technology/products/ias/bpel/pdf/orabpel-Training-Segment01.pdf.
    1. The screens are not the same as in JDeveloper 10.1.3.2.0.4066...
    2. I was able to compile hello world
    3. when i went to bpel console the hello world was not there so i used the deploy button and did the deploy it manually
    4. I was able to see the process
    5. However, when I ran it and went to audit instance, i get the error message "cannot find the specified instance"
    6. the solution said 'if the instance has recently been initiated, the invocation data may not have been delivered to the engine yet. Refresh your browser window and try again in a few seconds"
    7. I tried both several times and get the same error message
    Anyone know how to fix this?
    I am running DHCP with the loopback adapter - is that a problem?
    Much appreciated.

    Fi,
    See the below link will helful to you,
    Informatica Start Workflow failed in Workflow Manager
    Note: FYI this is not right area to get answers for your questions related to ETL.
    Thanks,
    Balaa...

  • Cannot get hello world to run?!

    Ack, an IDE is a terrible thing. I recently tried to compile/run a java program the old fashioned way (from DOS command prompt), and I can't even get a simple hello world prog to run!
    I've got a file "Hello.java" with the code
    public class Hello {
    public static void main(String[] args) {
    System.out.println("hello, world!");
    } from the command prompt, i then do "javac Hello.java", which works fine, and then a "java Hello". Unfortunately, "java Hello" says "NoClassDefFoundError: Hello"... I can't for the life of me figure out why something so simple isn't working. Anyone? I'm getting pretty desperate here lol...

    hi,
    may be your class path doesn't set.
    set classpath=.;%classpath%;copy and paste it into your current dir and try once

  • How to compile a simple "Hello World" program in Java by using Netbeans

    Hi all, I am very new to java programming arena. i am trying to learn the most demanding language for the time being. To program, i always use IDE's as it makes programming experience much easier by underline the syntax errors or sometimes showing codehint. However, I am facing some problem when i use Netbeabs to compile a simple "Hello world" program. my problem is whenever i write the code and press compile button, netbeans says "main class not found". Consequently,i am becoming frustated. So, i am here in this forum to get some kind help on How i can compile java programs in Netbeans. Please help me out, otherwise i may lose my enthusiasm in Java. please help me, i m stuck

    Go to http://www.netbeans.org/
    You should find tutorials there.

  • Gcc won't compile hello world

    Hello World :
    #include<iostream>
    using namespace std;
    int main ()
    cout << "what am I doing wrong?";
    return 0;
    All the strace sh!t
    execve("/usr/bin/gcc", ["gcc", "hello.cpp"], [/* 43 vars */]) = 0
    uname({sys="Linux", node="stryder", ...}) = 0
    brk(0) = 0x805d000
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f59000
    access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
    open("/etc/ld.so.cache", O_RDONLY) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=65638, ...}) = 0
    mmap2(NULL, 65638, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f48000
    close(3) = 0
    open("/lib/tls/libc.so.6", O_RDONLY) = 3
    read(3, "177ELF111331220R1"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=1363203, ...}) = 0
    mmap2(NULL, 1150540, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e2f000
    mmap2(0xb7f3e000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10f) = 0xb7f3e000
    mmap2(0xb7f46000, 7756, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f46000
    close(3) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e2e000
    set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e2e6c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
    munmap(0xb7f48000, 65638) = 0
    brk(0) = 0x805d000
    open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=38399616, ...}) = 0
    mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7c2e000
    close(3) = 0
    brk(0x807e000) = 0x807e000
    rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0
    rt_sigaction(SIGINT, {0x804ade0, [INT], SA_RESTART}, {SIG_IGN}, 8) = 0
    rt_sigaction(SIGHUP, {SIG_IGN}, {SIG_DFL}, 8) = 0
    rt_sigaction(SIGHUP, {0x804ade0, [HUP], SA_RESTART}, {SIG_IGN}, 8) = 0
    rt_sigaction(SIGTERM, {SIG_IGN}, {SIG_DFL}, 8) = 0
    rt_sigaction(SIGTERM, {0x804ade0, [TERM], SA_RESTART}, {SIG_IGN}, 8) = 0
    rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
    rt_sigaction(SIGPIPE, {0x804ade0, [PIPE], SA_RESTART}, {SIG_IGN}, 8) = 0
    rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
    access("/bin/gcc", X_OK) = -1 ENOENT (No such file or directory)
    access("/usr/bin/gcc", X_OK) = 0
    lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    lstat64("/usr/bin", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
    lstat64("/usr/bin/gcc", {st_mode=S_IFREG|0755, st_size=85296, ...}) = 0
    access("/bin/gcc", X_OK) = -1 ENOENT (No such file or directory)
    access("/usr/bin/gcc", X_OK) = 0
    lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    lstat64("/usr/bin", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
    lstat64("/usr/bin/gcc", {st_mode=S_IFREG|0755, st_size=85296, ...}) = 0
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/", X_OK) = 0
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/", X_OK) = 0
    access("hello.cpp", F_OK) = 0
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/specs", R_OK) = 0
    open("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/specs", O_RDONLY) = 3
    stat64("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/specs", {st_mode=S_IFREG|0644, st_size=3869, ...}) = 0
    read(3, "*asm:n%{v:-V} %{Qy:} %{!Qn:-Qy} "..., 3869) = 3869
    close(3) = 0
    access("/usr/lib/gcc/i686-pc-linux-gnu/specs", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/", X_OK) = 0
    access("/tmp", R_OK|W_OK|X_OK) = 0
    gettimeofday({1121809872, 830804}, NULL) = 0
    getpid()
    open("/tmp/ccTAp7N8.s", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
    close(3) = 0
    stat64("/usr/libexec/gcc/i686-pc-linux-gnu/3.4.3/cc1plus", {st_mode=S_IFREG|0755, st_size=9274676, ...}) = 0
    access("/usr/libexec/gcc/i686-pc-linux-gnu/3.4.3/cc1plus", X_OK) = 0
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7e2e708) = 7198
    waitpid(7198, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 7198
    --- SIGCHLD (Child exited) @ 0 (0) ---
    gettimeofday({1121809873, 223825}, NULL) = 0
    open("/tmp/ccLSz9Bn.o", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
    close(3) = 0
    stat64("/usr/libexec/gcc/i686-pc-linux-gnu/3.4.3/as", 0xbfc6c28c) = -1 ENOENT (No such file or directory)
    stat64("/usr/libexec/gcc/i686-pc-linux-gnu/3.4.3/as", 0xbfc6c28c) = -1 ENOENT (No such file or directory)
    stat64("/usr/libexec/gcc/i686-pc-linux-gnu/as", 0xbfc6c28c) = -1 ENOENT (No such file or directory)
    stat64("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/as", 0xbfc6c28c) = -1 ENOENT (No such file or directory)
    stat64("/usr/lib/gcc/i686-pc-linux-gnu/as", 0xbfc6c28c) = -1 ENOENT (No such file or directory)
    stat64("/usr/libexec/gcc/i686-pc-linux-gnu/3.4.3/as", 0xbfc6c28c) = -1 ENOENT (No such file or directory)
    stat64("/usr/libexec/gcc/i686-pc-linux-gnu/as", 0xbfc6c28c) = -1 ENOENT (No such file or directory)
    stat64("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/as", 0xbfc6c28c) = -1 ENOENT (No such file or directory)
    stat64("/usr/lib/gcc/i686-pc-linux-gnu/as", 0xbfc6c28c) = -1 ENOENT (No such file or directory)
    stat64("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/bin/i686-pc-linux-gnu/3.4.3/as", 0xbfc6c28c) = -1 ENOENT (No such file or directory)
    stat64("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/bin/as", 0xbfc6c28c) = -1 ENOENT (No such file or directory)
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7e2e708) = 7199
    --- SIGCHLD (Child exited) @ 0 (0) ---
    waitpid(7199, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 7199
    stat64("/usr/libexec/gcc/i686-pc-linux-gnu/3.4.3/collect2", {st_mode=S_IFREG|0755, st_size=127724, ...}) = 0
    access("/usr/libexec/gcc/i686-pc-linux-gnu/3.4.3/collect2", X_OK) = 0
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/crt1.o", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/crt1.o", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/lib/i686-pc-linux-gnu/3.4.3/crt1.o", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/lib/crt1.o", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../i686-pc-linux-gnu/3.4.3/crt1.o", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../crt1.o", R_OK) = 0
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/crti.o", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/crti.o", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/lib/i686-pc-linux-gnu/3.4.3/crti.o", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/lib/crti.o", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../i686-pc-linux-gnu/3.4.3/crti.o", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../crti.o", R_OK) = 0
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/crtbegin.o", R_OK) = 0
    stat64("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/.", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    stat64("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/.", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    stat64("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/lib/i686-pc-linux-gnu/3.4.3/.", 0xbfc6b33c) = -1 ENOENT (No such file or directory)
    stat64("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/lib/.", 0xbfc6b35c) = -1 ENOENT (No such file or directory)
    stat64("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../i686-pc-linux-gnu/3.4.3/.", 0xbfc6b35c) = -1 ENOENT (No such file or directory)
    stat64("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../.", {st_mode=S_IFDIR|0755, st_size=36864, ...}) = 0
    stat64("/lib/i686-pc-linux-gnu/3.4.3/.", 0xbfc6b38c) = -1 ENOENT (No such file or directory)
    stat64("/usr/lib/i686-pc-linux-gnu/3.4.3/.", 0xbfc6b37c) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/crtend.o", R_OK) = 0
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/crtn.o", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/crtn.o", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/lib/i686-pc-linux-gnu/3.4.3/crtn.o", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/lib/crtn.o", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../i686-pc-linux-gnu/3.4.3/crtn.o", R_OK) = -1 ENOENT (No such file or directory)
    access("/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../crtn.o", R_OK) = 0
    stat64("/usr/libexec/gcc/i686-pc-linux-gnu/3.4.3/collect2", {st_mode=S_IFREG|0755, st_size=127724, ...}) = 0
    access("/usr/libexec/gcc/i686-pc-linux-gnu/3.4.3/collect2", X_OK) = 0
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7e2e708) = 7200
    waitpid(7200, /tmp/ccLSz9Bn.o(.text+0xd): In function `std::__verify_grouping(char const*, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
    : undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const'
    /tmp/ccLSz9Bn.o(.text+0x60): In function `std::__verify_grouping(char const*, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
    : undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) const'
    /tmp/ccLSz9Bn.o(.text+0x9f): In function `std::__verify_grouping(char const*, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
    : undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) const'
    /tmp/ccLSz9Bn.o(.text+0xce): In function `std::__verify_grouping(char const*, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
    : undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) const'
    /tmp/ccLSz9Bn.o(.text+0x127): In function `main':
    : undefined reference to `std::cout'
    /tmp/ccLSz9Bn.o(.text+0x12c): In function `main':
    : undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
    /tmp/ccLSz9Bn.o(.text+0x155): In function `__static_initialization_and_destruction_0(int, int)':
    : undefined reference to `std::ios_base::Init::Init()'
    /tmp/ccLSz9Bn.o(.text+0x186): In function `__tcf_0':
    : undefined reference to `std::ios_base::Init::~Init()'
    /tmp/ccLSz9Bn.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
    collect2: ld returned 1 exit status
    [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0) = 7200
    --- SIGCHLD (Child exited) @ 0 (0) ---
    stat64("/tmp/ccLSz9Bn.o", {st_mode=S_IFREG|0600, st_size=2468, ...}) = 0
    unlink("/tmp/ccLSz9Bn.o") = 0
    stat64("/tmp/ccTAp7N8.s", {st_mode=S_IFREG|0600, st_size=6022, ...}) = 0
    unlink("/tmp/ccTAp7N8.s") = 0
    exit_group(1)
    Any help would be appreciated immensly.

    well, the compiler output would have been much more useful than an strace.  The gnu compilers are used by millions of people - I'm pretty sure someone would have noticed if it didn't compile c++ programs.  Following that logic, it's most likely a program error.
    Also, like biio said, use g++ for c++ apps, instead of gcc - that'll probably fix your issue because it compiles fine here:
    g++ hello.cpp -o hello

  • Gcc not compile hello world in c?

    hi
    i wrote a hello world example in c language and  i want compile its.object file is created but not created executed file.please write me what command i need and a little hello world in c to test.
    thanks

    A good way to do this is build a simple makefile containing just the following 2 lines:
    CC=gcc
    CFLAGS:=-ggdb -std=c99
    The second line is optional and you may have other preferences.  The -ggdb option adds debugging information for the GNU debugger, gdb; and the -std=c99 allows a program that is compliant with the C99 standard to be compiled.  Name this file 'Makefile' and place it in the same directory as your source code file (i.e. hello.c). Then just type
    $ make hello

  • Cross compile "Hello World" C++

    Hi, I have been trying to search on the internet for how to cross complie a simple "Hello World" program on a linux box so that you can exeute it later on an windows computer... If anyone knows about this please let me know!
    And I looking for how to do it from the commandline....
    Best Regards, Robert

    Hi.
    You should download mingw32 from community.
    I have successfully cross compiling my qt application using this package and mingw32-qt from AUR.
    For example of compiling a main application. Please refer to below URL.
    http://www.gentoo-wiki.info/HOWTO_MinGW
    I haven't try compiling the Winmain routine. But it is similar in Arch and you should use i486-mingw32-gcc to compile.

  • Problem including jdk.dio into Hello World Example

    Hi
    I followed the Hello World Example and this worked on my raspberry pi. Then I tried to use jdk.dio to access some hardware via GPIO unfortunately then the build of the Deployment Package fails with :
    # 2/7/15 4:35:16 PM CET
    # Eclipse Compiler for Java(TM) v20140902-0626, 3.10.0, Copyright IBM Corp 2000, 2013. All rights reserved.
    1. ERROR in .../HelloOsgi.java (at line 9)
    import jdk.dio.ClosedDeviceException;
    ^^^^^^^
    The import jdk.dio cannot be resolved
    2. ERROR in .../HelloOsgi.java (at line 10)
    import jdk.dio.Device;
    ^^^^^^^
    The import jdk.dio cannot be resolved
    It builds without an error inside of eclipse. I added the dependencies to the manifest
    Manifest-Version: 1.0
    Import-Package: jdk.dio;version="1.0.0",
    jdk.dio.gpio;version="1.0.0",
    jdk.dio.spibus;version="1.0.0",
    org.osgi.service.component;version="1.2.0",
    org.slf4j;version="1.6.4"
    Service-Component: OSGI-INF/component.xml
    and to the build.properties
    output.. = bin/
    bin.includes = META-INF/,\
    OSGI-INF/
    source.. = src/
    additional.bundles = org.eclipse.osgi.services,\
    slf4j.api,\
    org.eclipse.kura.api,\
    jdk.dio
    What did I miss to do, so that the 'jdk.dio' can be resolved when building Deployment Package?
    Thanks and Regards
    - Franz
    (*)eclipse.github.io/kura/doc/hello-example.html

    I downloaded the "Developer's Workspace (with Web UI) " (user_workspace_archive_1.1.0.zip) from Kura 1.1.1 Extended Downloads (eclipse.org/kura/downloads.php) and imported this into my Eclipse workspace on my development machine. I checked the ZIP file it contains the jdk.dio_1.0.0.jar as stated in my Manifest and not 1.0.1 as you mentioned.
    I also checked on the target (raspberry pi) where I installed the "Raspbian (No, Net, with Web UI) - Stable" from Kura 1.1.1 Extended Downloads. Also here it is jdk.dio_1.0.0.jar under /opt/eclipse/kura/plugins.
    I don't think its a Version problem since Eclipse can build the code and finds all the dependencies. It is just when I try to export a 'Deployable plug-ins and fragments' or try to create the Deployment Package that the build fails.
    I found a workaround for the 'Deployable plug-ins and fragments' there I have to check the option 'Use class files compiled in the workspace' and the I can export it since the export does not need to build it just uses the already built classes from eclipse. I did not find such an option for the creation of the Deployment Package.
    Anyway I would like to be able to build without an IDE.
    What is the suggested approach to build a Deployment Package for Kura without the IDE so it could be integrated in some kind of a CI process?
    Is maven/tycho the way to go?
    Any help or hint is appreciated.
    Thanks Regards
    - Franz

  • HOW TO: "Hello World" EJB Style

    The following Session EJB quick tutorial requires an IIOP datasource. This EJB should work in Oracle databases
    greater than 8.1.5.
    1. Create a new project for an Enterprise JavaBean.
    2. Name your project "Hello".
    3. Select Enterprise JavaBean from "A project containing a new..."
    4. Click Finish to close the Project wizard.
    The Enterprise JavaBeans wizard opens.
    5. For the EJB type, select Session Bean (Stateless)
    6. For the EJB name, enter "Hello" (no quotes!)
    The resulting interface names are created for you. Don't change them!
    7. Click Finish for the EJB wizard to generate the EJB project for you.
    8. Select Save All from the File menu. Call this workspace "Hello".
    You'll see that the EJB wizard generated the home, remote, and bean logic files for you. Now you'll need to
    add the business logic to the HelloBean.java file.
    9. Double click the HelloBean.java file, then click the Source tab to bring it into view.
    10. Before the last closing brace (}), add this line of code:
    public String hello() { return "Hello World!"; }
    11. Select File | Save All.
    12. In the Navigator, double-click the Hello.java file so that you can add the remote interface.
    13. Click the Source tab to bring Hello.java into view.
    14. Add the following line before the last brace (}):
    public String hello() throws java.rmi.RemoteException;
    15. Select File | Save All.
    16. Add the Oracle8i JVM classes to the Hello project by selecting Project | Project Properties and clicking
    the Libraries tab.
    17. Click Add, then click Oracle 8i JVM, then click OK.
    18. Click OK to dismiss the Project Properties dialog.
    19. Select Project | Make Project to compile the Hello project.
    20. In the Navigator, right-click the Hello folder and select Create EJB/8i Deployment Profile.
    21. In the Deployment Profile Wizard that appears, click the Advanced Button.
    Only the first (Automatically include files added to project) and the last (Redirect messages
    to the Message View) boxes should be selected.
    22. Click Done to close the Advanced dialog.
    23. Click the Connection tab and select an IIOP datasource. If there is none, you'll have to create one.
    All three checkboxes at the top of the page should be selected.
    24. Click Done. You'll be prompted to deploy now or later. Click Yes.
    JDeveloper will use the IIOP datasource you specified to deploy the Hello EJB project.
    Now you need to add the generated files that were created during deployment to the class path so that
    the client can find them.
    25. From the Project menu, select Project Properties, then click Add, then click New.
    26. Click the Elipses to the right of the Class path field, then click Add Jar/Zip.
    27. Navigate to the file called HelloGenerated.jar and double-click it to add it to the path.
    28. Click OK to close the two dialogs and Project Properties.
    After JDeveloper completes the deployment, you need to make a client to call the EJB methods and display the results.
    29. From the File menu, select New, then click on the Snippets tab.
    30. Double-click the EJB Oracle 8i Client icon.
    31. Click the Parameters button in the Snippet dialog.
    32. Enter the IIOP connection information you specified earlier.
    33. Enter the EJB Home and Remote interface names ("HelloHome" and "Hello").
    34. Click OK to close the Parameters button.
    The Client file is added to the project.
    35. In the Navigator, right-click the MyEJBJSClient.java file and select run.
    Check the Message View to see the output of your EJB!
    null

    I got the msg when I try to deployment EJB and I use the 8.1.7. andJdev 3.2. Please advise what is wrong for my IIOP connection. From the listener.log, the connection looks good.
    ======================================
    Compiling the project...done
    Validating the profile...done
    Initializing deployment...done
    Scanning project files...done
    Generating classpath dependencies...done
    Generating archive entries table...done
    *** Archive generation completed ***
    *** Deploying the EJB to 8i JVM ***
    EJB deployment argument list:
    "C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\bin\javaw"
    "-DPATH=C:\Program Files\Oracle\JDeveloper 3.2\bin;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\bin"
    -classpath
    "C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\translator.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2\myclasses;C:\Program Files\Oracle\JDeveloper 3.2\lib\jdev-rt.zip;C:\Program Files\Oracle\JDeveloper 3.2\jdbc\lib\oracle8.1.7\classes12.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\connectionmanager.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax_ejb.zip;C:\Program Files\Oracle\JDeveloper 3.2\auro
    a\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\translator.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\lib\rt.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\xmlparserv2.jar"
    oracle.aurora.ejb.deployment.GenerateEjb
    -u
    scott
    -p
    tiger
    -s
    sess_iiop://localhost:2482:test
    -republish
    -keep
    -temp
    TEMP
    -descriptor
    "C:\Program Files\Oracle\JDeveloper 3.2\myprojects\Demo\EJB\DemoHelloEJB.xml"
    -oracledescriptor
    C:\Program Files\Oracle\JDeveloper 3.2\myprojects\Demo\EJB\DemoHelloEJB_oracle.xml
    -generated
    "C:\Program Files\Oracle\JDeveloper 3.2\myprojects\Demo\EJB\DemoHelloEJBGenerated.jar"
    "C:\Program Files\Oracle\JDeveloper 3.2\myprojects\Demo\EJB\DemoHelloEJBSource.jar"
    Cannot connect to service: sess_iiop://localhost:2482:test
    *** Errors occurred while deploying the EJB to 8i JVM ***
    *** Deployment completed ***
    ============================================

  • Hello world Native Extension API

    Hi all :-)
    I am an android expert and I'd really love to create some cool extensions like the android notifications, but since I don't know much about Flex, I have a lot of trouble getting the test vibrator with native extension working.
    (http://www.adobe.com/devnet/air/native-extensions-for-air/extensions/vibration.html)
    My sample is still buggy, it is probably beginner's bug, but I don't see how to fix it yet.
    I am surely not the only native guy trying to do this, so I would like to sumarize here all the steps needed to have our first hello world Native Extension API
    Install Flex 4.5.1 http://www.adobe.com/go/try_flashbuilder/ and download the Adobe AIR 3.0 RC http://labs.adobe.com/downloads/air3.html  as well as the sample files http://download.macromedia.com/pub/developer/air/ane/Vibration.zip
    Create a test Flex mobile project.(all the deffault parameters are fine) I'll call it HelloWorldNativeExtension.
    (If AIR 3 is not released yet) Do the following to tell Flex builder to use the RC on your test project : http://forums.adobe.com/thread/899921
    Unzip the vibration.zip, and go to ready to use extansion.
    Go to Project -> Flex buildpath -> Libraries -> Add a new swc. Add the ready to use extension as a library. Then open the extensions properties and change the link type from "bundled with" to "external linkage"
    Go to HelloworldNativeExtension-app.xml and in the tag manifestAddition, add : <uses-permission android:name="android.permission.VIBRATE"/>
    Write a sample view (as described below)
    Run (target platform->android and then chosse to run on a device)
    When asked to update the air version, answer yes
    Wait a loooong time before it actually start.
    Here is my code for the sample view:
    In HelloworldNativeExtension.mxml
    Use the following code :
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Script>
            <![CDATA[
                import com.adobe.nativeExtensions.Vibration;
                protected function testButton():void
                    textArea.text="Before vibration";
                    var vibe:Vibration;
                    if (Vibration.isSupported)
                        vibe = new Vibration();
                        vibe.vibrate(2000);
                    textArea.text="After vibration";
            ]]>
        </fx:Script>
        <s:Panel title="Exemple MXML" width="330">
            <s:layout>
                <s:VerticalLayout paddingLeft="15" paddingTop="15" paddingBottom="15" paddingRight="15"/>
            </s:layout>
            <s:Label x="223" y="173" text="test" id="textArea"/>
            <s:Button label="Vibrate" click="testButton()"/>
            <s:Label id="result" width="265"/>
        </s:Panel>
    </s:Application>
    Well... so far my project doesn't compile because the library is loaded externally. It compiles fine if I add it as a bundled library, but then the virbrator can't work (External native code have to be loaded externally)
    And thus so far I get the errors :
    Description
    Ressource
    Chemin
    Emplacement
    Type
    1046: Ce type est introuvable ou n'est pas une constante de compilation : [flash.display]::IBitmapDrawable.
    HelloworldNativeExtension
    Inconnu
    Erreur Flex
    1046: Ce type est introuvable ou n'est pas une constante de compilation : [flash.events]::IEventDispatcher.
    HelloworldNativeExtension
    Inconnu
    Erreur Flex
    1046: Ce type est introuvable ou n'est pas une constante de compilation : [flash.events]::IEventDispatcher.
    HelloworldNativeExtension
    Inconnu
    Erreur Flex
    1046: Ce type est introuvable ou n'est pas une constante de compilation : [flash.events]::IEventDispatcher.
    HelloworldNativeExtension
    Inconnu
    Erreur Flex
    1046: Ce type est introuvable ou n'est pas une constante de compilation : [flash.events]::IEventDispatcher.
    HelloworldNativeExtension
    Inconnu
    Erreur Flex
    1046: Ce type est introuvable ou n'est pas une constante de compilation : [flash.events]::IEventDispatcher.
    HelloworldNativeExtension
    Inconnu
    Erreur Flex
    1046: Ce type est introuvable ou n'est pas une constante de compilation : [flash.events]::IEventDispatcher.
    HelloworldNativeExtension
    Inconnu
    Erreur Flex
    1046: Ce type est introuvable ou n'est pas une constante de compilation : [flash.events]::IEventDispatcher.
    HelloworldNativeExtension
    Inconnu
    Erreur Flex
    1046: Ce type est introuvable ou n'est pas une constante de compilation : [flash.events]::IEventDispatcher.
    HelloworldNativeExtension
    Inconnu
    Erreur Flex
    (Which means something like : 1046: this type cannot be resolved or is not in the buildpath ... So it probably means the project doesn't compile well)
    So I'm still trying to figure out what to do, but I am close I think... Very close.

    Yes, in fact you are very close
    You will have to put an <extensions> tag in app-xml if not already done so:
    <extensions>
    <extensionID>com.adobe.Vibration</extensionID>
    <extensions>
    Then since it is FlashBuilder 4.5.1, you will have to package the android application through command line since it requires 1 more parameter -extdir :
    adt -package -target apk . . . app.apk app.xml app.swf -extdir extensions
    extensions is the directory which contains your .ane file. Checkout http://www.adobe.com/devnet/air/articles/extending-air.html#articlecontentAdobe_numberedhe ader_1 for more details.
    Thats all. You should be able to run your app now. Let me know if it still doesnt work.
    Thanks,
    Meet
    AIR Team

  • Problem with JNI hello world

    I found some tutorial on SUN site on how to use JNI. I'm using Eclipse to compije Java and C (via Cygwin) files. Here are complete files:
    Hello.java:
    class Hello
         public native void sayHello();
         static
              try
              System.loadLibrary("hello");
              catch(Exception e)
                   System.out.println("exc");
         public static void main(String[] args)
              Hello h = new Hello();
              h.sayHello ();
    }Hello.c:
    #include <mingw/_mingw.h> //because there are some types needed for JNI
    #include <jni.h>
    #include "Hello.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL Java_Hello_sayHello
      (JNIEnv *env, jobject obj)
         printf("Hello world!\n");
         return;
    }Makefile:
    hello.dll : Hello.o Hello.def
         gcc -g -shared -Wl,--kill-at -o hello.dll Hello.o hello.def
    Hello.o : Hello.c Hello.h
         gcc -c -g -I"$(JAVA_HOME)\include" -I"$(JAVA_HOME)\include\win32" Hello.c -o Hello.o
    Hello.h : Hello.class
         javah -jni Hello
    clean :
         rm Hello.h
         rm Hello.o
         rm hello.dllHello.def
    EXPORTS
    Java_Hello_sayHelloEverything goes well, but when I run java program it does nothin (it should print message, but it just exit without any error).I'm sure that it's something stupid, but I cant see what. Can anyone tell me what am I doing wrong?
    Thenks.

    Answer 1: yes, there was no problem. I compiled and started simple 'hello world' program from Cygwin and from WinXP console, and it worked well.
    Answer 2: This is weird, I changed code to this:
    Hello.java:
         public native int getInt();
              System.out.println("Returned int is " + h.getInt());Hello.c:
    JNIEXPORT jint JNICALL Java_Hello_getInt
      (JNIEnv *env, jobject obj)
         return 25;
    }It does not print anything. I started this program from Cygwin and from WinXP console, and from Eclipse. Only if I debug in Eclipse (step by step) I get:
    Returned int is 25and still I don't get Hello string printed (even if I go step by step). It looks like cygwin has some problem with OS. Do you have any idea what to do, I'm a bit confused?
    Thank you.
    Message was edited by:
    zly

  • HOW TO: Create a GUI "Hello World"

     </p>
    This document describes how to create and run a very simple &quot;Hello World&quot;
    Java GUI app using JDeveloper. The application will have one button and one
    text field. Clicking the button will populate the text field with the message,
    &quot;Hello World!&quot;</p>
    Creating The New Application
    In this section, we will create an application with an empty frame.</p>
    <ol>
    [*]Choose File | New Workspace.
    </li>
    [*]Choose File | Save Workspace.
    </li>
    [*]Enter <TT>HelloGui.jws</tt> as the name for the workspace.
    This creates a Workspace called HelloGui. A workspace organizes all the projects
    you need to work on at one time.
    </li>
    [*]Choose File | New Project.
    The Project Wizard opens. This wizard will help you create a new project called
    HelloGui. A project contains all the files that go together in one &quot;tier&quot;--for
    example, all the files belonging to a single Java Application client, or all
    the files belonging to an Enterprise Java Bean. Because we are working on
    a simple, one-tier application, we will only need one project in our workspace.
    </li>
    [*]If the Welcome page appears, click Next.
    </li>
    [*]On the Project Type page, in the What is the Project's Filename?
    field, change the filename to <TT>HelloGui.jpr</tt>. Leave the rest of the
    path the same.
    </li>
    [*]Select A Project containing a new... and choose Application
    from the dropdown list.
    </li>
    [*]Click Next.
    </li>
    [*]On the Project Options page, in the What is the name of the project's
    default package field, enter <TT>helloGui</tt>.
    </li>
    [*]Click Next.
    </li>
    [*]On the Project Information page, you can enter any information about your
    project that you wish.
    </li>
    [*]Click Finish.
    The Application Wizard opens.
    </li>
    [*]In the Class field, enter <TT>HelloApp</tt>.
    </li>
    [*]Select the New Empty Frame radio button.
    </li>
    [*]Click OK.
    The Frame Wizard opens.
    </li>
    [*]In the Class field, enter <TT>HelloFrame</tt>.
    </li>
    [*]Click OK.
    JDeveloper creates an application, <TT>HelloApp</tt>, containing an empty
    frame, <TT>HelloFrame</tt>. The source code for these classes appears in the
    Navigator, which is the upper left-hand pane in the JDeveloper IDE.
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Adding a Panel to the Frame
    In this section, we will now add a panel to the frame. In the next section,
    we will add all the other components to this panel.</p>
    <ol>
    [*]In the Navigator, double-click <TT>HelloFrame.java</tt>.
    A viewer opens. This viewer has four tabs at the bottom:
    <ul>
    [*]Source, the currently active tab, which displays the source code
    of the selected class</li>
    [*]Design, which invokes a visual layout designer</li>
    [*]Class, which invokes an editor for the class' attributes, and
    can help you stay JavaBean complient</li>
    [*]Doc, which displays the class' JavaDoc
    </li>
    </ul>
    </li>
    [*]Click the Design tab.
    The viewer now displays a grey square, a graphical mock-up of your frame.
    Also, on the right-hand side of your screen, the Property Inspector opens.
    This allows you to quickly set attributes and define events for components.
    </li>
    [*]In the component palette (the tabbed toolbar near the top of your screen),
    select the Swing Containers tab.
    </li>
    [*]Click the blue square (described in rollover text as <TT>JPanel</tt>) and
    click on your frame to add the panel.
    The Property Inspector now displays attributes of the JPanel.
    </li>
    [*]In the Property Inspector, click twice inside the box beside the name
    field.
    </li>
    [*]Change the name to mainPanel.
    </li>
    [*]Click the box beside the layout field.
    </li>
    [*]Choose XYLayout.
    XYLayout is an easy-to-use Layout for prototyping. Later, we will change the
    layout to a more portable one.</li>
    </ol>
    Adding Components to the Panel
    In this section, we finish laying out a prototype UI. We will add polish and
    portability to the UI later.</p>
    <ol>
    [*]In the Component Palette, select the Swing tab.
    </li>
    [*]Select the <TT>JTextField</tt> component, which looks like a text field
    with a cursor.
    </li>
    [*]In your panel, click and drag the cursor to outline the text field.
    Don't worry if the text field doesn't have exactly the right size or position.
    We will adjust these later.
    The Property Inspector now displays attributes of the JTextField.
    </li>
    [*]In the Property Inspector, change the name (just as you did for the
    JPanel) to <TT>displayField</tt>.
    </li>
    [*]Change the text to nothing (erase the value that is already there).
    </li>
    [*]In the Component Palette, select the <TT>JButton</tt> component, which looks
    like a button being clicked.
    </li>
    [*]In your panel, click and drag the cursor to outline the button.
    The Property Inspector now displays attributes of the JButton.
    </li>
    [*]In the Property Inspector, change the name and action command
    to helloButton.
    </li>
    [*]Change the text to <TT>Say Hello!</tt>.
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Wiring Up the UI
    In this section, we wire the UI so that clicking the button causes &quot;Hello
    World!&quot; to display in the text field.</p>
    <ol>
    [*]In the Property Inspector, select the Events tab.
    </li>
    [*]Click the box next to the Action Performed field and press the Enter
    key.
    This creates a method, <TT>helloButton_actionPerformed()</tt>, which will
    be invoked when the button is clicked, and displays the source code for the
    method stub in the viewer.
    </li>
    [*]In the viewer, add the following command to the body of the method:
    <TT>displayField.setText(&quot;Hello World!&quot;);</tt>
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Testing the Prototype Application
    <ol>
    [*]Choose Run | Run &quot;HelloApp&quot;.
    Your application appears, with a blank text field and a button labeled &quot;Say
    Hello!&quot;
    </li>
    [*]Click the button.
    The text &quot;Hello World!&quot; appears in the text field.
    </li>
    [*]Close your application.</li>
    </ol>
    Refining the UI
    In this section, we polish the UI so that the components have the right size
    and alignment, the text in the text field shows up red, and the panel uses the
    portable GridBag layout instead of the JDeveloper-specific XYLayout.</p>
    <ol>
    [*]In the viewer, select the Design tab.
    </li>
    [*]Select your text field.
    </li>
    [*]Drag the edges of your text field until it is the size you want.
    </li>
    [*]Drag the center of the text field until it is the vertical position you
    want.
    </li>
    [*]Right-click the text field and choose Align Center.
    This centers your text field horizontally in the frame.
    </li>
    [*]In the property inspector, click the box next to the foreground field.
    </li>
    [*]Click the ellipses (...).
    A color editor appears.
    </li>
    [*]Select Red from the dropdown list.
    </li>
    [*]Click OK.
    </li>
    [*]On your frame, select your button.
    </li>
    [*]Drag the right edge of your button until it is the horizontal size you want.
    </li>
    [*]Select your text field, and multi-select your button by control-clicking
    it.
    </li>
    [*]Right-click your button or text field.
    </li>
    [*]Choose Same Size Vertical.
    This sets the height of all selected components to that of the first selected
    component (the text field).
    </li>
    [*]Right-click your button or text field.
    </li>
    [*]Choose Align Center.
    This aligns the center of all selected components to that of the first selected
    component (the text field).
    </li>
    [*]Select your panel by clicking anywhere on the grey background in the visual
    designer.
    </li>
    [*]In the Property Inspector, click the box beside the layout field.
    </li>
    [*]Select GridBagLayout from the dropdown list.
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Running the Finished Application From Within JDeveloper
    <ol>
    [*]Choose Run | Run &quot;HelloApp&quot;.
    Your application appears, with a blank text field and a button labeled &quot;Say
    Hello!&quot;
    </li>
    [*]Click the button.
    The text &quot;Hello World!&quot; appears in the text field, in red.
    </li>
    [*]Close your application.</li>
    </ol>
    Deploying the Application to Your File System
    <ol>
    [*] In the Navigator, right-click <tt>HelloGui.jpr</tt> and choose New Deployment
    Profile.
    The Deployment Profile Wizard opens.
    </li>
    [*]If the Welcome page appears, click Next.
    </li>
    [*]On the Delivery page, select Web Application or Command-Line Application
    from the dropdown list, and click Next.
    </li>
    [*]On the Staging Area page, in the Deployment Destination field, enter
    <tt><JDeveloper>/HelloGui</tt>, where <tt><JDeveloper></tt>
    is your JDeveloper root directory. Click Next.
    </li>
    [*]On the Project page, select all the <tt>.java</tt> files and click Next.
    </li>
    [*]Skip the Archive page and Applet Tags page by clicking Next on each.
    </li>
    [*]On the Libraries page, shuttle all libraries from the Project Libraries
    list to the Deployed Libraries list, and click Next.
    </li>
    [*]On the Finish page, name the profile <tt>HelloGui.prf</tt>, and click Finish.
    </li>
    [*]When JDeveloper asks you if you want to deploy now, click Yes.</li>
    </ol>
    JDeveloper will archive your application files and copy this archive and all
    other required libraries to <tt><JDeveloper>/HelloGui</tt>.</p>
    Running the Application from the Command Line
    <ol>
    [*]Open a command-line prompt.
    </li>
    [*]Enter the following script.
    Note: You may want to create a batch file containing this script. Be
    sure to replace JDeveloper_Home with your JDeveloper home directory.
    <pre>set __CLASSPATH_ROOT_DIR__=JDeveloper_Home\HelloGui
    set CLASSPATH=&quot;%__CLASSPATH_ROOT_DIR__%\HelloGui.jar&quot;
    set CLASSPATH=%CLASSPATH%;&quot;%__CLASSPATH_ROOT_DIR__%\xmlparserv2.jar&quot;
    set CLASSPATH=%CLASSPATH%;&quot;%__CLASSPATH_ROOT_DIR__%\classes12.zip&quot;
    set CLASSPATH=%CLASSPATH%;&quot;%__CLASSPATH_ROOT_DIR__%\jdev-rt.zip&quot;
    set CLASSPATH=%CLASSPATH%;&quot;%__CLASSPATH_ROOT_DIR__%\swingall.jar&quot;
    cd JDeveloper_Home\HelloGui
    jre -cp %CLASSPATH% helloGui.HelloApp</pre>
    </li>
    [*]Your application appears, with a blank text field and a button labeled &quot;Say
    Hello!&quot;
    </li>
    [*]Click the button.
    The text &quot;Hello World!&quot; appears in the text field, in red.
    </li>
    [*]Close your application.</li>
    </ol>
    </p>
     </p>
    null

    Hello,
    I followed your instruction step by step to make this "Hello World", but when I run it, I got message "cannot find the runable node". What do I miss here? Thanks.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Avrom Faderman ([email protected]):
    </p>
    This document describes how to create and run a very simple "Hello World"
    Java GUI app using JDeveloper. The application will have one button and one
    text field. Clicking the button will populate the text field with the message,
    "Hello World!"</p>
    [b]Creating The New Application
    In this section, we will create an application with an empty frame.</p>
    <ol>
    [*]Choose File | New Workspace.
    </li>
    [*]Choose File | Save Workspace.
    </li>
    [*]Enter <TT>HelloGui.jws</tt> as the name for the workspace.
    This creates a Workspace called HelloGui. A workspace organizes all the projects
    you need to work on at one time.
    </li>
    [*]Choose File | New Project.
    The Project Wizard opens. This wizard will help you create a new project called
    HelloGui. A project contains all the files that go together in one "tier"--for
    example, all the files belonging to a single Java Application client, or all
    the files belonging to an Enterprise Java Bean. Because we are working on
    a simple, one-tier application, we will only need one project in our workspace.
    </li>
    [*]If the Welcome page appears, click Next.
    </li>
    [*]On the Project Type page, in the What is the Project's Filename?
    field, change the filename to <TT>HelloGui.jpr</tt>. Leave the rest of the
    path the same.
    </li>
    [*]Select A Project containing a new... and choose Application
    from the dropdown list.
    </li>
    [*]Click Next.
    </li>
    [*]On the Project Options page, in the What is the name of the project's
    default package field, enter <TT>helloGui</tt>.
    </li>
    [*]Click Next.
    </li>
    [*]On the Project Information page, you can enter any information about your
    project that you wish.
    </li>
    [*]Click Finish.
    The Application Wizard opens.
    </li>
    [*]In the Class field, enter <TT>HelloApp</tt>.
    </li>
    [*]Select the New Empty Frame radio button.
    </li>
    [*]Click OK.
    The Frame Wizard opens.
    </li>
    [*]In the Class field, enter <TT>HelloFrame</tt>.
    </li>
    [*]Click OK.
    JDeveloper creates an application, <TT>HelloApp</tt>, containing an empty
    frame, <TT>HelloFrame</tt>. The source code for these classes appears in the
    Navigator, which is the upper left-hand pane in the JDeveloper IDE.
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Adding a Panel to the Frame
    In this section, we will now add a panel to the frame. In the next section,
    we will add all the other components to this panel.</p>
    <ol>
    [*]In the Navigator, double-click <TT>HelloFrame.java</tt>.
    A viewer opens. This viewer has four tabs at the bottom:
    <ul>
    [*]Source, the currently active tab, which displays the source code
    of the selected class</li>
    [*]Design, which invokes a visual layout designer</li>
    [*]Class, which invokes an editor for the class' attributes, and
    can help you stay JavaBean complient</li>
    [*]Doc, which displays the class' JavaDoc
    </li>
    </ul>
    </li>
    [*]Click the Design tab.
    The viewer now displays a grey square, a graphical mock-up of your frame.
    Also, on the right-hand side of your screen, the Property Inspector opens.
    This allows you to quickly set attributes and define events for components.
    </li>
    [*]In the component palette (the tabbed toolbar near the top of your screen),
    select the Swing Containers tab.
    </li>
    [*]Click the blue square (described in rollover text as <TT>JPanel</tt>) and
    click on your frame to add the panel.
    The Property Inspector now displays attributes of the JPanel.
    </li>
    [*]In the Property Inspector, click twice inside the box beside the name
    field.
    </li>
    [*]Change the name to mainPanel.
    </li>
    [*]Click the box beside the layout field.
    </li>
    [*]Choose XYLayout.
    XYLayout is an easy-to-use Layout for prototyping. Later, we will change the
    layout to a more portable one.</li>
    </ol>
    Adding Components to the Panel
    In this section, we finish laying out a prototype UI. We will add polish and
    portability to the UI later.</p>
    <ol>
    [*]In the Component Palette, select the Swing tab.
    </li>
    [*]Select the <TT>JTextField</tt> component, which looks like a text field
    with a cursor.
    </li>
    [*]In your panel, click and drag the cursor to outline the text field.
    Don't worry if the text field doesn't have exactly the right size or position.
    We will adjust these later.
    The Property Inspector now displays attributes of the JTextField.
    </li>
    [*]In the Property Inspector, change the name (just as you did for the
    JPanel) to <TT>displayField</tt>.
    </li>
    [*]Change the text to nothing (erase the value that is already there).
    </li>
    [*]In the Component Palette, select the <TT>JButton</tt> component, which looks
    like a button being clicked.
    </li>
    [*]In your panel, click and drag the cursor to outline the button.
    The Property Inspector now displays attributes of the JButton.
    </li>
    [*]In the Property Inspector, change the name and action command
    to helloButton.
    </li>
    [*]Change the text to <TT>Say Hello!</tt>.
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Wiring Up the UI
    In this section, we wire the UI so that clicking the button causes "Hello
    World!" to display in the text field.</p>
    <ol>
    [*]In the Property Inspector, select the Events tab.
    </li>
    [*]Click the box next to the Action Performed field and press the Enter
    key.
    This creates a method, <TT>helloButton_actionPerformed()</tt>, which will
    be invoked when the button is clicked, and displays the source code for the
    method stub in the viewer.
    </li>
    [*]In the viewer, add the following command to the body of the method:
    <TT>displayField.setText("Hello World!");</tt>
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Testing the Prototype Application
    <ol>
    [*]Choose Run | Run "HelloApp".
    Your application appears, with a blank text field and a button labeled "Say
    Hello!"
    </li>
    [*]Click the button.
    The text "Hello World!" appears in the text field.
    </li>
    [*]Close your application.</li>
    </ol>
    Refining the UI
    In this section, we polish the UI so that the components have the right size
    and alignment, the text in the text field shows up red, and the panel uses the
    portable GridBag layout instead of the JDeveloper-specific XYLayout.</p>
    <ol>
    [*]In the viewer, select the Design tab.
    </li>
    [*]Select your text field.
    </li>
    [*]Drag the edges of your text field until it is the size you want.
    </li>
    [*]Drag the center of the text field until it is the vertical position you
    want.
    </li>
    [*]Right-click the text field and choose Align Center.
    This centers your text field horizontally in the frame.
    </li>
    [*]In the property inspector, click the box next to the foreground field.
    </li>
    [*]Click the ellipses (...).
    A color editor appears.
    </li>
    [*]Select Red from the dropdown list.
    </li>
    [*]Click OK.
    </li>
    [*]On your frame, select your button.
    </li>
    [*]Drag the right edge of your button until it is the horizontal size you want.
    </li>
    [*]Select your text field, and multi-select your button by control-clicking
    it.
    </li>
    [*]Right-click your button or text field.
    </li>
    [*]Choose Same Size Vertical.
    This sets the height of all selected components to that of the first selected
    component (the text field).
    </li>
    [*]Right-click your button or text field.
    </li>
    [*]Choose Align Center.
    This aligns the center of all selected components to that of the first selected
    component (the text field).
    </li>
    [*]Select your panel by clicking anywhere on the grey background in the visual
    designer.
    </li>
    [*]In the Property Inspector, click the box beside the layout field.
    </li>
    [*]Select GridBagLayout from the dropdown list.
    </li>
    [*]Choose File | Save All.</li>
    </ol>
    Running the Finished Application From Within JDeveloper
    <ol>
    [*]Choose Run | Run "HelloApp".
    Your application appears, with a blank text field and a button labeled "Say
    Hello!"
    </li>
    [*]Click the button.
    The text "Hello World!" appears in the text field, in red.
    </li>
    [*]Close your application.</li>
    </ol>
    Deploying the Application to Your File System
    <ol>
    [*] In the Navigator, right-click <tt>HelloGui.jpr</tt> and choose New Deployment
    Profile.
    The Deployment Profile Wizard opens.
    </li>
    [*]If the Welcome page appears, click Next.
    </li>
    [*]On the Delivery page, select Web Application or Command-Line Application
    from the dropdown list, and click Next.
    </li>
    [*]On the Staging Area page, in the Deployment Destination field, enter
    <tt><JDeveloper>/HelloGui</tt>, where <tt><JDeveloper></tt>
    is your JDeveloper root directory. Click Next.
    </li>
    [*]On the Project page, select all the <tt>.java</tt> files and click Next.
    </li>
    [*]Skip the Archive page and Applet Tags page by clicking Next on each.
    </li>
    [*]On the Libraries page, shuttle all libraries from the Project Libraries
    list to the Deployed Libraries list, and click Next.
    </li>
    [*]On the Finish page, name the profile <tt>HelloGui.prf</tt>, and click Finish.
    </li>
    [*]When JDeveloper asks you if you want to deploy now, click Yes.</li>
    </ol>
    JDeveloper will archive your application files and copy this archive and all
    other required libraries to <tt><JDeveloper>/HelloGui</tt>.</p>
    Running the Application from the Command Line
    <ol>
    [*]Open a command-line prompt.
    </li>
    [*]Enter the following script.
    Note: You may want to create a batch file containing this script. Be
    sure to replace JDeveloper_Home with your JDeveloper home directory.
    <pre>set __CLASSPATH_ROOT_DIR__=JDeveloper_Home\HelloGui
    set CLASSPATH="%__CLASSPATH_ROOT_DIR__%\HelloGui.jar"
    set CLASSPATH=%CLASSPATH%;"%__CLASSPATH_ROOT_DIR__%\xmlparserv2.jar"
    set CLASSPATH=%CLASSPATH%;"%__CLASSPATH_ROOT_DIR__%\classes12.zip"
    set CLASSPATH=%CLASSPATH%;"%__CLASSPATH_ROOT_DIR__%\jdev-rt.zip"
    set CLASSPATH=%CLASSPATH%;"%__CLASSPATH_ROOT_DIR__%\swingall.jar"
    cd JDeveloper_Home\HelloGui
    jre -cp %CLASSPATH% helloGui.HelloApp</pre>
    </li>
    [*]Your application appears, with a blank text field and a button labeled "Say
    Hello!"
    </li>
    [*]Click the button.
    The text "Hello World!" appears in the text field, in red.
    </li>
    [*]Close your application.</li>
    </ol>
    </p>
    </p><HR></BLOCKQUOTE>
    null

Maybe you are looking for

  • No display of error message log in dialog box

    Dear MM Experts, During enter incoming invoice (MIRO), when we click simulate after entering all necessary data, all error & warning messages are displayed in a dialog box if there is red traffic light. In our case despite red traffic light error mes

  • Message Centre Number on N96.....

    I have recently bought a new N96 on a vodafone contract, and as i was previously on 02 i had to wait a few days for them to transfer my number over.... My number then got transfered over yesterday and i then went to send a text message and it asked f

  • Mavericks facebook contacts sync issue

    i just updated my macbook retina to "Mavericks" , after syncing all of my facebook contacts are gone. is anyone having the same issue?

  • Has anyone had trouble transferring unwatched rented films from iPhone 4S back to their Mac's then finding its disappeared?

    Has anyone had trouble transferring unwatched rented films from iPhone 4S back to their Mac's then finding its disappeared? Originally rented on my Mac, transfered to iphone no problem - had 1 day 1 hour left to watch it, decided to watch on mac scre

  • Parallel Sequence

    Hi, I have defined a parallel sequence for a material in routing. Say material has 4 operations 0010, 0020, 0030, 0040. I am having 4 diff work centers for the four operations. Now the output of the 2nd operation 100 and the capacity of the 3 workcen