How to compile ejb home class?

hi, recently i download a program and compile in native machine , and some error happened.The home class is :
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
public interface Converter extends EJBObject {
public double dollarToYen(double dollars) throws
RemoteException;
public double yenToEuro(double yen) throws RemoteException;
when I compile this program, the jvm notice that the javax.ejb can not find. I have set class_path which like this:
class_path=.;..;c:\jdk1.3\lib;c:\jdkee1.3\lib;
Is there any one who so kind to help me ? Thanks at advance.

Uh, that class path should be:
classpath=.;..;c:\jdkee1.3\lib\j2ee.jar;
If you specify a directory, Java will search for class files in that directory; if you specify an archive (zip or jar) Java will search for class files in the archive. The class files you need reside in the two archives c:\jdk1.3\lib\rt.jar and c:\jdkee1.3\lib\j2ee.jar. rt.jar is normally decided (and automatically included in the class path) by the JVM you are running, so better leave it out.

Similar Messages

  • How to compile .java to .class in .jar file

    Hey. I have code to make a .jar file, read .java files, and save them as .class files in the .jar file. When I open the .jar file, it says that the magic numbers on the classes are wrong. So I figured that Java must compile the .java files to .class files in bytecode.
    Question: What's the code to compile a string from a .java file to a .class file?
    Here's my code:
    try {
                // Name of jar file to write
                String archiveFile = Name + ".jar";
                Manifest jman = new Manifest();
                try {
                    // Create a manifest from a file
                    //InputStream fis = new FileInputStream("manifestfile");
                    //Manifest manifest = new Manifest(fis);
                    // Construct a string version of a manifest
                    StringBuffer sbuf = new StringBuffer();
                    sbuf.append("Manifest-Version: 1.0\n");
                    sbuf.append("Ant-Version: Apache Ant 1.7.1\n");
                    sbuf.append("Created-By: 1.5.0_19-137 (Apple Inc.)\n");
                    sbuf.append("Main-Class: Main\n");
                    sbuf.append("Class-Path: lib/swing-layout-1.0.3.jar\n");
                    sbuf.append("X-COMMENT: Main-Class will be added automatically by build\n");
                    // Convert the string to a input stream
                    InputStream is = new ByteArrayInputStream(sbuf.toString().getBytes("UTF-8"));
                    // Create the manifest
                    jman = new Manifest(is);
                } catch (IOException e) {
                FileOutputStream stream = new FileOutputStream(archiveFile, true);// archive file is jar file name
                JarOutputStream out = new JarOutputStream(stream, jman);
                out.putNextEntry(new JarEntry("Main.class"));
                StringBuffer sbuf = new StringBuffer();
                sbuf.append(readTextFromJar("Main.txt")));
                out.write(sbuf.toString().getBytes("UTF-8"));
                out.closeEntry();
                out.putNextEntry(new JarEntry("MainScreen.class"));
                sbuf = new StringBuffer();
                sbuf.append(readTextFromJar("MainScreen.txt"));
                out.write(sbuf.toString().getBytes("UTF-8"));
                out.closeEntry();
                out.putNextEntry(new JarEntry("GCanvas.class"));
                sbuf = new StringBuffer();
                sbuf.append(readTextFromJar("GCanvas.txt"));
                out.write(sbuf.toString().getBytes("UTF-8"));
                out.closeEntry();
                out.close();
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(this, ex.toString(), "BUG!", JOptionPane.INFORMATION_MESSAGE);
                ex.printStackTrace();
            }Thanks,
    -Gandolf

    So I'm guessing that none of you guys have the knowledge on how to compile a java application within a java application. I was thinking that it had something to do with javac... but I'm unsure.
    If no one can answer the question, could someone point me to an expert who would know?
    -Gandolf

  • How to compile the Java classes generated in JAXB

    I am using Windows 2000 Operating System. I found a xjc
    batch file on the sun's java forum.
    I used that to generate classes from XML. After generating
    the classes I could not compile
    the classes each depends on other AND THEY REQUIRE BOTH
    CLASS FILES.
    I will attach the schema file and dtd . Can you explaine me the problem.
    #<transactions.dtd>
    <?xml version="1.0" encoding="UTF-8"?>
    <!ELEMENT transactions (cardtocard*)>
    <!ELEMENT cardtocard (tocard, fromcard, fromcardver, amount, transdate, transid)
    >
    <!ELEMENT tocard (#PCDATA)>
    <!ELEMENT fromcard (#PCDATA)>
    <!ELEMENT fromcardver (#PCDATA)>
    <!ELEMENT amount (#PCDATA)>
    <!ELEMENT transdate (#PCDATA)>
    <!ELEMENT transid (#PCDATA)>
    transactions.xjs
    <xml-java-binding-schema>
    <element name="transactions" type="class" root="true"/>
    <element name="cardtocard" type="class"/>
    </xml-java-binding-schema>
    XML file
    ?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XML Spy v4.4 U (http://www.xmlspy.com)-->
    <transactions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="C:\My Documents\Xml\SVTConcord.xsd">
    <cardtocard>
    <tocard>1111222233334444</tocard>
    <fromcard>6666777788889999</fromcard>
    <fromcardver>567</fromcardver>
    <amount>100.00</amount>
    <transdate>2002-06-04 00:00:00.000</transdate>
    <transid>1111222202</transid>
    </cardtocard>
    </transactions>
    the XJC compiler for windows is
    @echo off
    echo JAXB Schema Compiler
    echo --------------------
    if "%JAVA_HOME%" == "" goto errorJVM
    if "%JAXB_HOME%" == "" goto errorJAXB
    set JAXB_LIB=%JAXB_HOME%\lib
    set JAXB_CLASSES=%JAXB_HOME%\classes
    echo %JAVA_HOME%\bin\java.exe -jar %JAXB_LIB%\jaxb-xjc-1.0-ea.jar %1 %2 %3 %4 %5
    %JAVA_HOME%\bin\java.exe -jar %JAXB_LIB%\jaxb-xjc-1.0-ea.jar %1 %2 %3 %4 %5
    goto end
    :errorJVM
    echo ERROR: JAVA_HOME not found in your environment.
    echo Please, set the JAVA_HOME variable in your environment to match the
    echo location of the Java Virtual Machine you want to use.
    echo For example:
    echo set JAVA_HOME=c:\jdk1.4.0_01
    goto end
    :errorJAXB
    echo ERROR: JAXB_HOME not found in your environment.
    echo Please, set the JAXB_HOME variable in your environment to match the
    echo location of the JAXB installation directory.
    echo For example:
    echo set JAXB_HOME=c:\jdk1.4.0_01\jaxb-1.0-ea
    :end

    When you compile the generated classes, be sure to put jaxb-rt-1.0-ea.jar in your classpath!

  • How to compile .ejb files

    Hi,
    I want to compile .ejb files generated through weblogic workshop 8.1, jar it and need to deploy it through Ant scripts(all three tasks). Can anyone help me in doing that?
    Thanks,
    Adwitiya Nigam...

    Compile with javac task.
    <javac classpath="" destdir="" includes="" srcdir=""/>
    Create a jar file with the jar task.
    <jar basedir="${build}" includes="" jarfile="ejb.jar"/>
    Copy jar file to the deploy directoy applications.
    <copy file="${dist}/ejb.jar" todir="${weblogic.deploy.dir}"/>

  • How to compile a java class via SQL?

    Hello,
    What is the pl/sql command-line syntax for compiling a java class uploaded to the database?
    I'm looking for a command i can use to compile some java code manually similar to:
    ALTER TRIGGER SCHEMA.TRG_MYTRIGGER COMPILE;
    Thanks

    could try dynamic code generation, cglib, asm, eg
    http://68.142.231.85/myresults/mycache?u=http%3A%2F%2F
    www2.sys-con.com%2FITSG%2Fvirtualcd%2FJava%2Farchives%
    2F0702%2Frichards&docid=FToU9dUOIw4HRHa%2F26Zi5Q&.intl
    =us&.done=http%3A%2F%2Fmyweb.yahoo.com%2Fmyweb%3Fei%3D
    UTF-8%26tag%3Dcode%2Bgenerationhmmmm, yes, bytecode generation is so much simpler, isn't it :-)

  • How to compile EJB 3.0 in command line

    Dear all,
    I want to know how to using command line to compile the EJB 3.0 bean.
    I have a set of source written in EJB 3.0, if i put in NetBeans and help me to build a ear, it works.
    But when i try to using command mode , it has problem.
    The Step to compile:
    1) Compile the source, all can compile .javac -d . -classpath %JAVAEE_HOME%\lib\javaee.jar;. ..\src\foo\*.java
    2) using the same "META-INF" that compiled by netbeans, include with the compiled class and build an jar file
    3) build a ear
    How ever when i deploy to glassfish 2.0
    It prompts me the descriptor error, cannot deploy to server.
    Can anyone tell me which step is missing ?
    Thanks
    Best Regard,
    Ben

    As long as you are not more specific about the steps you take to verify that the ears are the same, I cannot offer any more help. All I can say is: your assumption is wrong, because if they were the same, it would work. Simple logic is usually the best.

  • Problem in compiling ejb home interface

    i am starting work on ejbs .the first thing i want to know is how to find an ejb api.I have searched the whole of java site but without success.
    can anyone help me start on with ejbs.
    Thank you.

    there is book on the web, the author name is ed roman, it is free on the web, search in the search engine. www.google.com. this book will definitely help you
    kiran

  • EJB home stubs in a cluster

    The following URL describes how replica-aware EJB home stubs work. Basically,
    when you do a lookup for the EJB home in JNDI, you get a home stub on any of the
    nodes in the cluster.
    However, I want to invoke EJBs on a particular node in the cluster. Can I do
    this by simply disabling the replica-aware EJB home in the deployment descriptor
    and doing a remote JNDI lookup on the desired node in the cluster? And if so,
    would I have to bind each EJB's home to JNDI with a different name?
    -reza
    http://edocs.bea.com/wls/docs61/cluster/object.html#1006777
    All bean homes can be clustered. When a bean is deployed on a server, its home
    is bound into the cluster-wide naming service.
    Because homes can be clustered, each server can bind an instance of the home under
    the same name. When a client looks up this home, it gets a replica-aware stub
    that has a reference to the home on each server that deployed the bean. When create()
    or find() is called, the replica-aware stub routes the call to one of the replicas.
    The home replica receives the find() results or creates an instance of the bean
    on this server.

    However, I want to invoke EJBs on a particular node in the cluster. Can Ido
    this by simply disabling the replica-aware EJB home in the deploymentdescriptor
    and doing a remote JNDI lookup on the desired node in the cluster? Andif so,
    would I have to bind each EJB's home to JNDI with a different name?Yes. Something like that. We do that with JMS queues sometimes (to send a
    message to a particular machine in the cluster).
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Behforooz" <[email protected]> wrote in message
    news:3c8fc8bf$[email protected]..
    >

  • How can Client get a ejb remoteinterface class through ejbhomeinterface?

    HI,I've got ejbhomeinterface class(ejbhomeinterface class is on my local machine),How can i get ejb remoteinterface class(it is on remote app server) ? I've tried
    getEJBMetaData() method, but throw class not found exception,pls help me,thank you very much!!
    Object ejbObj = null;
    Class remoteClass = null;
    EJBHome aHome = null;
    try{
    aHome = (EJBHome) javax.rmi.PortableRemoteObject.narrow(aHome, EJBHome.class);
    EJBMetaData metaData = aHome.getEJBMetaData();
    // Class homeClass = metaData.getHomeInterfaceClass();
    aHome = metaData.getEJBHome();
    remoteClass = metaData.getRemoteInterfaceClass();
    //following code i want use remoteClass invoke remote ejb mothod
    }catch(Exception e)

    may be you need create InitialContext first, than from InitialContext lookup Home interface. And than using home.create() get RemoteInterface and use it.

  • How to compile and register a Java CFX tag with multiple class files?

    All-
    If this is the wrong forum for CFX questions, please let me
    know.
    I need to determine how to compile and register a Java CFX
    tag that contains multiple class files. One class file implements
    the CustomTag interface and the other class files implement various
    supporting classes. All of the documentation that I have found
    talks about using a single class file. I am assuming that a JAR
    file will be involved, but I am not sure of the specifics.
    Thanks in advance for your help.
    -Josh

    Yes, it will involve a jar. Use your java IDE (eclipse,
    etcetera ..) to create a jar containing all of the classes. Check
    your ide's documentation for how to create jar files. After you
    have created the jar, place the jar in the CF class path so CF will
    recognize it. For example the {cf_root}/WEB-INF/lib directory. CF
    must be restarted before it will detect the new jar. After
    restarting CF, register the CFX tag in the ColdFusion Administrator
    using the name of the class that implements the CustomTag
    interface.
    Though it is worth noting you can also instantiate java
    classes directly from ColdFusion (ie without using a CFX
    tag).

  • How to compile a class from a Servlet using ant!!!

    Hi I have the following problem:
    I have a Servlet that must compile a java class.
    Here is the code that i use to compile:
    File buildFile = new File(build.xml path);
    String[] arg = { "-buildfile", buildFile.toString(), "compile" };
    Properties userProps = null;
    ClassLoader loader = ClassLoader.getSystemClassLoader();
    Main.start(arg, userProps, loader);
    The build.xml file was written correctly, infact if i lunch the command ant by dos it is correctly done.
    When I put my application in tomcat/webapps and try to compile with code above I have the following error:
    BUILD FAILED C:\......: Could not create task or type of type: property.
    Ant could not find the task or a class this task relies upon.
    This is common and has a number of causes; the usual
    solutions are to read the manual pages then download and
    install needed JAR files, or fix the build file:
    - You have misspelt 'property'.
    Fix: check your spelling.
    - The task needs an external JAR file to execute
    and this is not found at the right place in the classpath.
    Fix: check the documentation for dependencies.
    Fix: declare the task.
    - The task is an Ant optional task and the JAR file and/or libraries implementing the functionality were not found at the time you yourself built your installation of Ant from the Ant sources.
    Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the task and make sure it contains more than merely a META-INF/MANIFEST.MF.
    If all it contains is the manifest, then rebuild Ant with the needed libraries present in ${ant.home}/lib/optional/ , or alternatively,
    download a pre-built release version from apache.org
    - The build file was written for a later version of Ant Fix: upgrade to at least the latest release version of Ant
    - The task is not an Ant core or optional task and needs to be declared using <taskdef>.
    - You are attempting to use a task defined using <presetdef> or <macrodef> but have spelt wrong or not defined it at the point of use
    Remember that for JAR files to be visible to Ant tasks implemented in ANT_HOME/lib, the files must be in the same directory or on the classpath
    Please neither file bug reports on this problem, nor email the Ant mailing lists, until all of these causes have been explored, as this is not an Ant bug.

    Java code Snippet
    import org.apache.tools.ant.*;// ant.jar
    String SourceDir="c:\java";
         String DestinationDir="c:\classes";
         Project project = new Project();
         try
    String baseDir = getServletContext().getRealPath( "/WEB-INF/build/");//Build.xml should be in this folder or else make use of the build folder here
         File buildFile = new File( baseDir, "build.xml");
         project.setUserProperty( "SourceDir", SourceDir);
         project.setUserProperty( "DestinationDir", DestinationDir);
         project.setUserProperty( "ant.file", buildFile.getAbsolutePath());
         project.setBaseDir( new File( baseDir));
         project.init();
         ProjectHelper.configureProject( project, buildFile);
         project.executeTarget(project.getDefaultTarget());
         catch (Exception e)
    Build.xml
    <?xml version="1.0"?>
    <project name="Sample" default="compile" basedir=".">
         <property name="SrcDir" value="${SourceDir}"/>
         <property name="DestnDir" value="${DestinationDir}"/>
         <target name="compile">
              <javac srcdir="${SrcDir}" destdir="${DestnDir">
                   <classpath > <!-- If any supporting jars required to compile the file add this-->
                        <fileset dir="${SrcDir}" includes="*.jar" />
                   </classpath>
              </javac>
         </target>
    </project>

  • Java6: How to compile java using JavaCompiler class

    Hi all,
    Using JavaCompiler, we can run the java program thru programmaticaly using run() method.
    Could anyone please tell me how to compile a java program using JavaCompailer class? Or calling run() itself will compile java file?
    Thanks
    Shagil

    import spoon.support.input.SpoonInputStream;
    import com.sun.tools.javac.code.Symbol.ClassSymbol;
    import com.sun.tools.javac.comp.Attr;
    import com.sun.tools.javac.comp.AttrContext;
    import com.sun.tools.javac.comp.Enter;
    import com.sun.tools.javac.comp.Env;
    import com.sun.tools.javac.comp.Todo;
    import com.sun.tools.javac.tree.Tree;
    import com.sun.tools.javac.tree.Tree.ClassDef;
    import com.sun.tools.javac.tree.Tree.TopLevel;
    import com.sun.tools.javac.util.Abort;
    import com.sun.tools.javac.util.Context;
    import com.sun.tools.javac.util.List;
    import com.sun.tools.javac.util.ListBuffer;
    import com.sun.tools.javac.util.Log;
    import com.sun.tools.javac.util.Name;
    * The Spoon compiler (uses javac).
    public class SpoonCompiler extends com.sun.tools.javac.main.JavaCompiler {
         Attr attr;
         Enter enter;
         boolean hasBeenUsed = false;
         Log log;
         Todo todo;
         public SpoonCompiler(Context arg0) {
              super(arg0);
              enter = Enter.instance(arg0);
              todo = Todo.instance(arg0);
              log = Log.instance(arg0);
              attr = Attr.instance(arg0);
              sourceOutput=true;
          * Main method: compile a list of files, return all compiled classes
          * @param filenames
          *            The names of all files to be compiled.
         @SuppressWarnings("unused")
         public List<Tree> parseAndAttribute(List<SpoonInputStream> filenames)
                   throws Throwable {
              // as a JavaCompiler can only be used once, throw an exception if
              // it has been used before.
              assert !hasBeenUsed : "attempt to reuse JavaCompiler";
              hasBeenUsed = true;
              long msec = System.currentTimeMillis();
              ListBuffer<ClassSymbol> classes = new ListBuffer<ClassSymbol>();
              try {
                   // parse all files
                   ListBuffer<Tree> trees = new ListBuffer<Tree>();
                   for (List<SpoonInputStream> l = filenames; l.nonEmpty(); l = l.tail) {
                        trees.append(parse(l.head.getFileName(),l.head.getStream()));
                   // enter symbols for all files
                   List<Tree> roots = trees.toList();
                   if (errorCount() == 0)
                        enter.main(roots);
                   // If generating source, remember the classes declared in
                   // the original compilation units listed on the command line.
                   List<ClassDef> rootClasses = null;
                   if (sourceOutput || stubOutput) {
                        ListBuffer<ClassDef> cdefs = new ListBuffer<ClassDef>();
                        for (List<Tree> l = roots; l.nonEmpty(); l = l.tail) {
                             for (List<Tree> defs = ((TopLevel) l.head).defs; defs
                                       .nonEmpty(); defs = defs.tail) {
                                  if (defs.head instanceof ClassDef)
                                       cdefs.append((ClassDef) defs.head);
                        rootClasses = cdefs.toList();
                   while (todo.nonEmpty()) {
                        Env<AttrContext> env = todo.next();
                        // save tree prior to rewriting
                        Tree untranslated = env.tree;
                        // attribution phase
                        if (verbose)
                             printVerbose("checking.attribution", env.enclClass.sym);
                        Name prev = log.useSource(env.enclClass.sym.sourcefile);
                        attr.attribClass(env.tree.pos, env.enclClass.sym);
                   return trees.toList();
              } catch (Abort ex) {
                   ex.printStackTrace();
              if (verbose)
                   printVerbose("total", Long.toString(System.currentTimeMillis()
                             - msec));
              int errCount = errorCount();
              if (errCount == 1)
                   printerCount("error", errCount);
              else
                   printerCount("error.plural", errCount);
              if (log.nwarnings == 1)
                   printerCount("warn", log.nwarnings);
              else
                   printerCount("warn.plural", log.nwarnings);
              return null;
         private void printerCount(String str, int val) {
              System.err.println(str + " - " + val);
         private void printVerbose(String arg0, Object obj) {
              System.out.println(arg0 + " - " + obj.toString());
    --- NEW FILE: CtBuilder.java ---
    package spoon.support.builder;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    import java.util.Stack;
    import java.util.TreeSet;
    import spoon.query.Query;
    import spoon.query.TypeFilter;
    import spoon.reflect.CtFactory;
    import spoon.reflect.code.BinaryOperatorKind;
    import spoon.reflect.code.CtAbstractInvocation;
    import spoon.reflect.code.CtArrayAccess;
    import spoon.reflect.code.CtAssert;
    import spoon.reflect.code.CtAssignment;
    import spoon.reflect.code.CtBinaryOperator;
    [...1760 lines suppressed...]
                var.setSimpleName(tree.sym.name.toString());
                var.setModifiers(getModifiers(tree.mods.flags));
                enter(var, tree);
                scan(tree.init);
                exit(var, tree);
        @Override
        public void visitWhileLoop(WhileLoop tree) {
            CtWhile whileLoop = new CtWhileImpl();
            enter(whileLoop, tree);
            builderContext.loopParameter = 1;
            scan(tree.cond);
            builderContext.loopParameter = 0;
            scan(tree.body);
            exit(whileLoop, tree);
    }

  • How to compile package which contain class outside the package

    I am writing a JDBC driver.
    I have the following package structure in the folder:
    MyDriver
        |_manager.jar
        |_com
               |_ jdbc
                       |_ HXDriver
                       |_ HXConnection
                       |_ HXResultSet
                       |_ HXStatementIn manager.jar, there is a remote object Interaface(Manager.java) which I need to use inside HXConnection.
    My question is how to compile(or/and how to set the classpath)so that I can compile the 4 classes inside jdbc package.
    I tried this:
    C:\MyDriver>javac -cp .;manager.jar com/hx/jdbc/*.java
    However, this does not work, compiler says it cannot find Manager
    Please help me.
    Cheers

    D:\380 Project\Driver>javac -cp .;manager.jar com\hx\jdbc\*.java
    com\hx\jdbc\HXConnection.java:21: cannot find symbol
    symbol  : class Manager
    location: class com.hx.jdbc.HXConnection
            private Manager manager;
                    ^
    com\hx\jdbc\HXStatement.java:18: cannot find symbol
    symbol  : class Manager
    location: class com.hx.jdbc.HXStatement
            private Manager manager;
                    ^
    com\hx\jdbc\HXStatement.java:20: cannot find symbol
    symbol  : class Manager
    location: class com.hx.jdbc.HXStatement
            public HXStatement(Manager manager){
                               ^
    com\hx\jdbc\HXConnection.java:41: cannot find symbol
    symbol  : class Manager
    location: class com.hx.jdbc.HXConnection
                            manager = (Manager)reg.lookup("manager");
                                       ^

  • How to avoid restart weblogic after I modify EJB implementation class?

    I am sure I redeploy my application after I modify EJB implementation class. It
    is unacceptable to restart weblogic server if I changed some EJB . Is there any
    way to avoid this?
    Thanks!

    I would open a case with BEA support. I would take a look at it, but I'm going
    on vacation :(
    pat
    "CottonXu" <[email protected]> wrote:
    >
    My WLS version is 7.0 and I use weblogic console to redeploy the entire
    application.
    I am sure that EJBs are not in classpath.
    What should I do ?
    "Pat Bumpus" <[email protected]> wrote:
    Hi,
    I haven't seen this behavior. My EJBs seem to redeploy and pick upthe
    EJB bean
    changes. Make sure that your EJB is not in the system classpath that
    could cause
    this problem.
    What version of WLS?
    How are you deploying the EJB?
    pat
    "CottonXu" <[email protected]> wrote:
    I am sure I redeploy my application after I modify EJB implementation
    class. It
    is unacceptable to restart weblogic server if I changed some EJB .
    Is
    there any
    way to avoid this?
    Thanks!

  • Eclipse, How to compiled a class !

    Hi everyone, I started JAVA programming today, and I've done the first tutorial, the famous Hello World.
    Firstly I created my JAVA project, a package, and finally I created a class !
    In my class I wrote :
    package helloWorld;
    *public class HelloWorld {*
    *     * @param args*
    *     public static void main(String[] args) {*
    *          // TODO Auto-generated method stub*
    I know that I have to write : system.out.println("Hello world!!!");,
    I've already wrote it.
    My class is save with .java extension
    I would like to know how to compile my project to see if it work.
    I'm working with Eclipse on a mac
    Thanks for your help
    Henri

    Henri90 wrote:
    Ok, thank you for helping me ! I have another question, How can I fill the method to see my hello world ? I just have to fill the brackets between the strings and argument ?The code you want executed when the program runs is places inside the main() method. Where the //TODO comment is at present.
    You must make sure that the java source file has the filename of the class name plus .java.
    The source file has to be in a directory with the name of the package. You compile it from the directory containing the package directory using the javac command.
    IDEs like Eclipse organize this stuff for you but for your first couple of programs compile from the command line, then you are much clearer about what's going on.

Maybe you are looking for

  • Mavericks 10.9.1 Killed my iTunes

    Hey, I installed Mavericks 10.9.1 a few hours ago and now itunes will open but just freezes and won't load. I just get the spinning wheel over the app until i force quit it. I have rebooted the machine to no avail. Anyone else having problems? I'm on

  • Syncing ipad and ihpone

    I have an iphone and an ipad. How do I sync the calendars on each.  I have mobile me.

  • Help me - getCustomDatum() function

    I am testing sample of intermedia on Oracle 9.2.0.1.0. I cannot test the sample because getCustomDatum() function is replaced by the new function, and I do not know use it. I am using ordim817.zip packet, I think it is used for Oracle 8.1.7. Please h

  • Illustrator CC 2014, nothing happens

    I just installed illustrator cc 2014 trail version, started with a fresh screen, clicked on join tool, pencil tool and nothing happens...please helps!!!

  • Access to User without Password

    A temporary employee (now gone forever) set up some workfiles on a non networked Mac in their own User - as the administrator can we access the User without the password (which we have buckley's of getting).