Results 1 to 6 of 6
  1. #1
    Doctor Cactus is offline Member
    Join Date
    Oct 2008
    Posts
    63
    Rep Power
    0

    Default Compile/Execute code in Java app

    Hi, I am writing a Java application and i need help. So, what i want to do is to compile and execute the code in a JTextArea which also shows errors(if any) on the screen. However, I also want to check that the code and the output of the program are correct, in the same way as on the Javala website. So, if the code and the output for a given exercise are correct, a message saying "Your program works correctly, exercise completed!" would appear on the screen. I have heard about the compiler class but I am unsure how to use it. Any ideas?

    Help is greatly appreciated.

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Basically what you want to do is, compile a Java class on the JTextArea. I've done quite anonymous thing this few years back. Write all of them in to a file and compile that file.

  3. #3
    Doctor Cactus is offline Member
    Join Date
    Oct 2008
    Posts
    63
    Rep Power
    0

    Default

    I don't understand. Could you explain what you mean and how to do what you are saying?

  4. #4
    Join Date
    Dec 2008
    Posts
    1
    Rep Power
    0

    Default Websphere security

    I am facing this error when enabling CEI in web sphere application server6.1 with username token profile security

    The MessageEndpoint activation failed for ActivationSpec com.ibm.ws.sib.api.jmsra.impl.JmsJcaActivationSpec Impl and
    MDB Application CEIEAR#LogMessageServerEJB.jar#CBECEIListener, due to the following exception:
    javax.resource.ResourceException: CWSIV0958E: The authorization exception
    com.ibm.wsspi.sib.core.exception.SINotAuthorizedEx ception: CWSIP0303E: No user specified when creating a connection to
    secure messaging engine 8434ONode03.server1-CommonEventInfrastructure_Bus on bus CommonEventInfrastructure_Bus. was
    thrown while attempting to create a connection to messaging engine 25907DEB4FFBE542 using the activation specification
    [com.ibm.ws.sib.api.jmsra.impl.JmsJcaActivationSpec Impl@1207715836 <userName=null> <password=null> <xaRecoveryAlias=null>
    <destination=topic://CommonEventInfrastructure_AllEventsTopic?topicSpac e=8434ONode03.server1.
    CommonEventInfrastructureTopicDestination&delivery Mode=NonPersistent&busName=CommonEventInfrastructu re_Bus>
    <durableSubscriptionHome=> <destinationType=javax.jms.Topic> <messageSelector=> <acknowledgeMode=Auto-acknowledge>
    <subscriptionDurability=NonDurable> <shareDurableSubscriptions=InCluster> <clientId=> <subscriptionName=>
    <maxBatchSize=1> <maxConcurrency=10> <busName=CommonEventInfrastructure_Bus> <shareDataSourceWithCMP=false>
    <targetTransportChain=> <readAhead=Default> <target=null> <targetType=BusMember> <targetSignificance=Preferred>].

  5. #5
    Doctor Cactus is offline Member
    Join Date
    Oct 2008
    Posts
    63
    Rep Power
    0

    Question

    Sorry, you have posted on the wrong thread. Can anyone explain how to solve this thread?

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by Doctor Cactus View Post
    I don't understand. Could you explain what you mean and how to do what you are saying?
    Save all content into a file. Then using a Process class compile the class.

Similar Threads

  1. how to execute an executable using java
    By kala143 in forum Java 2D
    Replies: 4
    Last Post: 09-26-2008, 03:10 PM
  2. simple problem - code wont compile
    By dirtycash in forum New To Java
    Replies: 1
    Last Post: 11-20-2007, 05:49 PM
  3. error stack when I try to execute my code
    By paty in forum New To Java
    Replies: 1
    Last Post: 08-02-2007, 08:32 PM
  4. Execute a new program in java
    By mathias in forum Advanced Java
    Replies: 1
    Last Post: 07-31-2007, 05:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •