How to run java .class file?

How can i run/view .class file in java?. is there tool/utilities in java that can do that.?. Thanks

Ednut wrote:
I'm sure you must have been taught using the command: java yourClassName after navigating to the location of your compiled class in the command prompt.I'm sure the OP does not need condescending remarks from someone who knows almost as little Java as s/he does.

Similar Messages

  • How to decode  java class file to java file

    hi
    how to decode java class file into java file
    regards
    kedar

    Its really.......... really BAD.
    Write ur own code... or use open source code..
    Its a bad practice...
    however i am telling u ..there is DJ java decompiler.
    but mind it there are Obfuscator also....like codeshield and others
    take care...
    Alok

  • How to convert java class file version without decompiling

    Hi,
    Oracle R12.1.3 i am having illegal access error while try to access the class file version Java 1.3 uses major version 47,So how to convert the class file version without using decompiling.
    Current java version is 1.6.0_07
    Is there any tool or API for converting class file version?
    Thanks,
    Selvapandian T

    Beside this I wonder where you get your error from since AFAIK 12c comes with java 1.6.
    Well wonder no more!
    OP isn't using Oracle 12c database.
    They are using Oracle R12.1.3 - which is the E- Business Suite.

  • How to run a class file in MAC os, compiled in XP.

    Hi all,
    i am compiling a java program in windows using JDK 1.5 and i am copying this file to MAC os (Panther). In Mac i am running this class file using JDK 1.4.i am getting the following exception,
    Exception in thread "main" java.lang.UnsupportedClassversion error.
    This is understandable, but is there any solution for this ...
    Any one experienced the same problem ...
    If any one comes up with a solution to solve this, plz let me know...
    Thanks in advance......

    You are compiling it in 1.5 and expecting 1.4 to run it?
    You have two options: compile it at the 1.4 level or upgrade your Mac to 1.5

  • How to convert java .class file to .dll file

    hi,
    I got a problem, I have to convert my java .class file to .dll file. Microsoft VC++ program will invoke the converted .dll file.
    Is there any other possibility.
    I was confused.
    Cam any body help me. If you are having solution for the can you send to my [email protected] account.
    thanks,

    No, it is not possible to do what you are suggesting. Yes, you could produce a DLL that wraps the JVM and loads your java class exposing a C and/or C++ callable interface, but that is a lot to go through unless your class is VERY complex. Otherwise, you might want to just create and maintain two implementations.

  • How to run java jar file

    Hello,
    I got a java jar file which contains folders with class file. When I double click on the jar file, it gave a error
    Exception in thread "main" java.lang.NoClassDefFoundError
    How can I run this jar file?
    Thanks,
    CR

    Hello,
    I got a java jar file which contains folders with
    class file. When I double click on the jar file, it
    gave a error
    Exception in thread "main"
    java.lang.NoClassDefFoundError
    How can I run this jar file?
    Thanks,
    CR... and assuming that Jar contains a manifest file, what does it look like? I would guess that the Main-Class entry is incorrect, or that the Jar has external dependencies to other jars not listed properly in the Class-Path entry.

  • Trying to run java class files from my jsp

    I am having difficulty running java files from my jsp. I have compiled my two java classes and inserted them onto my server in the webapps/WEB-INF/classes/scripting directory and have imported scripting.* into my jsp page. The files both compiled ok before the class files were loaded onto the server but when I rty to run the jsp from the server, I keep getting a compiler error. Thanks in advance
    Iob

    Here are the few question
    1) Does your java classes which u created is declared under package scripting. *.class files are to be places under the WEB-INF/classes directory only. Not under scripting. But if you java classes say are under a package called a.b. Then you need to put under classes\a\b\.

  • How to run java source files from other java files??

    hello all,
    i need to run 3 to 4 .java files (first.java,second.java,third.java) from one file.
    i tried the
    Runtime.getRuntime().exec(cmd); but here cmd must be an exe file.
    NOTE THAT i need to run the first.java file ,second.java file each time to generate their .class files(ie I NEED TO COMPILE THEM ALL TIMES AND THEN RUN THEM)
    PLZ. help me if this can be done,
    warm regards,
    Vishal.

    One way to do this is to put all your commands into a batch file (this is Windows?) try unix shell otherwise. Anyway here's an example .bat file called cmplrun.bat:
    @echo off
    javac -classpath . TestCase*.java
    java -cp . TestCase01
    java -cp . TestCase02
    java -cp . TestCase03Then the Java pgm can look like this:
    import java.io.*;
    public class RunProcess {
      public static void main(String[] arg) {
        try {
          Process myProcess;
          myProcess = Runtime.getRuntime().exec("cmd /c cmplrun");
          String s = null;
          DataInputStream in = new DataInputStream(
                               new BufferedInputStream(
                                   myProcess.getInputStream()));
          while ((s = in.readLine()) != null) {
            System.out.println(s);
          System.exit(0);
        catch (IOException e) {
          System.out.println("Exception: "+ e);
          System.exit(-1);
    }Just one way to do this, all caveats apply and HTH;
    ~Bill

  • How to run several class files at the same time

    I have four class files, there's: cvnt1.class,cvnt2.class,cvnt3.class and cvnt4.class.
    I want to know how to write application for running all of those files together. thanks!

    Your question is still unclear - do you want to access code from those class files (just add all of them to classpath) or do you want to create number of threads or number of processes (one per class) and start code from each class simultaneously or something else?

  • How to run a class file from windows ?

    hi, i have created a shorcut to run my java application from my windows desktop, but i have the error message "Couldn't find the main class, programm will exit",
    the shortcut is as follow
    [%windir%\System32\javaw.exe C:\ProgramFiles\\Main]
    thanks for you help,

    Im new to running java from a shortcut but this may help. I hope this helps.
    this is the command you ned to write and refer to my example;
    javaw.exe -cp <path to class file> packageName.className
    This is an example of wat i have typed to run my program from a shortcut;
    C:\JBuilder3\java\bin\javaw.exe -cp C:\jbuilder3\myclasses\welcome.jar welcome.welcome
    Hope this helps
    good luck!!!
    Matx3001

  • How to call java class file from jsp

    hi
    we need to call java classes (which are written separately in .java file )from jsp file. we need it for our project if anyone knows about please reply us.
    bye
    siva sankari

    you can call the methods in a lot of ways. you could use scriptlets with the
    <%@ page import="package.class"%> and then inside instantiate an object
    <%
         MyClass mc = new MyClass(parameters if any);
         mc.theMethodYouWantToCall();
    %>or as Madathil has stated,
    or use the JSP tags
    <jsp:useBean id="anyname" class="classname"/>and then use the getProperty tag
    or even Custom Tags

  • How to run java exe files without having to install jre

    Hi all i want to run a java application. i already converted the jar file to exe using Launch4j but the problem is that i want to run the application on other computers without having to install jre. please, is this possible and if yes, how can i do that. Thanks alot in advance

    The Launch4J website should explain how to bundle the JRE. I've not really used it myself though. If you can't get it to work you could try the launcher I use:
    http://www.megaupload.com/?d=FYZAVM77
    which comes with instructions. Or:
    http://sourceforge.net/projects/javaround
    Both of which are really easy to use.

  • How to run java class from over the web

    hi i ftped my java files to an asp web site.
    if it were my local computer i would open up the c prompt and run it with the command java ....
    but is there a way for me to execute this java file in the same way
    stephen

    1. the code is a java application.
    How may I run this java application on the web server
    when I do not have access to the command prompt. I would discuss this with the administrator of the web server. You will need at a minimum a JRE installed on the server and permission to execute commands remotely. If the administrator decides to grant you that permission (which is not likely unless the two of you work for the same company), he should also be able to explain to you how to do that.

  • How to create JAVA Class file from an exisitng JAVA file in JDEVELOPER

    Hi All,
    I have a file called abc.java and i need to generate a class for the same using JDEVELOPER. Please help me what are the steps to be followed. I'm totally new to JAVA and first time working on JDEVELOPER tool.
    Thanks in Advance !

    Being completely new to something is not an argument (or shall we be honest: an excuse?) to not read the manual.
    Just to note: I would pick Eclipse or Netbeans if you're completely new to java. You'll have more chance of finding help either in forums, mailing lists or Google searches. But if you must stick with JDeveloper, the forum is here:
    JDeveloper and ADF

  • Error comming in running java class file

    Exception in thread "main" java.lang.NoClassDefFoundError: Main (wrong name: jav
    aapplication2/Main)
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    4)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
            at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)what is the meaning of this error

    Hi bhavishya,
    Is this the correct path of your Main class : javaapplication2/Main ?

Maybe you are looking for