Web Based Java Compiler

Hello,
I am doing Java programming at Bournemouth University and find it a real pain when half of the computers there only have the JRE and no J2SDK, for this reason I set work on a web front end for the JDK. Its quite probable that I will get hosting at the university on one of their servers but I also have my own which i have made public.
http://wcc.ath.cx/wjc
Just make a new account (simply username and password) and you can get started. Hopefully someone will find this useful.
any comments / suggestions welcome [email protected]
regards,
Karsten Pedersen
Edit: C++ version also up http://wcc.ath.cx/wcc

Looking at what you have done from the username I can suggest that you did not add .java to the end of the test source file. I failed to catch this error before I uploaded the first version of the web compiler, in the C++ one I made I checked the output log looking for the username + password string and removed it from the text but I overlooked this one in the java compiler because I failed to produce this bug. This will be fixed. The whole reason username/password/source is made is so that the username and password from the Session["UserPath"] can get you to the right directory. Please also be aware that no other users can see your password.
Cheers for the help!
Edit: Added the filtering so the above error should not occur, also added automatic .java extension to java version of compiler. C++ version http://wcc.ath.cx/wcc also running
Edited by: g7878444 on Dec 27, 2007 2:50 PM

Similar Messages

  • Web based Java

    Hi,
    I am a student developing a software for my final year project. I am developing a reminder system that will send text messages to students mobile phones. I know how to do this coding.
    Students would enter their details such as mobile phone number, the name of the reminder such as coursework deadlines, appointments. For this I need to develop a software that users can enter details onto the Web based way. I am not sure where I can start to learn these. Do you have any ideas of where I can start?
    The details would be picked up by my software such as the mobile phone number. The text messages will be done through the CLDC MIDP.

    Hi,
    An example of a description could be that students would like to know what coursework deadlines they have. It can be done a mobile phone but the text message it will also give a description of the coursework.
    What I am trying to do:
    a) I will be using J2ME to do this but from the software requirements I have gathered it shows that students would like to enter their details the web based way for example mobile phone number, times they want to be reminded, how many days to be reminded before. There will be many students.
    b) The details the students enters, these details will be picked up by my code that is J2ME and send text messages reminders to the students at the appropriate day and time.
    I know how how to do the coding to send text messages but I am not sure how I can do the web based way. Would Java Server Pages be useful for this? I am not sure. Can you please help?

  • Web based Java URGENT

    Hi,
    I am a student developing a software for my final year project. I am developing a reminder system that will send text messages to students mobile phones. I know how to do this coding.
    Students would enter their details such as mobile phone number, the name of the reminder such as coursework deadlines, appointments. For this I need to develop a software that users can enter details onto the Web based way. I am not sure where I can start to learn these. Do you have any ideas of where I can start?
    The details would be picked up by my software such as the mobile phone number. The text messages will be done through the CLDC MIDP.
    Students will enter their details onto the web based way. They will need have to a login.
    Do you know what I can learn or what I need to know to get started?

    are you looking at a simple java based web application? you can try it with JSP with some forms...a servlet and a few beans...you can authenticate the user login...you need a database....if you don't already have one...
    here's a simple design...
    1 jsp - login.jsp - 2 fields....user name and pwd - on submit, connect to a database and verify the user (do this by redirecting to a servlet)
    2 jsp - form with the required fields like name, subject, assignment, deadline...on submit, just store this in a table..
    if this is what you're looking for, I think this simple design should help...

  • Web-based java app para chat works on safari but not firefox

    on safari it loads fine, and that cup of coffee loads before displaying the chat, but on firefox it just loads the chat with no coffee cup first and the it displays terribly and i can't type in the chat box because it loads so disheveled looking. any thoughts?

    ?

  • Identity SSO API with non-web based appilcations

    hi,
    i can appreciate hwo this works with cookies etc for web based applications that use the api or one of the agents on apache etc.
    but how does it go with non web based java and say windows applications?
    can anyone point me to some docs?
    thanks

    I don't work for Sun but here are my thoughts
    1. Yes, if you don't want to use the AM SDK then the
    XML auth service is the way to go.
    2 & 3. dunno
    4. I think if you pass around the SSOToken ID
    generated by AM then any application can issue a SAML
    query to see if the session is still valid and get
    identity/auth attributes back
    5. I think SAML 2.0 supports authentication and
    single signoff
    6. If you are doing a lot of thick client apps you
    should use kerberos instead of AM web based
    Authentication. AM supports kerberos authentication,
    most modern browsers support SPEGNO for passing
    credentials to web server, AD supports Kerberos, and
    even Solaris 10 comes with a free KDC built into the
    OS. There is plenty of documentation around kerberos
    and the JDK out of the box supports GSS-API for
    Kerberos authenticationThank you for your feedback.
    We looked at the use of kerberos as well, but this is not really an option as we are dealing with fat clients installed on desktops of clients. So these desktops do not fall within our span control (multiple domain controllers etc.).
    Regards,
    Thomas

  • Running Opera, flickr, teashark and web based apps...

    I am unable to run web based applications like opera mini flickr cellity Teashark and others.
    Whereas opera,flickr are some inbuilt apps but still unable to access internet through them.
    Internet accessing is fine via default browser but none of the web browsers like Opera mini, Teashark,etc are not working.
    Its not the problem of Network since on my other mobiles, apps run fine.
    Please reply with the solution for the problem so that i can access web via web based Java Apps.
    Message Edited by aparichit on 11-Oct-2008 12:49 PM

    m so sry my net connection was nt working so couldn't reply
    ok so here is step by step procedure:
    Menu->Settings->Configuration->Personal config. sett->Options->Add New->Access Point:
    now what you hav to do here is dat basically you need to know the access point of the setting you want to use key in the access point there. user name and password are nt needed usually.
    save that access point and go back to the configuration page nw in 'preferred access pt.' set dat access point which you created just nw.
    this process worked for me mayb this works for you all too. (i've presumed dat you all have got your internet services activated from your provider)
    if you don't knw the name of your access point then your operator's customer care centre could be of some help..
    Was this post of some help? Click 'Kudos' star on the right hand side of this post. Your gesture will be highly appreciated!

  • Open a form from a 3rd party Java/Web based application

    Hi All,
    I am working for a client who has a 3rd party web application built in Java.
    For one of his requirements, he wants to open a form, an apps standard form on the click of a button/url in their application.
    This appears like a normal form opening from the single-signon screen where you have the self service single sign-on page, it opens the apps forms on click of the url. Can we use the same logic here? This being the case, just curious to know how is the url to open the form built? (I see that the function name, resp id etc are there in the url) So that, I can actually manipulate the url to open the forms from a url. Please see that the custom application also is included into our Oracle apps, so the user is already logged in. We just need to open the form from the click of a url/button.
    Thanks,
    Srini.
    Thanks,
    Srini.

    If the ICX_SESSION is already available then the form(I am assuming you are refering to a web based form here) should open directly if the function should be accessible to the user logged in. When you say your custom application is included in Oracle apps are you launching these pages from the Ebiz home page through menus and functions ?

  • Front End (GUI) for Java Web Based Appl.

    Hi Gurus,
    I am new to Java. Can anybody tell me, what is the front end(GUI) used in Java web based applications? I was told that Swings/Applets are rarely used. Is there are a 3rd party took to design GUI for Java based applications?
    Chooti Baba

    sunilmp wrote:
    U mean to say, for JSP/Servlets, "Web based application" as well as "JSP/Servlet" usually implies that the client is a simple web browser.
    we cannot have swing as front end?You can use Swing inside an Applet inside a web application, but usually that's not needed, as you already have a client application that's quite powerful (the browser).

  • Web based Auto dialer in java

    Hi,
    I have assigned the work that implementation of "web based auto dialer in java". The problem is I have a button on the web page . when I click on that button . I have to call to particular number (fixed number). I have search a lot . I didn't get . please tell me how to approach or please send me the code anybody have already implemented.

    Hello Developers,
    i am a new bee in this field. I have stressed out myself searching over the Internet. To my bad luck, not able to understand how the hel to proceed. What i was able to get were some s/ws .
    I request the community to please guide, how to proceed .
    Will be really grate full!
    Even a little help will be appreciated!!

  • Java tool (with a web based interface)

    Hello all experts,
    This is what may client has said:
    +"We require a Java tool (with a web based interface) that will+
    +screen scrape or copy the Britannica source content from http://www.britannica.com/ by+
    +category. Then import those pages into confluence+
    +<http://www.matrixian.com/software/confluence/> Britannica . Optimally+
    +this tool will work as a plug-in for confluence+
    +<http://www.matrixian.com/software/confluence/> Britannica."+
    Can anyone please tell me what are the processes (java technology) I should undertake to build the system successfully?
    Thanks and Regards,

    Find a lawyer.
    As it appears, without evidence from you to the contrary that you are asking how to use Java to steal copyrighted content I would humbly suggest that you investigate, whether (a) the activity is illegal (b) whether you feel comfortable legally and ethically in helping someone steal content.
    Happily your actual Java related question is quite trivial and the fact that you had to to ask and couldn't either figure it out on your own nor find a suitable answer through searching suggests that you will be unable to provide the client with what they ask based on your current skill set. Aka the legality won't be an issue since you don't appear competent enough anyway.

  • Use java do something similiar to ws_ftp for web based

    Hi, I'm just wondering is it possible to use java or java applet to do something similiar to ws_ftp for web based purpose?
    The idea is 2 windows. 1 for local harddisk browsing and another for the remote ftp server. So that I can drag and drop (or click the arrow button) from this window to that window to upload a file.
    If it's possible. can anyone help me get started? Such as where to find documentation or what library to use etc? Thanks

    if i am not wrong, you can use servlets and serialization....but you have to check those out yourself.
    sorry, i am not being not of much help!

  • Web-based Assembler

    hai
    if i want to build up a web-based Assembler system that can provided services likes MASM. It can compiler the 8086 assembly code enter by client and come out a result and send back to client and display the result on client screen. How to develop it? i am using Tomcat-apache to built it. So, can i ask how do i link the assembler 8086 MASM to Tomcat-apache, so that it can call the assembler when it receive the code by the client?How to display the result on the client site when received the result?
    thanks

    howdy,
    i doubt why u've choosen Java for this kind of stuff !
    but u need to call MASM's executable within ur server's JVM ( ie : from ur servlet u execute it by Runtime.getRuntime().exec() method )
    The more appropriate job is to use JNI to call a C/C++ code to do that, but later is some how complicated.
    after the masm created results on a file, just ( in some way ) include that file in ur JSP.
    try the first one if it works.
    --Behrad                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Example code for java compiler with a simple GUI

    There is no question here (though discussion of the code is welcome).
    /* Update 1 */
    Now available as a stand alone or webstart app.! The STBC (see the web page*) has its own web page and has been improved to allow the user to browse to a tools.jar if one is not found on the runtime classpath, or in the JRE running the code.
    * See [http://pscode.org/stbc/].
    /* End: Update 1 */
    This simple example of using the JavaCompiler made available in Java 1.6 might be of use to check that your SSCCE is actually what it claims to be!
    If an SSCCE claims to display a runtime problem, it should compile cleanly when pasted into the text area above the Compile button. For a compilation problem, the code should show the same output errors seen in your own editor (at least until the last line of the output in the text area).
    import java.awt.BorderLayout;
    import java.awt.Font;
    import java.awt.EventQueue;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JLabel;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.JButton;
    import javax.swing.SwingWorker;
    import javax.swing.border.EmptyBorder;
    import java.util.ArrayList;
    import java.net.URI;
    import java.io.ByteArrayOutputStream;
    import java.io.OutputStreamWriter;
    import javax.tools.ToolProvider;
    import javax.tools.JavaCompiler;
    import javax.tools.SimpleJavaFileObject;
    /** A simple Java compiler with a GUI.  Java 1.6+.
    @author Andrew Thompson
    @version 2008-06-13
    public class GuiCompiler extends JPanel {
      /** Instance of the compiler used for all compilations. */
      JavaCompiler compiler;
      /** The name of the public class.  For 'HelloWorld.java',
      this would be 'HelloWorld'. */
      JTextField name;
      /** The source code to be compiled. */
      JTextArea sourceCode;
      /** Errors and messages from the compiler. */
      JTextArea output;
      JButton compile;
      static int pad = 5;
      GuiCompiler() {
        super( new BorderLayout(pad,pad) );
        setBorder( new EmptyBorder(7,4,7,4) );
      /** A worker to perform each compilation. Disables
      the GUI input elements during the work. */
      class SourceCompilation extends SwingWorker<String, Object> {
        @Override
        public String doInBackground() {
          return compileCode();
        @Override
        protected void done() {
          try {
            enableComponents(true);
          } catch (Exception ignore) {
      /** Construct the GUI. */
      public void initGui() {
        JPanel input = new JPanel( new BorderLayout(pad,pad) );
        Font outputFont = new Font("Monospaced",Font.PLAIN,12);
        sourceCode = new JTextArea("Paste code here..", 15, 60);
        sourceCode.setFont( outputFont );
        input.add( new JScrollPane( sourceCode ),
          BorderLayout.CENTER );
        sourceCode.select(0,sourceCode.getText().length());
        JPanel namePanel = new JPanel(new BorderLayout(pad,pad));
        name = new JTextField(15);
        name.setToolTipText("Name of the public class");
        namePanel.add( name, BorderLayout.CENTER );
        namePanel.add( new JLabel("Class name"), BorderLayout.WEST );
        input.add( namePanel, BorderLayout.NORTH );
        compile = new JButton( "Compile" );
        compile.addActionListener( new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
              (new SourceCompilation()).execute();
        input.add( compile, BorderLayout.SOUTH );
        this.add( input, BorderLayout.CENTER );
        output = new JTextArea("", 5, 40);
        output.setFont( outputFont );
        output.setEditable(false);
        this.add( new JScrollPane( output ), BorderLayout.SOUTH );
      /** Compile the code in the source input area. */
      public String compileCode() {
        output.setText( "Compiling.." );
        enableComponents(false);
        String compResult = null;
        if (compiler==null) {
          compiler = ToolProvider.getSystemJavaCompiler();
        if ( compiler!=null ) {
          String code = sourceCode.getText();
          String sourceName = name.getText().trim();
          if ( sourceName.toLowerCase().endsWith(".java") ) {
            sourceName = sourceName.substring(
              0,sourceName.length()-5 );
          JavaSourceFromString javaString = new JavaSourceFromString(
            sourceName,
            code);
          ArrayList<JavaSourceFromString> al =
            new ArrayList<JavaSourceFromString>();
          al.add( javaString );
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          OutputStreamWriter osw = new OutputStreamWriter( baos );
          JavaCompiler.CompilationTask task = compiler.getTask(
            osw,
            null,
            null,
            null,
            null,
            al);
          boolean success = task.call();
          output.setText( baos.toString().replaceAll("\t", "  ") );
          compResult = "Compiled without errors: " + success;
          output.append( compResult );
          output.setCaretPosition(0);
        } else {
          output.setText( "No compilation possible - sorry!" );
          JOptionPane.showMessageDialog(this,
            "No compiler is available to this runtime!",
            "Compiler not found",
            JOptionPane.ERROR_MESSAGE
          System.exit(-1);
        return compResult;
      /** Set the main GUI input components enabled
      according to the enable flag. */
      public void enableComponents(boolean enable) {
        compile.setEnabled(enable);
        name.setEnabled(enable);
        sourceCode.setEnabled(enable);
      public static void main(String[] args) throws Exception {
        Runnable r = new Runnable() {
          public void run() {
            JFrame f = new JFrame("SSCCE text based compiler");
            f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
            GuiCompiler compilerPane = new GuiCompiler();
            compilerPane.initGui();
            f.getContentPane().add(compilerPane);
            f.pack();
            f.setMinimumSize( f.getSize() );
            f.setLocationRelativeTo(null);
            f.setVisible(true);
        EventQueue.invokeLater(r);
    * A file object used to represent source coming from a string.
    * This example is from the JavaDocs for JavaCompiler.
    class JavaSourceFromString extends SimpleJavaFileObject {
      * The source code of this "file".
      final String code;
      * Constructs a new JavaSourceFromString.
      * @param name the name of the compilation unit represented
        by this file object
      * @param code the source code for the compilation unit
        represented by this file object
      JavaSourceFromString(String name, String code) {
        super(URI.create(
          "string:///" +
          name.replace('.','/') +
          Kind.SOURCE.extension),
          Kind.SOURCE);
        this.code = code;
      @Override
      public CharSequence getCharContent(boolean ignoreEncodingErrors) {
        return code;
    }Edit 1:
    Added..
            f.setMinimumSize( f.getSize() );Edited by: AndrewThompson64 on Jun 13, 2008 12:24 PM
    Edited by: AndrewThompson64 on Jun 23, 2008 5:54 AM

    kevjava wrote: Some things that I think would be useful:
    Suggestions reordered to suit my reply..
    kevjava wrote: 2. Line numbering, and/or a line counter so you can see how much scrolling you're going to be imposing on the forum readers.
    Good idea, and since the line count is only a handful of lines of code to implement, I took that option. See the [line count|http://pscode.org/stbc/help.html#linecount] section of the (new) [STBC Help|http://pscode.org/stbc/help.html] page for more details. (Insert plaintiff whining about the arbitrary limits set - here).
    I considered adding line length checking, but the [Text Width Checker|http://pscode.org/twc/] ('sold separately') already has that covered, and I would prefer to keep this tool more specific to compilation, which leads me to..
    kevjava wrote: 1. A button to run the code, to see that it demonstrates the problem that you wish for the forum to solve...
    Interesting idea, but I think that is better suited to a more full blown (but still relatively simple) GUId compiler. I am not fully decided that running a class is unsuited to STBC, but I am more likely to implement a clickable list of compilation errors, than a 'run' button.
    On the other hand I am thinking the clickable error list is also better suited to an altogether more abled compiler, so don't hold your breath to see either in the STBC.
    You might note I have not bothered to update the screenshots to show the line count label. That is because I am still considering error lists and running code, and open to further suggestion (not because I am just slack!). If the screenshots update to include the line count but nothing else, take that as a sign. ;-)
    Thanks for your ideas. The line count alone is worth a few Dukes.

  • How to migrate from forms to web based application

    Hi,
    I did a form for Oracle applications, but client need a web based form for this application how can i migrate this to web based form. If it is possible can u give me suggestion how migrate.
    Kishore B

    Not sure if that's possible, as developing forms for Oracle Applications requires the use of TEMPLATE.fmb to start with, and the use of certain standards to adhere to the look and feel of the applications. Review the Oracle Applications Developer's guide for more details.
    What You may do now is to upload the form to the Application Server and compile it to the adequate directory $PRODUCT_TOP/forms/[LANG], register the form, associate to a function and use it in a menu to see it trough Oracle Applications standard interface, but it may show a very different L&F and not all standard functionality may be available. With the Dev Guide's on hand, apply required changes and test Your form in the application.

  • Migrate from GUI to web based application

    what's the easy and the fast method to migrate java GUI application to a web based aplpication.
    thanks in advance for information

    There is no simple or easy or fast way if the application were not properly designed.
    Does it follow the Model-View-Controller pattern? If it does, your migration path is easier. If it is the typical app (the button listener method does it all), the migration path is not.
    I guess that you will have to redesign the app and reuse only very specific parts of your code, like formulae calculations.
    Code is cheap, analysis and testing are not.

Maybe you are looking for