Running a Java Class in Workshop

I'm trying to run a Java class with a public static void main method in Workshop. As instructed I opened the properties for the Java project, under the debbuger tab, checked Build before debugging. Then under "Create new process settings", in the Main Class box put the class with the main method with proper package structure. Clicked Ok. When I click the start button, the project builds, the process starts, the last message in the Output box is "Process Started" but then nothing happens. No System.out.println statements show. If I set breakpoints it never gets there. No values ever get set or changed in the Locals box. What am I missing?

Thanks your response. I'm on sp3.
The application is "Factory".
The Java Project in "Factory".
In the Java project there is a folder "pac", in that folder there is a class with a main method called "ProviderClient"
In the "Factory" Java project properties/debugger window, Build before debugging is checked, also Create new process. Main class: pac.ProviderClient
Home directory: C:/bea/user_projects/MyApps/Factory/Factory/
(It was put there autopmatically when I clicked Browse as you said).
When I run I get:
Trying to create process and attach to 3640...
Starting process in C:\bea\user_projects\MyApps\Factory\Factory
C:\bea\jdk142_04\bin\javaw.exe -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=3640,suspend=y,server=y -classpath "C:\bea\user_projects\MyApps\Factory\APP-INF\lib\Factory.jar;C:\bea\user_projects\MyApps\Factory\EJBs.jar;C:\bea\jdk142_04\jre\lib\rt.jar;C:\bea\jdk142_04\jre\lib\jsse.jar;C:\bea\jdk142_04\jre\lib\jce.jar;C:\bea\jdk142_04\lib\tools.jar;C:\bea\weblogic81\server\lib\knex.jar;C:\bea\weblogic81\common\lib\log4j.jar;C:\bea\weblogic81\server\lib\debugging.jar;C:\bea\weblogic81\javelin\lib\javelin.jar;C:\bea\weblogic81\server\lib\wlw-lang.jar;C:\bea\weblogic81\server\lib\weblogic.jar;C:\bea\weblogic81\common\eval\pointbase\lib\pbserver44.jar;C:\bea\weblogic81\common\eval\pointbase\lib\pbclient44.jar;C:\bea\weblogic81\server\lib\webservices.jar;C:\bea\weblogic81\server\lib\webserviceclient.jar;C:\bea\weblogic81\server\lib\webserviceclient+ssl.jar;C:\bea\weblogic81\server\lib\wli.jar;C:\bea\weblogic81\server\lib\xbean.jar;C:\bea\weblogic81\server\lib\wlxbean.jar;C:\bea\weblogic81\server\lib\xqrl.jar;C:\bea\weblogic81\server\lib\netui\netui-compiler.jar" pac.ProviderClient
Process started
After a long time I get "Could not attach to debuggee process.
Debugging Finished"
What am I doing wrong?

Similar Messages

  • Compiling Java Class in Workshop

    May I ask a dumm question: how to compile a java class in Workshop? Application
    Build or Project Build does not seem to do the work.
    Thanks.

    "Gerald Nunn" <[email protected]> wrote:
    "Jeff" <[email protected]> wrote in message
    news:406455b2$[email protected]..
    May I ask a dumm question: how to compile a java class in Workshop?Application
    Build or Project Build does not seem to do the work.Works fine for me, what type of project is the java file in?
    Gerald
    Thanks for the reply.
    It is a web project. My Java files are under the following folder tree:
    eSheetWeb\WEB-INF\classes
    I have run Build Project against eSheetWeb few times. No errors but java files
    just not getting compiled to class. Also is there a way to just compile without
    run the entire Build?

  • How can I compile and run other java classes from within an application?

    Hello there everyone! I really hope that someone can help me. I am writing a program that must be able to compile and run other java classes that are in different files, much like development environments like Kawa or Forte allow you to do.
    There has to be a way of doing this ( I hope!! ), but i can't seem to find it!!
    I have tried using this command to compile:
    Runtime.getRuntime().exec ("c:\\programs\\javac className.java");
    ...and this one to run:
    Runtime.getRuntime().exec ("c:\\programs\\java className");
    ...but neither works!!! I can compile and run classes that are in the same file as my application, but I can't get it to work at all for files in different directories or files.
    PLEASE, PLEASE, PLEASE help me - i've run out of ideas, and i need this to be working in 3 days!!!
    Thank you very much for any help anyone can give me, I really appreciate it!! Thanks again!!
    Adrian ( ...in distress!! )

    public class JavaCompiler{
       public static void main(String[] args)throws Exception{ //sorry bout the laziness
          if(args == null || args.length != 1){
             System.out.println("Usage: java JavaCompiler MyClass.java");
             System.exit(0);
          String className = args[0];
          Runtime rt = Runtime.getRuntime();
          Process p = rt.exec("javac " + className); //consider setting cpath for this
          p.waitFor();
          //now try to run after it is done.
          p = rt.exec("java " + className.substring(0, (className.length() - ".java".length()));
          p.waitFor();
          //do some other stuff
    }This should get you going. You may consider looking into the System.getProperty() method in order to determine the type of OS it is running on in order to findo out what command to run. I know that the sun tool listed above is nice, but by my understanding the sun tools provided are not guaranteed to stay the same. I'm no expert on this matter, but that is one of the reasons there is no API documentation for those tools. Also, I don't believe those tools come packaged with the JRE. (Of course if you are making an IDE it will be expected that the user has an sdk installed. Good luck with figuring this thing out.

  • Run a java class in Oracle db to connect to Sybase

    Hi All, I'm looking for a way to connect to Sybase database at no-license-cost (meaning Oracle Gateway or similar 3rd party products), first coming idea was JDBC, I know I can run a java class in Oracle, the simple idea is to write a java class which connects to Sybase via JDBC thin driver and return the resultset of given query in a java class, the resultset will be presented in Oracle Apex framework.  Does anyone know if this can be done or not, and how?  Any howto articles are welcomed.
    Henry

    Henry:
    To connect to Sysbase or MsSQL Server you could use jTDS open source driver.
    http://sourceforge.net/projects/jtds/
    upload above driver (jar file) using loadjava, and grants the port connection using dbms_java.grant_permission procedure.
    Because jTDS is pure java driver (mode 4) is possible to use directly inside the RDBMS.
    Best regards, Marcelo.
    PD: Latest jtds driver is compiled against 1.6 sources, but oldest version will work with 1.5 for 11g.

  • Can we run a java class in a external server through abap program?

    Dear Experts,
    Can we run a java class in an external server ( other than application server and client system )?
    I have tried running it in the client system through a program and it works.
    But i have the requirement of running it in another system. Can it be done?

    Hi,
    If this is the case I think you can call this web service from SAP and triger the execution of the application on the "external server".
    SAP is behaving as a client in this case.
    Another alternative:
    "have tried running it in the client system through a program and it works." please elaborate.
    Regards.

  • Getting an error msg while trying to run the java class from CMC

    Hi All,
    I am getting an error, while trying to run the java .class file, that which is imoported into CMC.
    Error msg:
    Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         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 com.crystaldecisions.sdk.plugin.desktop.program.internal.ProgramWrapper.main(ProgramWrapper.java:49)
    I have imported .class file into CMC and trying to invoke the .class file by another java program from eclipse..When i tried to invoke the .class in cmc, i am getting an error msg, mentioned above. I thought there might be version conflict. So i changed the java complier version to 1.5 in my Eclipse. After that is done again i am facing the same problem.
    Can anyone help me to resolve this issue?
    Thanks in Advance.

    i have installed BO SDK 3.1 , Service pack 3. It comes woth JDK 1.5 version. i have not done any chnages to it. I impoprted all the jar files related to BO into eclipse.
    1)  Actually, i am writing java code on eclipse. When i run code from the eclipse, it creates a session to cmc and creates folder structure what i need.
    2)  But the thing is, that code needs to run, when i import the .class file into cmc. The process how i imported the .class file to cmc.
    Manage> Add> Program File-->Java (Check Box). In this way i added java class file from the eclipse workspace (class file from the bin directory).
    3) So when i run the .class file externally by another java program or also when i log in to CMC and run that .class file, the instance shows sucess, but when i see the logfile i am getting an exception that which i mentioned above.
    If my method is worng can you please let me know the stepts how to run java program in cmc.
    Thanks in Advance

  • Running a java class from a windows shortcut?

    I am currently running a program I have written from a batch file for which I have created a shortcut. I have recently however modified my shortcut to include a variable that i pass to the main method in the program through the batch file - all this works fine.
    It did however get me thinking - why can't I do away with the batch file??
    Below is the batch file code that loads my software:
    Echo Off
    CLS
    SET CLASSPATH=.;"C:\Program Files\Java\j2re1.4.2_03\bin"
    SET Path="C:\Program Files\Java\j2re1.4.2_03\bin"
    C:
    CD\
    CD "Program Files\My App"
    start "My App" javaw My_App %1
    And the two shortcut strings that call the batch file:
    "C:\Program Files\My App\My_App.bat" var1
    "C:\Program Files\My App\My_App.bat" var2
    What I have been trying to do however, is do all of the above from the shortcut
    I have added the following code to a shortcut:
    Target:
    C:\WINDOWS\system32\cmd.exe /c SET CLASSPATH=.;"C:\Program Files\Java\j2re1.4.2_03\bin" && SET Path="C:\Program Files\Java\j2re1.4.2_03\bin" && start javaw "My App" My_App
    Start In:
    "C:\Program Files\My App"
    All of the relevant paths are set correctly, and it calls the main java class file from the directory from where it resides, but I get a popup error message stating:
    Java Virtual Machine
    Error: Could not fing Java 2 Runtime Environment.
    Has anybody got any ideas on how to fix this please??

    Either I'm misunderstanding, or ?
    You don't need to set classpath if all you need for a classpath is the directory that contains the classfile - the Start in combined with -cp . // that's -cp followed by a periodsets the classpath to that value, and Windows will create a fully qualified path to javaw.
    You entries in the shortcut shouldn't have to be any more than what I typed.

  • How to run a java class from its package directory

    Hi,
    I hope someone can help me on the following ....
    Let say I have a Test.java class with the package definition: "package com.ams.eai.mq.fileAdapter;". I compiled the class into the directory c:\myJava\client\com\ams\eai\mq\fileAdapter. I have c:\myJava\client specified in my classPath and Path. Why is it when I go to the mentioned directory and enter at the prompt >java Test, I get java.lang.NoClassDefFoundError: test (wrong name: com/ams/eai/mq/fileAdapter/test).
    What directory am I supposed to be in to run my Test class ? Is there some other path that I need to specify but didn't ?
    Thanks for any help.

    You have to type out the fully qualified class name:
    java com.ams.eai.mq.fileAdapter.Test
    Even if you had the entire dir structure, "c:\myJava\client\com\ams\eai\mq\fileAdapter" in your classpath you'd still have to fully qualify the name of the "Test" class. What if there was another class named "Test" in a different package in your CP? The VM would have no way of knowing which "Test.class" you'd want to run.

  • Running a Java Class in Apps Server?

    Does anyone have a clue how to just simply run an existing *.class using Oracle Apps Server as the web server listener?
    I'm assuming there is some default path that I should place my *.class file in??? Or some unique way to call it from the <applet> tag???
    null

    Thanks your response. I'm on sp3.
    The application is "Factory".
    The Java Project in "Factory".
    In the Java project there is a folder "pac", in that folder there is a class with a main method called "ProviderClient"
    In the "Factory" Java project properties/debugger window, Build before debugging is checked, also Create new process. Main class: pac.ProviderClient
    Home directory: C:/bea/user_projects/MyApps/Factory/Factory/
    (It was put there autopmatically when I clicked Browse as you said).
    When I run I get:
    Trying to create process and attach to 3640...
    Starting process in C:\bea\user_projects\MyApps\Factory\Factory
    C:\bea\jdk142_04\bin\javaw.exe -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=3640,suspend=y,server=y -classpath "C:\bea\user_projects\MyApps\Factory\APP-INF\lib\Factory.jar;C:\bea\user_projects\MyApps\Factory\EJBs.jar;C:\bea\jdk142_04\jre\lib\rt.jar;C:\bea\jdk142_04\jre\lib\jsse.jar;C:\bea\jdk142_04\jre\lib\jce.jar;C:\bea\jdk142_04\lib\tools.jar;C:\bea\weblogic81\server\lib\knex.jar;C:\bea\weblogic81\common\lib\log4j.jar;C:\bea\weblogic81\server\lib\debugging.jar;C:\bea\weblogic81\javelin\lib\javelin.jar;C:\bea\weblogic81\server\lib\wlw-lang.jar;C:\bea\weblogic81\server\lib\weblogic.jar;C:\bea\weblogic81\common\eval\pointbase\lib\pbserver44.jar;C:\bea\weblogic81\common\eval\pointbase\lib\pbclient44.jar;C:\bea\weblogic81\server\lib\webservices.jar;C:\bea\weblogic81\server\lib\webserviceclient.jar;C:\bea\weblogic81\server\lib\webserviceclient+ssl.jar;C:\bea\weblogic81\server\lib\wli.jar;C:\bea\weblogic81\server\lib\xbean.jar;C:\bea\weblogic81\server\lib\wlxbean.jar;C:\bea\weblogic81\server\lib\xqrl.jar;C:\bea\weblogic81\server\lib\netui\netui-compiler.jar" pac.ProviderClient
    Process started
    After a long time I get "Could not attach to debuggee process.
    Debugging Finished"
    What am I doing wrong?

  • How can i run a java class file from shell?

    Hi all,
    I've a .class file named "File" that contains Main method, it is in the package "File2".
    How can I run it by shell command?
    PS: "java -cp . file" doesn't work it launch->
    Exception in thread "main" java.lang.NoClassDefFoundError: File2/File (wrong name: File2/File)
    Thanks in advance.

    Just to understand: is File2 ar jar archive or not? If it is a jar archive, have you tried open File2.jar? If File2 is a directory within the current directory, have you tried java -cp . File2/File? I just tested with a set of classes and it works... Let me be precise:
    * Let us imagine you are working in a directory whole path is PathToDir/
    * in this directory you have the classes put in a directory called File2
    * in order to launch File.class then you would have to invoke :
    cd PathToDir/ (just to be sure)
    java -cp . File2/File
    *if you were to do the following then you would have the problem you describe
    cd PathToDir/File2/
    java -cp . File

  • How to run a java class from a shell script with passing arguments

    hi,
    I have a jar with all the required classes. I was using ant to run the classes i needed.
    But now i want to use a shell script to run the class, also the class accepts some arguments so when script is run it should accept arguments.
    So can any one tell me how to set class paths, jar location and call the required class from shell script or batch file with passing arguments to it.
    Thanks in advance.

    Let's say that the order of arguments is as below
    1. Jar file name
    2. Classpath
    Your shell script would look like this
    java -cp $CLASSPATH:$2 -jar $1 I am assuming that your jar file has the required main-class entry in its manifest. Note that $1...$9 represent the arguments to this shell script.
    The same goes for a batch file
    java -cp %CLASSPATH%;%2 -jar %1

  • Problem running with "java class"

    Hi:
    I developed an application in Forte. It works as expected within the IDE. I would like to run it outside the IDE with "java application.class". When I try this, it cannot find many modules. I realize I need to set the classpath, but don't know what to set it to.
    Please help.
    vjktm

    r u using windows?
    if so
    try this
    open up the dos
    then type the following command
    set classpath = drive:\directory\.
    drive - your working drive
    directory - where you put ur java source and class files
    make sure you have the . at the end of the cammand.

  • How to run a Java class in JDeveloper - with Input parameters

    Folks,
    I need to run Forms 10g trace and do not have access to the Dos command line (no Programs-ACcessories-Comand prompt). I am allowed to run Batch files though.
    So really I need to run class "oracle.forms.diagnostics.Xlate", but need to give Input Parameter to this class. I know to load JDeveloper and open this class, but when I execute it it gives me the following error.
    My question is HOw do I input the File name to this Class when I execute it from JDeveloper.
    ERROR: You must specify an input datafile
    Exception in thread main
    java.lang.NoClassDefFoundError: oracle/forms/registry/MessageManager
         at oracle.forms.diagnostics.Xlate.printUsage(Unknown Source)
         at oracle.forms.diagnostics.Xlate.readArgs(Unknown Source)
         at oracle.forms.diagnostics.Xlate.<init>(Unknown Source)
         at oracle.forms.diagnostics.Xlate.main(Unknown Source)
    Process exited with exit code 1.

    To specify program arguments
    1. Select Tools>Project Properties.
    2. Select Run/Debug.
    3 Select the Default Configuration and select Edit.
    4. Specify the program arguments in the Program Arguments field.

  • How to run a java class as nt service in jdk1.1.8

    Hi,
    Could you help me , i try to start a service for a class who needs jdk1.1.8. I find javaservice.exe but it runs only for jdk1.2 or 1.3.
    HEEEEELLLLLPPPP

    Once old man was sitting in the park reading book "Learn C++ in 21 days". A passer by saw him and asked "You are such an old guy, why do you bother to learn C++?" "I have heard that now communication language at heaven is C++ only , so after my death when I will be in heaven, I don't want to face communication problem." old man replied. "But how come are U so sure that U will be in heaven? It could be a hell also." he asked. "Ya, doesn't matter .... I already know Java".

  • Running a Java class which depends on a Jar

    Hi,
    I try to run a class using the command java packagename.classname.
    This class depends on a jar for functioning.
    So, when I run this class, exception related to the absence of this Jar is shown.
    How can I overcome this? Where should I place this jar or running any other commands for loading this jar will do?
    Please help.
    Any help in this regard will be well appreciated with dukes.
    Regards,
    Rony

    Hi Rony,
    Place the that jar file in your class path.
    or
    Place that "jar file path" in Enivronment Variables of your computer under "Class path" variable
    or
    set the class path using command prompt.
    Thanks,
    Sekhar

Maybe you are looking for

  • How to restore ipad

    I do the upgrade 5.0 All photo and data in ipad is gone. Can it be Restore ? I open the mobilesync and I find bund of code file  ,but  i could not restore back ? The photo i need it back urgently. What can i do and can it restore back Thanks! Delon.

  • Archive Repository - Content Server or Root File System?

    Hi All, We are in the process of evaluating a storage solution for archiving and I would like to hear your experiences and recommendations.  I've ruled out 3rd-party solutions such as IXOS as over kill for our requirement.  That leaves us with the i5

  • Importing song question

    A friend just told me that she was just clicking around once and found where you could look up artist/actors/actresses and you can see what they have recently downloaded, who they are inspired by, and what is on their ipod. How do I get to this appli

  • PHP Amf setClass()

    $server->listMethods() returns this: Array ( [0] => getUser [1] => getPrivateData [2] => getSelectedProducts [3] => Model.selectProducts ) The last method is Model.selectProdocts. How do I call it in Flex?

  • Hello, please help. Why has my bank account been charged after i had £10 on my i tunes account the film i bought was £9.99 x

    It would be helpfull if someone replied asap x