Problem to compile InsuranceLogin.java on NT

Hello,
When I do:
javac -classpath $CLASSPATH -d $ORACLE_HOME/ifs/custom_classes *.java
i have the following answer:
Can't find class sun/tools/javac/Main
Thank you for your answer
null

From previous postings, I'm assuming you're on NT. If you are on Solaris, you'll need to translate the following for your particular UNIX shell.
In you posting, you said you were using the following command:
javac -classpath $CLASSPATH -d $ORACLE_HOME/ifs/custom_classes *.java
This is a UNIX command (note the forward slashes and $ prefix for environment variables.)
The NT equivalent is:
javac -classpath %CLASSPATH% -d %ORACLE_HOME%/ifs/custom_classes *.java
The problem still stands that you may be missing needed Java Archives from your classpath. You can find a list of these in the iFS Developer Guide.
Try this... (you'll have to translate to your particular UNIX shell if you're on Solaris)
set ORACLE_HOME=D:\Oracle\Ora81
set CLASSPATH=%ORACLE_HOME%\ifs\jre\lib\javac.jar;%CLASSPATH%
set CLASSPATH=%ORACLE_HOME%\ifs\lib\adk.jar;%CLASSPATH%
set CLASSPATH=%ORACLE_HOME%\ifs\jws\lib\servlet.jar;%CLASSPATH%
set CLASSPATH=%ORACLE_HOME%\ifs\lib\repos.jar;%CLASSPATH%
set CLASSPATH=%IFS_BASE_CLASSPATH%;%CLASSPATH%
javac -classpath %CLASSPATH% -d %ORACLE_HOME%\ifs\custom_classes %ORACLE_HOME%\ifs\ifsdevkit\sampleapps\insurance\*.java
For the Web Command Login examples, substitute the last line for the following:
javac -classpath %CLASSPATH% -d %ORACLE_HOME%\ifs\custom_classes %ORACLE_HOME%\ifs\ifsdevkit\sampleapps\webcommand\src\oracle\ifs\adk\demo\WebCommandLogin.java

Similar Messages

  • Problem in compiling this java need help

    package test;
    public class simpleTest{
         public simpleTest(){
              int a =0;
    import test.*;
    public class testPackage{
         public static void main(String [] args){
              simpleTest sT=new simpleTest();
              System.out.println("Package from Test A value = "+a);
    }error got when compile this codes.
    --------------------Configuration: <Default>--------------------
    C:\Notes\testPackage.java:4: cannot access simpleTest
    bad class file: C:\Notes\simpleTest.java
    file does not contain class simpleTest
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    simpleTest sT=new simpleTest();
    ^
    1 error
    Process completed.

    package test;
    public class simpleTest{
    private int a;
         public simpleTest(int a){
              // int a =0;
    this.a = a;
    public int getA() {
    return a;
    =============== 2 diff files===================
    import test.*;
    public class testPackage{
         public static void main(String [] args){
              simpleTest sT=new simpleTest();
    System.out.println("Package from Test A value =
    = "+st.getA());
    }- Saishu can compile the java package?

  • Problem in compiling a java file

    hello...
    i placed all my java file in the folder C:\nmt
    and i run the following command to compile it...
    javac -sourcepath C:\nmt testabc.java
    now it showing an error..
    cannot read testabc.java
    javac -sourcepath C:\nmt -d C:\nmt testabc.java
    to produce the output in the C:\nmt folder but it shows the same message...pls tell what worng here??
    sam

    You don't have a testabc.java file in the directory.

  • Problem with compilation of HelloWorld.java

    hi,
    getting problem with compilation of HelloWorld.java
    CLASSPATH--- C:\java
    PATH--- C:\j2sdk1.4.2_04\bin
    HelloWorld.java source code in: C:\java
    On cmd prompt:
    C:\java>javac HelloWorld.java
    error: cannot read: HelloWorld.java
    1 error
    pls help me with this
    rgds,
    sanlearns

    What does this command yield?
    dir HelloWorld.java

  • Problem compilling a java file

    I've got problems using my jdk1.2 .
    When i try to compile a java file using ms-dos console or kawa program, appears this error text:
    Javaw.exe has generated an error it's gonna be closed by windows , you must restart the program.
    A error register is gonna be created.
    UI have to tell tha this is a free translation that the text appears in spanish.
    thanks a lot

    Maybe you should compile with javac.

  • Problem to compile .java class

    hi,
    i'm using/creating a package of classes....and as per my knowledge there is no need to write explicit import if u r importing/using an instance of class1 in other class2 in the same package.....
    I'm doing the same.....
    but the problem arrises here that....while compiling class2 the error occures..........
    D:\tomcat\webapps\Books\WEB-INF\classes\BookForm.java:6: cannot resolve symbol
    symbol : class Book
    location: class BookForm
         private Book book =new Book();
    why so????? as i have included the package in CLASSPATH also..........
    PLZ reply....
    .....Amita

    You don't need to import classes that are in the same package but they do need to be in the classpath. My guess is that you are compiling BookForm.java from the D:\tomcat\webapps\Books\WEB-INF\classes directory. Either add "D:\tomcat\webapps\Books\WEB-INF\classes" explicitly to your classpath or add a dot (".") to your classpath.

  • Problem in compiling j2me file

    Hello friends,
    friends my problem in compiling j2me file..
    when i compile my j2me file through WTK2.2 (toolkit)
    then it creates extra file including j2me" .class" file..
    for example if my j2me file is "aman.java" and when i compile it
    then it will covert into "aman.class" file but it creates one more file like "aman1$.class" ..plz help me to get out of this problem..coz its increase my j2me file size..
    thanks
    Aman

    That is an inner class in aman.java that you are seeing there.
    If you use inner anonymous classes, for example;
    public class MyMIDlet extends MIDlet {
       // code for the MIDlet
       // Anonymous inner class
       setCommandListener(new CommandListener() {
          public void commandAction(Command c, Displayable d) {
            // implementation;
            // may access MyMIDlet's private fields
    }then the command listener you create will become another class named MyMIDlet$1.class.
    In this example you can get rid of the inner class by making one of the existing classes implement that CommandListener interface:
    public class MyMIDlet extends MIDlet implmements CommandListener {
       public void commandAction(Command c, Displayable d) {
         // implementation;
         // may access MyMIDlet's private fields
       // code for the MIDlet
       // Instead of the anonymous inner class, we can now use MyMIDlet since it
       // implements CommandListener
       setCommandListener(this);
       // etc. etc. etc.
    }shmoove

  • Problem in compiling packages

    I am new to Java. I am currently using Java in developing a simple system. However, my system need to import other external classes.
    The main problem is i dont know how to compile this file when they are in separate folder (i am using windows). Let say the main .java is in one folder and other external .java in other folders. I knew this can be done with the use of package. the problem is when i try to compile, there is a problem.
    I used to refer from the below link for many times, but still cannot get it.
    http://java.sun.com/j2se/1.3/docs/tooldocs/win32/javac.html
    can anyone provide me the most simple way of:
    1. import from external classes into my main system
    e.g: import com.jrefinery.report.Element;
    2. how to compile all .java from different directory
    3. after i compile, i need the .class files place in other directory
    advanced thanks to those who able to provide help.
    Sosan

    Here's what I would do.
    1. Create a directory to hold my packaged classes. For example c:\myjava\classes.
    2. Create another directory to hold my source code. For example c:\myjava\source\project1. If you want to divide up the source code into multiple directories, that's ok.
    3. Before compiling, "cd c:\myjava\source"
    4. Compile with "javac -classpath c:\myjava\classes -d c:\myjava\classes project1\*.java project1\dir1\*.java" (This command assumes some of your .java files are in the dir1 directory.)
    The -d options means put the packaged classes into this directory. It will create directories as needed in the classes directory. For example com\jrefinery.

  • Problem in compiling with ant?

    Hi,
    I have problem with compiling using ant ..i have build file...and properly place directories.......
    C:/>ant build
    It's giving an error as "Exception in thread "main" java.lang.NoClassDefFoundError: build"
    can any one help me to solve this problem

    Cross-Post:
    http://forum.java.sun.com/thread.jspa?threadID=589924&tstart=0

  • Urgent! Pls help me! Can't compile any *.java files

    I am a new user to Java2SDK. I am using Win2K sever and I have installed Java2SDK1.4.0 in D drive. When I compile any *.java files, a message " 'javac' is not recognized as an internal or external command, operable program or batch file" appears. How can I solve this problem?
    Please help me. I am busy with my homework. Thank you very much.

    In your PATH variable include %JAVA_HOME%\bin;
    For example:
    C:\jdk1.4\bin;

  • Package problem when compiling

    Hi,
    I'm new to java. I'm using Win2000 and JDK1.3.1. I set the "c:\jdk1.3.1\bin" in the System's path. There are three java programs with their own package in the directory as follows:
    "pack.java" - under "c:\jdk1.3.1\bin\test", it will call pack1 & pack2.
    "pack1.java" - under "c:\jdk1.3.1\bin\test\sub1"
    "pack2.java" - under "c:\jdk1.3.1\bin\test\sub2"
    It's ok to compile "pack1.java" and "pack2.java" under their directory. But there is the compiling error for the "pack.java" under "c:\jdk1.3.1\bin\test", even though I've put the "import test.sub1.pack1;" and "import test.sub2.pack2;" in the code. The error were as follows:
    - cannot resolve symbol
    - symbol : class pack1
    - location: package sub1
    - import test.sub1.pack1;
    - cannot resolve symbol
    - symbol : class pack2
    - location: package sub2
    - import test.sub2.pack2;
    I'm not sure what the problem is with the package and/or the import statement. Can any experts help me?
    Thanks in advance.
    Hanna

    Hi all gurus,
    Thank you very much for the help!
    After adding the classpath "c:\jdk1.3.1\bin" to the System's setting, I can compile the "pack.java" under the "test" directory with the command "javac -classpath c:\jdk1.3.1\bin c:\jdk1.3.1\bin\test\pack.java". However, when I run "pack" with the command "java -classpath c:\jdk1.3.1\bin c:\jdk1.3.1\bin\test\pack", there is another error appears as follows, although the "pack.class" has been already there:
    - "Exception in thread "main" java.lang.NoClassDefFoundError: c:\jdk1/3/1\bin\test\pack"
    My "pack.java" code is below:
    package test;
    import test.sub1.pack1;
    import test.sub2.pack2;
    class pack{
    public static void main(String[] args){
    System.out.println("Starting pack");
    System.out.println("Instantiate obj of public classes in different packages");
    //Instantiate objects of pack1 and pack2 in different packages.
    new pack1();
    new pack2();
    System.out.println("Ending pack");
    What's wrong with them? Could you please help me on that?
    Thanks again!
    Hanna

  • How to compile in Java Source???

    Hello,
    I'm studying a way to compile java files to class files in the java source. I have use the sun.tools.javac.Main to do this, but I have noticed that it aint recomended to use. I also wan't to get the possible errors from the compiler (if java file was wrongly made). The problem using the sun.tools.javac.Main is that it won't guarantee that it works in every platform or in future releases of JDK. Does the JDK 1.4 even support it? (My IDE environment prevents to use JDK 1.4). So the question is: is there a way to compile on the fly (to memory or to class files)? Do I really have to run some external process that compiles the file and then try to get somehow possible errors? That seems to me litle too indecent to use. Any suggestions?
    Thanks,
    Petri Tuomaala

    Hi guys,
    I have also needed to compile Java source from within a Java application. Here is the best solution I came up with:
    Process proc = Runtime.getRuntime().exec( "
    C:\\Temp\\Jikes -bootclasspath C:\\jdk\\jre\\lib\\rt.jar C:\\Java\\com\\sts\\utility\\Utility.java" );
    BufferedReader br = new BufferedReader( new InputStreamReader( proc.getErrorStream() ) );
    String line = null;
    while( (line = br.readLine()) != null ) {
    System.out.println( line );
    proc.waitFor();
    I used Jikes http://oss.software.ibm.com/developerworks/opensource/jikes/ because it compiled my source quicker than Javac did - 250 millseconds for Jikes compared to 2750 milliseconds for Javac.

  • Problem while compiling Servlet

    M using Tomcat.
    Environment variables :
    Variable :::::::::::::::: Values
    %TOMCAT_HOME% ::::::::::: C:\Tomcat\bin
    CLASSPATH :::::::::::::::: .;C:\jdk 1.4.2\lib;C:\jsdk2.1 \servlet.jar;C:\Tomcat\lib\servlet.jar;
    PATH ::::::::::::::::::::: ;C:\jdk 1.4.2\bin
    JAVA_HOME :::::::::::::::: C:\jdk 1.4.2
    Now problem is that When m trying to compile GreetingServlet.java
    problems are:::
    GreetingServlet.java:31: cannot resolve symbol
    symbol : method Println (java.lang.String)
    location: class java.io.PrintWriter
    out .Println("<BODY>");
    ^
    GreetingServlet.java:32: cannot resolve symbol
    symbol : method Println (java.lang.String)
    location: class java.io.PrintWriter
    out .Println("<p>"+message +","+name+"</p>");
    ^
    GreetingServlet.java:33: cannot resolve symbol
    symbol : method Println (java.lang.String)
    location: class java.io.PrintWriter
    out .Println("<p> Thanks ("+email+")</p>");
    ^
    GreetingServlet.java:34: cannot resolve symbol
    symbol : method Println (java.lang.String)
    location: class java.io.PrintWriter
    out .Println("<p> -The Pro Java Team.</p>");
    ^
    GreetingServlet.java:35: cannot resolve symbol
    symbol : method Println (java.lang.String)
    location: class java.io.PrintWriter
    out .Println("</BODY>");
    ^
    GreetingServlet.java:36: cannot resolve symbol
    symbol : method Println (java.lang.String)
    location: class java.io.PrintWriter
    out .Println("</HTML>");
    ^
    Source Code:
    import javax.servlet.* ;
    import javax.servlet.http.* ;
    import java.io.* ;
    import java.util.* ;
    public class GreetingServlet extends HttpServlet{
    protected void doPost (HttpServletRequest request,
                   HttpServletResponse response)
                        throws ServletException, IOException {
         String name = request.getParameter ("name");
         String email = request.getParameter ("email");
         String message = null;
         GregorianCalendar calendar = new GregorianCalendar();
         if (calendar.get(Calendar.AM_PM) == Calendar.AM) {
              message =" Good Morning";
         else {
              message = " Good Afternoon";
         response.setContentType("text/html");
         PrintWriter out = response.getWriter();
         out .println("<HTML>");
         out .Println("<BODY>");
         out .Println("<p>"+message +","+name+"</p>");
         out .Println("<p> Thanks ("+email+")</p>");
         out .Println("<p> -The Pro Java Team.</p>");
         out .Println("</BODY>");
         out .Println("</HTML>");
         out .close();
    Thanks in Advance
    Please its an urjent.
    Hoping to get the solution soon from cream like you in Programming.

    hi
    it could be you have caps P.
    try:
    "println" instead of "Println".

  • How To Compile Within Java

    Hi Everybody,
    I have a serious problem. I want to compile a Java file withing another Java program, without using the "javac" command or this compiler. Is there any function or class which helps compile a Java source file created withing another Java Class file, So that the new Java source file will not be available to the outside world?
    Thanks,
    TechnoSam.

    I'm pretty sure that you can create a class in memory by passing it a stream of bytecode. From this you could create a new instance and then proceed as normal. However, you're going to need to know how to create that bytecode and I guess that you don't want to have to implement a 'virtual' compiler from scratch. I don't know of anything that can do this for you but I wouldn't be surprised to find that somebody's had a go in the past.
    Perhaps your requirements would be satisfied by compiling your dynamically created source using javac to a temp file and then deleting that once you had instantiated the object? This would do something like what I think that you're after but even then you would need to accept that others would be able to access your class definition by reverse-engineering your source-writing routine, (whether or not it was obsufacated).
    Can you say anymore about what you're trying to achieve?

  • Error when compiling SearchBean.jav

    IN the scheduler portlet installation steps using the latest JPDK 3.0.9.1, when compiling SearchBean.java i get the following error :
    D:\OiAS\Apache\Apache\htdocs\schedulerportlet>javac ConnectionParams.java
    D:\OiAS\Apache\Apache\htdocs\schedulerportlet>javac SearchBean.java
    SearchBean.java:607: Undefined variable or class name: ConnectionParams
    "(DESCRIPTION=(ADDRESS=(HOST="+ConnectionParams.s_hostName+")"+
    ^
    SearchBean.java:608: Undefined variable or class name: ConnectionParams
    "(PROTOCOL=tcp)(PORT="+ConnectionParams.s_portNumber+"))"+
    ^
    SearchBean.java:609: Undefined variable or class name: ConnectionParams
    "(CONNECT_DATA=(SID="+ConnectionParams.s_databaseSID+")))";
    ^
    3 errors
    D:\OiAS\Apache\Apache\htdocs\schedulerportlet>
    Can any one tell me the reason of these 3 errors ?
    please I need help
    null

    I've got exactly the same problem.
    Some advices would be nice.
    Thanks.

Maybe you are looking for