How to compile dunamically genrated java files through java program?

Hi, I have a requirement where i generate java files from WSDL dynamically using wsdl2java jaxbri. I need to compile these files dynamically on the fly and jar it. Everything should happen through java program. Bcos everything is dynamic here, no information is known (like dir, file names ...) until the runtime. Everything is user fed.
the directories may contain other directories with java files. its recursive
i tried com.sun.tools.javac.Main.. but either its not scaling to my needs or i donno how to wok with this.
is there any option to compile the java files as they are created thru JAXBRI (wsdl2java)?
any help is appreciated..
-s

my requirement is :
i create java files from wsdl2java (axis).. i need to compile all the java files.. directories with in the directories (recursive)...
as bcos the the java files have inter-dependencies they have to be compiled as a bunch something like (java *.java). I donno how to do this in javac.Main tool
Once all these files are compiled i need to create a jar out of them
Any help is appreciated!

Similar Messages

  • How to create a .java file through a j2me program?

    I am trying to develop a small application in j2me which needs dynamic creation of a .class file. For this purpose I tried to create .java file through my j2me code, but i could not do that..I want to know whether a java file can be created on a mobile phone or not..
    I would be grateful to you on your help in this regard..

    ...develop a program xyz.java using j2me which performs the following functionalities:
    1.create a file called abc.java
    2.extract its class file...For +1+ ie to create a file (any file, no matter java or not) from j2me, device need to support File Connection specified in [jsr 75|http://www.jcp.org/en/jsr/detail?id=75]. If you're interested, learn the jsr API on how to create and manage needed file.
    For +2+ described as extract its class file one needs to have java compiler (javac) on device. *) If you're interested, ask for more details at [Java Compiler forum|http://forums.sun.com/forum.jspa?forumID=7]. Also, if the class file is for CLDC then javac needs to support "JDK 1.3-compliant" compilation. To create CLDC classes on device, one also needs to have a preverifier tool. Check this at Java Compiler forum if needed.
    Good luck - I think you'll need a lot of it...
    *) javac on device -- it should not only be present but also provide a j2me API allowing to invoke it for particular java file with needed options. Same applies to preverifier tool.

  • How to get the source code of an HTML page in Text file Through java?

    How to get the source code of an HTML page in Text file Through java?
    I am coding an application.one module of that application is given below:
    The first part of the application is to connect our application to the existing HTML form.
    This module would make a connection with the HTML page. The HTML page contains the coding for the Form with various elements. The form may be a simple form with one or two fields or a complex one like the form for registering for a new Bank Account or new email account.
    The module will first connect through the HTML page and will fetch the HTML code into a Text File so that the code can be further processed.
    Could any body provide coding hint for that

    You're welcome. How about awarding them duke stars?
    edit: cheers!

  • Error while running executable file through java in WinNT

    I would like to run an executable file with Java.
    - If I try with notepad or paint, i.e. Windows Applications,
      I have no problem.
    - I also can run Non-Windows-Own Applications, except one.
      I get an error message, if I want to run this program through Java.
    I have tried following commands to run an executable file.
    Runtime.getRuntime().exec("cmd.exe /c "+command);
    Runtime.getRuntime().exec("cmd.exe /c start "+command);
    Runtime.getRuntime().exec("cmd.exe /c start /wait "+command);
    Runtime.getRuntime().exec("cmd.exe /k start "+command);
    command : the path to the executable file
    I can run the application directly, if I click the icon on desktop,
    but not through Java.
    here is the error message I get
    screenshot : http://www.aykut.de/error_message.jpg
    Text : "Security Check failure"
            The Logon System has been tampered with.
            The Administrator will need to re-install.
    my Idea :
    The application is "old".
    I think it was written for Win 3.1.
    Therefore I don't know if there is any other
    possibilty to run a "DOS Exe File" through Java.

    I have just figured out how it works,
    if somebody else here in forum have this problem,
    here is the solution :
    String path = "F:\...\...\Application.exe";
    String envDir = path.substring(0, path.lastIndexOf("\\"));
    String[] command = {"cmd.exe", "/c", "start", "/wait", "/D"+envDir, path};
    Process process = Runtime.getRuntime().exec(command);
    "start /Dpath" => path: environment directory F:\...\...\
    "start /wait" => wait until Application.exe terminates
    if you use Win95 or Win98 use command.com instead of cmd.exe
    Aykut

  • How to enable commenting into pdf files using java?

    Hi All,
    Is there any way available to enable comments into pdf files through java. I have a Adobe Reader 9 and also I want put some comments into pdf file, but the reader is not allowed to place a comment into pdf file before enabling the Comments into pdf. After enabling the comments in pdf file then only we can place the comments and we can the pdf file with comments.
    Is there any way available to enable comments into pdf file to view acrobat reader.
    Thanks in advance.

    The end user who uses the web application has Acrobat installed in their mahcine needs it only for the purpose of enabling comments in pdf. If this task of enabling comments in pdf is done through my application there is no need for acrobat in such user's machine which was requested as a cost cuttnig measure.
    For this purpose, i need to know about how to enable comments in pdf through java api.
    I have used itext java api for other pdf related manipulation in java. But it does not have feature as per the requirement posted above. Can any body suggest relevant java api to achieve the task requested?
    Tahnks in Advance.

  • How do i run a Labview file through a windows phone?

    Hello there
    How do i run a Labview file through a windows phone or a tablet? is it possible
    is there any phone specifications required? or steps?
    Thanks alot  

    Blokk wrote:
    na1992 wrote:
    hahaha my baad
    i mean if i have done my labview file on laptop and i want it to connect my file to a microcontroler using usb or any serial connection, i want a way that my labview file will run if i store it on a phone. 
     i searhced about exe  format but i didnt find enough info
    Sorry, but you should define more precisely what is your goal:
    " i searhced about exe  format but i didnt find enough info"
    If you build an exe using Labview, that exe will not run on iOS, or Android, if this is what you ask...
    Nor Windows Phone or Windows RT. A LabVIEW exe is compiled and linked for x86 or AMD64 architecture with Win32 API architecture and will only run on Windows for x86 or x64 systems.
    Windows Phone and Windows RT are despite the similarity in the name technically completely different platforms to the normal Desktop Windows system, just as different as MacOS X or iOS.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • .sql file through Java and procedures

    I want to execute .sql file (on my local system) to run on a oracle database.
    Also please tell me how can I run multiple procedure simultenously through Java class.
    Thanks in Anticipation

    First you need a multi-CPU machine or you're never going to execute more than one statement at once.
    Next you need to know how to create a multithreaded program.
    After that, you need to figure out how to read that file and separate the statements in it so each can be fed to one of those threads.

  • Hot to call  forms11g  fmx file  through Java executable

    Hi,
    Iam having one file in some folder which will come through FTP , whenever file comes to the folder i should call the some form fmx file through JAVA so that my form will take care rest of the things .
    My question is how to call fmx through Java executable in windows environment.
    thanks in advance
    GV

    Hi All,
    Thnaks for the Info. But my requirement is different.
    1) whenever i received a file through FTP from other server to my server , some folder say d:\Test
    a) some batch program has to trigger and first it should take the backup of the received file to some other folder say d:\archive
    b) some batch program has to trigger to call the forms fmx file so that form will take care of reading from the file and put the data to database for the received file in d:\Test.
    Assume that it is in windows environment/Linux Environment . How i can achieve these tasks. There should not any user intervention in this , everything is automatic.
    Please guide me any solutions
    Thanks in advance
    GV

  • How I can create a XML file from java Aplication

    How I can create a XML file from java Aplication
    whith have a the following structure
    <users>
    <user>
    <login>anyName</login>     
    <password>xxxx</password>
    </user>
    </users>
    the password label must be encripted
    accept any suggestion

    Let us assume you have all the data from the jsp form in an java bean object..
    Now you want a xml file. This can be acheived in 2 ways
    1. Write it into a file using java.io classes. Say you have a class with name
    write("<name>"+obj.getName+</name>);
    bingo you have a flat file with the xml
    2. Use data binding to do the trick
    will recommend JiBx and Castor for the 2nd option
    Regards,
    Rajagopal

  • How to append records in a file, through file adapter.

    Hi All,
    How to append records in a file, through file adapter.
    I have to read data from database and need to append all records in a file.
    Thanks in Advance.

    Hi,
    I think you have a while loop to hit the DB in your Process (As you said you have to fetch data from DB 10 times if 1000 rec are there)
    First sopy your DB O/P to one var
    and from second time append to previous data.(Otherwise you can directly use append from starting instead of copy and append)
    When loop completes you can transform to File adapter Var.
    Otherwise you can configure yourFileadapter such that it will aapend current records to previous records.
    You can use 'Append= true' in your file adapter wsdl.
    It will append previous records to current records in the same file.
    Regards
    PavanKumar.M

  • How to read a text/html file in java regardless of its encoding?

    Hi All,
    How to read a text/html file in java regardless of its encoding?
    1. Is there any way to identify that a file (read using FileInputStream/or any other means with java.io package) has been saved with which type of encoding i.e. whether the file is using ANSI encoding or Unicode encoding or other?
    2. Is there any standard way to read an encoded file (i.e. files having UTF-16 format for Asian locales character support) and un-encoded file (i.e. files having ordinary ANSI format) correctly without knowing the user input?
    The problem is that while creating an instance of 'InputStreamReader' (ISR) we can pass the encoding type used (otherwise it takes the system's default encoding type), and the ISR expects the file to be in the same encoding format otherwise it reads it as some junk. But we don't know which file the user is going to pass whether it is Unicode (for Asian locales file should be in Unicode) with or ANSI coded (for non-Asian / English locales user generally uses ANSI encoding).
    Regards,
    Sam

    1. There is no reliable way of guessing the encoding of a file without that information. Thats why XML for example has very strict rules wrt. it's encoding (short form: use UTF-8 or UTF-16, if you use anything else, you'll have to specify it)
    2. you might be able to make an educated guess if the possible range of encodings is limited, but it will probably never be 100% certain
    3. The HTML file might have a header entry "<meta http-equiv..." that tells you about it's encoding. You could try to read the start of the file and see if you find that, then if you found it re-read the entire file.
    regards

  • How do I produce an excel file using java code

    How do i produce an excel file using java code.
    If it is possible would ne one have ne source code as an example.
    I have tried looking up information on outputing the information to a *.csv file but unfortunality i have had no luck in finding any information. To be exact ne source code.
    Thanks
    Lee

    That's what I use and I'd be the first to admit that it's very messy. But it works. Go use Google and see what else you can find.

  • How to convert oracle form fmb file to java swing file using Jdeveloper

    how to convert oracle form fmb file to java swing file using Jdeveloper.Please explain with detailes steps if possible or please give a link where it is available
    thanks
    Message was edited by:
    user591884

    There is no automatic way to do this in JDeveloper. I know there are some Oracle Partners offering forms to java conversion, I don't know how much of their tools are automated and done with JDeveloper. With JDeveloper+ADF you basically rewriting the Forms application from scratch (and using ADF is helpful during this process).

  • How to send business card (VCF file) through sms? it can only be send via email?

    how to send business card (VCF file) through sms? it can only be send via email?

    Go into your contacts click on the person you want to send, when the info opens scroll down to the bottom and click share contact it will as it you want to email or mms. 

  • How can i send and recieve mail through java

    HI All,
    plz let me know how can i send and receive mail through java.
    Regards:
    sachin kakkar
    http://www.datamansoftwares.com

    Using java mail API..
    try to search the forum for java mail... you find many question and answer.
    use the left search textfield

Maybe you are looking for

  • Adobe-Cloud:we mean on the browser run software or software on desktop(exe)

    dreamweaver Full from € 450.18€ 366.00 ex VAT Upgrade from € 141.45€ 115.00 ex VAT Subscribe from € 22.13€ 17.99 ex VAT subscription buy is per month? by this we mean adobe cloud soft, and is the same as origin software Full ver buy? the full adobe p

  • Problem in submiting the form onchange of html:select

    I am using WSAD 5.0 and working on a small application with struts. I have following code where I want to submit the form if user selects any option from the list. Problem is when i select any option it is giving error that this property is not suppo

  • Spry Horizontal Menu not displayed correctly in Internet Explorer 6

    Hello to everyone. I'm creating a website using David's tutorial. My Spry Horizontal Menu is correctly shown in Dreamweaver Live View, Firefox10 but not in IE6. It happears at the bottom of the page. Any advise? Thanks much in advance. Cecilia

  • Char Encoding Problem

    Hi every one. I looked over the forums to check if this problem was discussed before or not, and didn't find any thing I am running a JSP application accessing mySQL database, reading and displaying arabic records. This is the code:                St

  • How do I disable sound when sending a text

    My iPhone has been doing this lately and it's really annoying especially when all texting sounds have been turned off. It seems this one cannot. I'm talking about the sound the iPhone makes when it finishes sending a text. I see no option to turn thi