Executing java

I created an application using a builder tool, compiled it, and executed it successfully from the builder, but when I tried to execute it from the dos prompt:
java c:\mydir\myjavafile
...it didn't work.
Thanks in advance for your help.

make sure you put your JDK\bin directory correctly. You should wrote the whole path so soemone could help U.

Similar Messages

  • Error while executing java stored procedure from a pl/sql procedure

    We have a requirement where we need to execute JAVA code stored in an Oracle database (Java Stored Procedure). This code uses some JAR files which we have already loaded without any errors in the database.
    The class file was also loaded in the database without any errors. But when we execute the method of this class (JAVA code), it gives the following error:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.NoClassDefFoundError
    Is there any way of debugging the code and getting to know where exactly the problem is? Or, any tool/software available for doing the same.
    Any pointers would be of great help!
    Thanks in advance

    Hi Uday,
    My guess is that there is a problem with your java stored procedure that is causing the "ExceptionInInitializer" error to be thrown. According to the javadoc:
    is thrown to indicate that an exception occurred during
    evaluation of a static initializer or
    the initializer for a static variable
    Since I didn't see any of your code in your post, I can't help you much more, I'm afraid. Perhaps if you would provide some more details, I may be able to help you some more. I think the following details would be helpful:
    1. Complete error message and stack trace you are getting.
    2. The section of your java code that you think is causing the problem.
    3. Oracle database version you are using.
    Good Luck,
    Avi.

  • Execute Java Program in a specific time everyday

    Hi All,
    I need help for Execute Java Program in a specific time everyday.
    I want to do insert data into database every 3:00 AM everyday.
    I thought there is a one thread program will do. It is correct my understanding? Please let me know and guide me How can I do?
    Thanks
    Amit

    If you are using Window$ then you can create a bat file to execute the program and place the bat file in Scheduled Tasks.

  • Executing Java script while dragging a component

    Hi,
    Is there a way to execute Java script while dragging a component, I have noticed only following events mouseMove, mouseOut, mouseDown mouseUp for clientListener tag. could not find anything related to dragging event.
    My scenario is, I have componentDragSource to a component and I want fire a java script event on drag of that component.
    Please suggest. TIA.
    Thanks,
    Siva G.

    Hi Frank,
    Thanks for your response.
    Could you please give me some sample on that like what type of event and on which component I have to set clientListener.
    Thanks,
    Siva G.

  • Can't execute java from prompt command. . .

    hello!
    that's the following:
    I'm trying to execute
    "java Teste.class "
    from prompt command and it throws:
    Exceptio in thread "main" java.lang.NoClassDefFoundError
    in thread main. The Teste.java file is compiled finely using
    "javac Teste.java"
    My enviroment variables are cofigured this way:
    NAME: JAVA_HOME VALUE: C:\Arquivos de programas\Java\jdk1.5.0_03
    NAME: PATH VALUE: C:\Arquivos de programas\Java\jre1.5.0_03\bin
    NAME: CLASSPATH VALUE: C:\Arquivos de programas\Java\jre1.5.0_03\lib
    the vm and jdk directory is this:
    C:\Arquivos de programas\Java\jdk1.5.0_03
    C:\Arquivos de programas\Java\jre1.5.0_03
    and the Teste.java is:
    package teste;
    public class Teste{
        public Teste(){
            System.out.println("Testando, Testando, Testando");         
        public static void main(String[] args){
            Teste exe = new Teste();
    }So if you have any suggestion, please post it. Thanks!!

    Soneca,
    You're a complete idiot.
    Along with crossposting every question you have you often respond like this in threads. Just a complete jacka$$.
    I'll be sure to ignore you in future other than to point out your crossposts when I find them of course.
    This previous thread of yours (cross posted as always [in 4 forums!!!]) really is demonstrative of the fundamental deepness of your nitwittery
    http://forum.java.sun.com/thread.jspa?threadID=764824

  • Can't execute java from prompt command on xp. . .

    hello!
    that's the following:
    I'm trying to execute
    "java Teste.class "
    from prompt command and it throws:
    Exceptio in thread "main" java.lang.NoClassDefFoundError
    in thread main. The Teste.java file is compiled finely using
    "javac Teste.java"
    My enviroment variables are cofigured this way:
    NAME: JAVA_HOME VALUE: C:\Arquivos de programas\Java\jdk1.5.0_03
    NAME: PATH VALUE: C:\Arquivos de programas\Java\jre1.5.0_03\bin
    NAME: CLASSPATH VALUE: C:\Arquivos de programas\Java\jre1.5.0_03\lib
    the vm and jdk directory is this:
    C:\Arquivos de programas\Java\jdk1.5.0_03
    C:\Arquivos de programas\Java\jre1.5.0_03
    and the Teste.java is:
    package teste;
    public class Teste{
        public Teste(){
            System.out.println("Testando, Testando, Testando");         
        public static void main(String[] args){
            Teste exe = new Teste();
    }So if you have any suggestion, please post it. Thanks!!

    try
    java -cp <Location_of_Teste.class> Teste
    Message was edited by:
    sssow
    Message was edited by:
    sssow

  • Howto execute java jar file via html ?

    hi
    howto execute java jar file via html ?
    could someone pls post a html code ?
    kind regards
    upiter77

    hi
    howto execute java jar file via html ?You can't.
    could someone pls post a html code ?No. you can search for yourself and find the code you need.
    Now, it sounds to me like you're trying to build an Applet or do Web Start or something. In any event, you need...wait for it....Google! :-)

  • Execute java program on UNIX

    I have no experience on Unix and I now need to try to execute my java program on UNIX server to which I connect using telnet. I have copy my source file to the server and I could run the javac command to compile my source code.
    In the current directory, I just execute "javac mySource.java"
    And I got my .class file on the same directory. But when I tried to execute "java mySource", I got NoClassDefFoundError. I think it has something to do with classpath. But I just don't know how to do it in UNIX. Please someone assist me. Thanks.

    Or setenv CLASSPATH $CLASSPATH:/your/classpath/here if you are running csh.

  • Executing *.java using unix process

    Hi,
    I have a problem with executing *.java command using unixprocess in java class. My java code snippet contain like...
    Process p = Runtime.getRuntime().exec(command);
    where command= "/data1/oracle/product/10.1.3.1/OracleSOA/jdk/bin/javac -d /tmp/classes/createLOV/build /tmp/classes/createLOV/src/com/lovalias/packagename/pas/uws/master/interfaces/*.java"
    if we run that java file on unix OS..
    it gives error like
    error: cannot read: /tmp/classes/createLOV/src/com/lovalias/packagename/pas/uws/master/interfaces/*.java1 error
    if replace * with actual file name like ABC.java it is executing success fully..i think it is treating * as file name
    but i want execute list of sourcefiles from that directory..
    any body please give the solution...
    thanks in advance...

    Sounds like you either have a corrupt class file or you're using an older version of the JVM to try to execute classe that were compiled for a newer version.

  • Executing java in command prompt

    how can i execute java in cmd and log the result at the same time?
    as i'm hitting problem with the class that i remotely executed and do not know what happen at all :(
    thanks alot!!

    so does it mean .. java runapp > output c:/log >
    error ?? how i get the error message..
    thanks
    java RunApp > C:\log 2> C:\errorView the error file to see the error message.

  • How to execute java programs in xcode

    I cannot execute Java program in XCode for Mountain Lion 10.8.2. Please help me how to execute a Java program.

    Do you have a particular error or message or diagnostic or issue, or something that's particularly wrong with Xcode?  If installed, Java does work, and Java applications can be invoked.
    Background: Java was deprecated from OS X a while back, and Java itself was removed from the default OS X 10.8 installation.
    Given that Java is now an add-on for OS X, you'll want to check with Oracle — the owner of Java — for OS X kits and tools.
    I don't know off-hand if Xcode still particularly supports Java (it was pretty weak, when last I checked), but I'd expect you'll be using makefiles for the work, and I'd also suspect that whatever Java support remains in Xcode will probably be going away in some future version of Xcode.   (If support hasn't already disappeared.  You may be using bash build scripts and makefiles to deal with Java now, or going forward.)
    If you don't have access to the Apple developer forums and the discussions of tools available there, then the archives of the Apple Java-Dev mailing list can be a good spot to look for existing discussions, and to post questions related to Java development on OS X.
    As for IDEs other than Xcode,  Eclipse or NetBeans or IntelliJ IDEA, and BlueJ all run on OS X, and any of these would probably be a better long-term choices for Java development on OS X.

  • Execute Java Code on client

    Hello,
    how can i execute java code on clientside?

    I guess you will have to add an applet to the web page.
    http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/applet.html

  • Cannot Execute .java File..

    Hi,i'm really confused about this..it's so weird..
    i'm trying to execute (.java) file from another directory, but
    it can't,why? if i just compile that file from another directory
    there's no problem with that...
    ex : i have file named Hello.java which i save it on C:\Work
    i compile this file like this :
         C:\javac C:\Work\Hello.java
    there's no problem when i compile that file, but when i try to
    execute that file i got this messages :
    Exception in thread "main" java.lang.NoClassDefFoundError: C:\Work\Hello
    this is how i execute that file : C:\java C:\Work\Hello
    if i execute like this : C:\Work\java Hello, there's no problem..
    Why (.java) file cannot be execute from another directory...
    Thanks a lot..

    It considers the pathname to be part of the class name when you do it like that, and since you don't have a class named C:\Work\Hello (and can't, since you can't use colons or backslashes in the name), that's not gonna happen.
    Try this:
    java -classpath C:\Work\ Hello
    Note the space between C:\Work\ and Hello. Hope that helps :)

  • Cannot execute java.exe

    I'm really having a hard time here. I have installed, uninstalled and installed again SDK1.3.1. I've updated my autoexec.bat to look as follows and I still get cannot execute c:\jdk13\bin\java.exe when trying to do the -version command. I'm running Windows ME. Any suggestions????
    SET PROMPT=$p$g
    SET TEMP=C:\WINDOWS\TEMP
    SET TMP=C:\WINDOWS\TEMP
    SET COMSPEC=C:\WINDOWS\COMMAND.COM
    SET windir=C:\WINDOWS
    SET winbootdir=C:\WINDOWS
    SET PATH=C:\jdk13;C:\jdk13\bin;C:\jdk13\jre;C:\jdk13\lib;C:\jdk13\include;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\PROGRA~1\DELL\RESOLU~1\COMMON\BIN
    SET CLASSPATH=.;c:\jdk13\lib\tools.jar
    Thanks,
    Leeanne

    Didn't work :(:(:(:( I've even went to the bin directory and try to execute java -version from the directory and still get an error cannot execute c:\jdk13\bin\java.exe. I get the same error trying javac too. I really want to learn java, but not having much luck. Is there a problem with Windows ME and Java??
    Thanks!

  • How execute java project in DOS6.22 ?

    How execute java project in Dos6.22 ?
    if it possible
    thanks,
    Betzalel

    You might have problems with file name like *.java and *.class.
    As if I had heard about some JVM for 16-bit Windows (the next best thing to DOS ;-) written by IBM.

  • How to request Administrator or root to execute java programs?

    How to request Administrator or root to execute java programs when the user is not enough permission?
    as same as following image:
    Windows : http://img151.imageshack.us/img151/6113/winrw5.gif
    Linux: http://img374.imageshack.us/img374/8990/linuxsj4.png
    Edited by: lauangus on 2008?10?13? ??9:15

    Dear Sys Admin,
    Would you please grant me and my group enough rights to do the tasks that have been assigned to us, we are using the following programs. They will need to asccess....
    Sincerely,
    lauangus
    Note: this will usually have to be accompanied by appropriate supervisor signatures and endorsements.

Maybe you are looking for