Java application calculate monthly loan payments

This is due Feb. 19 and I can't get the for statement to calculate right. Can someone tell me what I'm doing wrong. I'll copy and paste the program:
import java.text.DecimalFormat;
import javax.swing.*; // import package javax.swing
public class Lab4 {
     public static void main( String args[] )
     double L, // loan amount
          R, // monthly interest rate
          P, // monthly loan payment
          S, // used for counting
          APR, // annual % for interest
          balance,
          newBalance,
          principle,
          interestPart;
     int Y,
          M = 0,
          count = 1;
     // read in Loan amount from user
     String Loan =
          JOptionPane.showInputDialog(
          "Enter Amount for Loan/Mortgage" );
     // read in Interest Rate from user
     String InterestRate =
          JOptionPane.showInputDialog(
          "Enter Interest Rate (APR) .XXX" );
     // read Period of Years for Loan
     String Year =
          JOptionPane.showInputDialog(
          "Enter Period (Years) for Loan/Mortgage");
     // convert from type String to type Double
     L = Double.parseDouble ( Loan );
     APR = Double.parseDouble ( InterestRate );
     Y = Integer.parseInt ( Year );
          R = APR / 12;
          S = 0;
     // create JTextArea to display output
     JTextArea outputTextArea = new JTextArea(20,50);
     JScrollPane scroller = new JScrollPane(outputTextArea);
     // used to set the decimal places
DecimalFormat twoDigits = new DecimalFormat( "0.00" );
     while ( M < (Y*12))
          S += Math.pow(1.0 + R, M);
          P = L * (1.0 + R * S) / S;
     // set first line of text in outputTextArea
     outputTextArea.setText( "Loan/Mortgage Amount: $" +           twoDigits.format( L ) + "\nInterest Rate: " +
          APR * 100 + "%" + "\nLoan Period (Years): " +
          Y + "\nMonthly Payment: $" + twoDigits.format( P ) +
          "\n\n\tAMORTIZATION SCHEDULE\n\n" + "Payment " +
          " Principle Part " + " Interest Part " +
          " Loan\n" + "Number " + " of Payment"
          + " of Payment " + " Balance\n\n");
          M = M +1;
     for ( count = 0; count <= (Y*12); count++ )
          S += Math.pow(1.0 + R, M);
          P = L * (1.0 + R * S) / S;
          interestPart = balance * (APR / 12)*10;
          principle = P - interestPart;
          newBalance = balance - principle;
          outputTextArea.append(count + "\t" +                     twoDigits.format(principle) +
          "\t" + twoDigits.format(interestPart) + "\t" +                twoDigits.format(newBalance) + "\n");
          M = M + 1;
          balance = newBalance;
     JOptionPane.showMessageDialog( null,                scroller, "Loan/Mortgage Data",
          JOptionPane.INFORMATION_MESSAGE );
          System.exit( 0 );

Yep,
1. remove the text areas from the code
2. // comment out the OptionPanes for now and put amounts in manually eg
years = 25;
interestRate = 12.7;
amountToBorrow = 50000;
3. In psudocode (I'm not sure what your formulas are doing here???)
int months = yearsFortheRepayment * 12;
for(int i=0; i < months; i++){
total = total * monthlyInterestRate; //or whatever the formula is here
4. Comment out the rest of the code and test it up to here with;-
System.out.println("Test, is this part right? Total payment="+total);
Is it the right figure?
5. Do the same for the second formula
6. If this is right, put back (uncomment) the JOptionPane's and take out these;-
years = 25;
interestRate = 12.7;
amountToBorrow = 50000;
Then see if it still works the same with the same figures.
7. Display the results for your 2 stages with a JOP.showMessageDialog.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
If you post your code again use the your code in here tags to format it nicely and follow coding conventions they're there for a very good reason ie: indenting and naming - some of the variable identifier names you have used are not good, making the code hard to track. Good luck.

Similar Messages

  • Returning an array type from a local method in Web Dynpro Java application

    Hi,
    In my project, we have a requirement to display 18 rolling months along with the year, starting from current month.
    How I am going to approach is that I will get the system date and get the current month and send the month and year value to a local method which will return 18 rolling months along with the year.
    But, when I tried to create a new method there is no option to return an array type. It was greyed out.
    So, we can not return an array type from a method from Web Dynpro for Java application?
    If so, what is the alternative and how am I going to achieve it?
    I will appreciate your help!
    Regards
    Ram

    HI
    You can create new methods in
      //@@begin others
      private ArrayList MyMethod(){
           // ** Put your code here
           return new ArrayList();
      //@@end
    Other option are create a context node with cardinality 0...n with one or more attributes, and in your method create the needed registers into this node. To read this values, you only need to read your context node.
    Best regards
    Edited by: Xavier Aranda on Dec 2, 2010 9:41 AM

  • Just finished my first Java application. What's next?

    Thanks to the kind help from everyone on this forum and some intensive labor for the last couple of months, I've finally given birth to my first Java application. I used Netbeans as my IDE of choice. During the development stages I would run my project directly from the IDE. In the project folder, a total of five folders were created: build, dist, nbproject, src, and test as well as two files build.xml and manifest.mf.
    Being a newbie in this field, I was wondering about the remaining steps needed to distribute the application. Here are some questions that come to mind:
    1) I know I can simply just double-click the project's *.jar* file to get it work. Is that the norm with Java applications or do I need to create a different file? I'm used to seeing *.exe* files. I'm also used to seeing an installation process, which brings me to my next question.
    2) Do you simply just zip the entire project folder and allow people to download it on their computer hoping they know how to access the *.jar* file?
    3) Seeing that I've only been testing the application in Netbeans, will there be file path or classpath problems if I run it on other computers? Are there necessary steps I need to follow to avoid such problems?
    4) Do you take any precautionary steps to protect your code? Do you lock the folders?
    5) In the future, if I decide to add a small fee to download the application, how hard would it be to add a password activation feature? (I know this could get pretty complex)
    Thanks in advance for all your suggestions.

    mohogany wrote:
    Thanks to the kind help from everyone on this forum and some intensive labor for the last couple of months, I've finally given birth to my first Java application. I used Netbeans as my IDE of choice. During the development stages I would run my project directly from the IDE. In the project folder, a total of five folders were created: build, dist, nbproject, src, and test as well as two files build.xml and manifest.mf.
    Being a newbie in this field, I was wondering about the remaining steps needed to distribute the application. Here are some questions that come to mind:
    1) I know I can simply just double-click the project's *.jar* file to get it work. Is that the norm with Java applications or do I need to create a different file? I'm used to seeing *.exe* files. I'm also used to seeing an installation process, which brings me to my next question.It's quite common to provide a shell script (batch file, etc) to launch the app.
    2) Do you simply just zip the entire project folder and allow people to download it on their computer hoping they know how to access the *.jar* file?You can do. There are also installation utilities around. InstallAnywhere is the only one I've ever used, but others do exist.
    3) Seeing that I've only been testing the application in Netbeans, will there be file path or classpath problems if I run it on other computers? Are there necessary steps I need to follow to avoid such problems?Probably. The best way to avoid them is to test them, and to not ever depend on the CLASSPATH environment variable. That's a portability nightmare.
    4) Do you take any precautionary steps to protect your code? Do you lock the folders? Nope.
    5) In the future, if I decide to add a small fee to download the application, how hard would it be to add a password activation feature? (I know this could get pretty complex) Don't bother. Unless you've got something amazing, in which case you'll be needing lawyers, it's not worth the trouble of charging for it. No offence, but your first Java app is hardly going to set the world on fire anyway.
    No matter what you try and do to stop people stealing your code, they'll manage it. Or, alternatively, just steal your idea instead.

  • Webdynpro java application in UWL

    Hi Experts,
          My requirement is we  had one Java application , we need to link up this application into UWL  , and every month end who is accessing that application that guys have to get alert for to fill that form
        My question is is there any chance to link up this java application into UWL , please help on this issue or any possible ways is there.
    Thanks
    Renuka

    Hi Renuka,
    Have you had a look at the Javadocs?  The API is listed here and could fullfill your needs.  I have seen other customers build their own custom connectors to link to their own custom applications with the API documentation and coding:
    http://help.sap.com/javadocs/
    When you get to the main page, pick the version that you are working with, and then select Universal Worklist API's.
    Beth Maben
    EP - Senior Support Consultant
    AGS Primary Support, Business Suite & Technology
    Please see the UWL Wiki @
    http://www.sdn.sap.com/irj/scn/wiki?path=/display/bpx/uwl+faq  ***

  • Using wget in java application

    Hello.
    I want use 'wget' command from my Java application
    for 'wget' i created command as String type.
    Here is it
    String url_str=wget --post-data "year=2009&month=08&day=01&time=0&profile=1&start=0&stop=1000&step=50&par=&format=0&vars=01&vars=02" http://testsite.com/cgi/script.cgi -O /home/user/test_wget.txt
    then i use it in exec method
    try{
    Runtime rt = Runtime.getRuntime();
    Process p = rt.exec(url_str);
    p.waitFor();
    BufferedReader r = new BufferedReader(
    new InputStreamReader(p.getErrorStream()));
    String s;
    while ((s = r.readLine())!=null) {
    System.out.println( s );
    r.close();
    catch (IOException e){
         // TODO Auto-generated catch block
         e.printStackTrace();
    catch ( InterruptedException e ) {
         e.printStackTrace();
    after running the file test_wget.txt hold
    Error
    Wrong key: not alpha/numerical characters
    however, if i use my url_str from Linux command line
    test_wget.txt is hold usefull data.
    So, how working correct with wget from Java application?
    Thanks for any replys

    So, how working correct with wget from Java application?You don't use it; you use Apache HttpClient in stead which can do exactly the same and more without you needing to call platform specific command line tools.
    In any case if you must go down this path, read this article front to back:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Change java application to exe file

    I want to change the java application(*.class)to the exe file in WIN OS in order to update its speed, can anyone tell me some useful infomation? thanx in advance.
    Holly

    I have been using VAJ for several months now and I have not found the option to compile a native executable. Its help system is the worst I can recall ever seeing. So can you tell me exactly how to do that with VAJ?

  • Developing Java Applications for Windows CE

    Hello,
    I hope this sub forum is right. So I must develop a Java Application for Windows CE. I read something about J2ME, but I think this is only for Mobilephone and Windows CE supports AWT. So I tried just some simple forms with J2ME.
    Can anybody tell me how I develop java Applications for Windows CE? Can I use Eclipse or must I use another IDE?
    Realy I developed Swing 5-6 Month but I have no idea how I develop Java Applications for Windows CE.
    Thanks a lot for helping...

    The MIDP for Palm OS 1.0 requires Palm OS v3.5 or higher to run. According to your error message, the emulator is not running v3.5 or higher. Try to get hold of a ROM image with a later version. I've run it with v4.0 of the OS and it works.

  • Help!!  Cannot launch Java application

    I have absolutely no experience with java and i need some technical help.. i have a few different java applications on my mac osx version 10.4.11 . Two applications in particular that were working at one point are now not working... my husband reinstalled java and one program is now working(after reinstalling it too) but i am having problems with my dropshots application. i get this error :
    uncaught exception in main method:
    java.lang.NoSuchMethodError
    What does this mean? i am searching for answers and have come up with nothing. i know that java is a programming language, but i am not trying to write code- i am just having a difficult time running an application. it was working for about 3 months prior to now... i am CLUELESS!!
    this is what i am seeing in the console- it makes no sense to me and i am willing to learn and do anything to fix this problem.
    [JavaAppLauncher Error] CallStaticVoidMethod() threw an exception
    Exception in thread "main" java.lang.NoClassDefFoundError: com/apple/eawt/ApplicationListener
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:190)
         at apple.launcher.LaunchRunner.loadMainMethod(LaunchRunner.java:55)
         at apple.launcher.LaunchRunner.run(LaunchRunner.java:84)
         at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
         at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
    JAI installed.
    [LaunchRunner Error] com.jusspress.client.JussPress.main(String[]) threw an exception:
    java.lang.NoSuchMethodError
         at com.jusspress.client.JussPress.main(JussPress.java:51)
         at java.lang.reflect.Method.invoke(Native Method)
         at apple.launcher.LaunchRunner.run(LaunchRunner.java:88)
         at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
         at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
    thanks for your help- i REALLY appreciate it!

    ktoponce wrote:
    I have absolutely no experience with java and i need some technical help.. i have a few different java applications on my mac osx version 10.4.11 . Two applications in particular that were working at one point are now not working... my husband reinstalled java and one program is now working(after reinstalling it too) but i am having problems with my dropshots application. i get this error :
    uncaught exception in main method:
    java.lang.NoSuchMethodErrorMy guess is that you Mac upgraded to a newer version of Java (probably 1.5.0_13 if this just happened recently) and the program you were running doesn't work with the new version.
    Can you find out if there is a newer version of the program? Or if other users are having similar problems?

  • Error while running Java application using Crystal Reports 2011

    Hello,
    I would like to ask for your help.
    Environment details:
    Java based standalone application in Development environment.
    Crystal Reports 2011 (no SP applied)
    Oracle 11g ( 32 bit client installed)
    Win7 64 bit OS.
    Workflow:
    While running the java application, which will display the reports I am getting the below mentioned error. I guess that is because I am missing the Crystal runtimes (Correct me if I am wrong).
    I know that CR2011 do not have any sdks/ jar available for deployment. In this case, which runtimes should I be using? Does installing CR2011 be enough in the development box?
    Please provide me the link from which I can download the same.
    Let me know if I need to provide more details on this. Any suggestions are most welcome.
    Thank You.
    Code used:
    reportClientDoc = new ReportClientDocument();
    System.err.println("Opening the Report ");
    reportClientDoc.open(REPORT_PATH, 0);
    // this is where the error or exception is thrown
    _Error: _
    log4j:WARN No appenders could be found for logger (com.crystaldecisions.reports.reportdefinition.ReportDocument).
    log4j:WARN Please initialize the log4j system properly.
    com.crystaldecisions.sdkreport.lib.ReportSDKException: com/businessobjects/reports/jdbinterface/common/DBException---- Error code:-2147467259 Error code name:failed
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.<init>(SourceFile:286)
                    at com.businessobjects.sdk.erom.jrc.a.<init>(SourceFile:43)
                    at com.businessobjects.sdk.erom.jrc.ReportAgentFactory.createAgent(SourceFile:46)
                    at com.crystaldecisions.proxy.remoteagent.RemoteAgent.<init>(SourceFile:703)
                    at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:662)
                    at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:632)
                    at com.crystaldecisions.sdk.report.application.ClientDocument.if(SourceFile:504)
                    at com.crystaldecisions.sdk.report.application.ClientDocument.open(SourceFile:669)
                    at com.crystaldecisions.reports.sdk.ReportClientDocument.open(Unknown Source)
                    at rp.batch.bo.RpJRCExportReport.runReportExport(RpJRCExportReport.java:517)
                    at rp.batch.bo.RpSchedReportRun.process(RpSchedReportRun.java:163)
                    at rp.batch.bo.RpSchedReportRun.drive(RpSchedReportRun.java:240)
                    at rp.batch.bo.RpSchedReportRun.main(RpSchedReportRun.java:265)
    Caused by: java.lang.NoClassDefFoundError: com/businessobjects/reports/jdbinterface/common/DBException
                    at com.crystaldecisions.reports.queryengine.Session.a2(SourceFile:244)
                    at com.crystaldecisions.reports.datafoundation.DataFoundation.do(SourceFile:376)
                    at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.do(SourceFile:111)
                    at com.crystaldecisions.reports.dataengine.datafoundation.CreateDataConnectionCommand.new(SourceFile:81)
                    at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)
                    at com.crystaldecisions.reports.common.Document.a(SourceFile:203)
                    at com.businessobjects.reports.reportconverter.v12.e.a(SourceFile:442)
                    at com.businessobjects.reports.reportconverter.v12.e.a(SourceFile:231)
                    at com.businessobjects.reports.reportconverter.v12.d.m(SourceFile:192)
                    at com.businessobjects.reports.reportconverter.v12.f.if(SourceFile:210)
                    at com.businessobjects.reports.reportconverter.v12.V12SaveLoader.a(SourceFile:242)
                    at com.businessobjects.reports.loader.ReportLoader.a(SourceFile:205)
                    at com.businessobjects.reports.sdk.JRCReportLoader.a(SourceFile:137)
                    at com.businessobjects.reports.sdk.JRCReportLoader.a(SourceFile:76)
                    at com.businessobjects.reports.sdk.requesthandler.ReportDocumentRequestHandler.a(SourceFile:136)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.<init>(SourceFile:229)
                    ... 12 more
    Caused by: java.lang.ClassNotFoundException: com.businessobjects.reports.jdbinterface.common.DBException
                    at java.net.URLClassLoader1.run(URLClassLoader.java:200)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
                    at sun.misc.LauncherAppClassLoader.loadClass(Launcher.java:301)
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
                    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
                    ... 28 more

    Help me ...
    Ambient:
    Crystal Reports Viewer 14.0.0.0
    java.vendor = Sun Microsystems Inc.
    java.version = 1.6.0_37
    os.name = Windows NT (unknown)
    os.version = 6.2
    os.arch = amd64
    Exception:
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: com.businessobjects.sdk.erom.jrc.ReportAgentFactory---- Error code:-2147215357 [CRSDK00000026] Error code name:internal
              at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(ReportSDKException.java:112)
              at com.crystaldecisions.proxy.remoteagent.RemoteAgent.createDefaultAgent(RemoteAgent.java:1000)
              at com.crystaldecisions.sdk.occa.report.application.ClientDocument.initRemoteAgent(ClientDocument.java:770)
              at com.crystaldecisions.sdk.occa.report.application.ClientDocument.open(ClientDocument.java:961)
              at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.open(ReportClientDocument.java:226)
              at src.HelloWorldSwing.createAndShowGUI(HelloWorldSwing.java:54)
              at src.HelloWorldSwing.main(HelloWorldSwing.java:24)
    Source:
    import java.awt.BorderLayout;
    import javax.swing.JFrame;
    import com.crystaldecisions.ReportViewer.ReportViewerBean;
    import com.crystaldecisions.sdk.occa.report.application.DatabaseController;
    import com.crystaldecisions.sdk.occa.report.application.OpenReportOptions;
    import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;
    import com.crystaldecisions.sdk.occa.report.data.IConnectionInfo;
    import com.crystaldecisions.sdk.occa.report.reportsource.IReportSource;
    public class HelloWorldSwing {
               * @param args
              public static void main(String[] args) {
                        HelloWorldSwing pgm = new HelloWorldSwing();
                        try {
                                  pgm.createAndShowGUI();
                        } catch (Exception e) {
                                  e.printStackTrace();
                                  //JOptionPane.showMessageDialog(null, e.toString());
               * @throws Exception
              public void createAndShowGUI() throws Exception {
                        // Make sure we have nice window decorations.
                        JFrame.setDefaultLookAndFeelDecorated(false);
                        // Create and set up the window.
                        JFrame frame = new JFrame("HelloWorldSwing");
                        frame.setTitle("Titolo del Report");
                        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                        ReportViewerBean viewer = new ReportViewerBean();
                        viewer.init(new String[0], null, null, null);
                        ReportClientDocument rpt = new ReportClientDocument();
                        rpt.setReportAppServer(ReportClientDocument.inprocConnectionString); // inproc:jrc
                        rpt.open("Report.rpt", OpenReportOptions._openAsReadOnly);
                        IReportSource rptSource = rpt.getReportSource();
                        viewer.setReportSource(rptSource);
                        frame.getContentPane().add(viewer, BorderLayout.CENTER);
                        frame.setSize(1930, 1030);
                        frame.setVisible(true);
                        viewer.start();

  • Problem while deploying a webdynpro java application in NWDS 7.1 version

    HI All,
            I got the below error when i deploying the  webdynpro java application in NWDS 7.1 version..help me out...........................................
    Exception:
    com.sap.ide.eclipse.deployer.api.APIException: ConnectionException,cause=[Ecc]
    NameNotFoundException.The SAP J2EE ENGINE service 'tcbldeploy_controller' is not available
    because of deployment or down engine( service ).
    Reason: Object not found in lookup of
    tcbldeploy_controller.
         at
    com.sap.ide.eclipse.deployer.dc.ComponentManagerImpl.getDeployProcessor(ComponentManagerImpl
    .java:64)
         at com.sap.ide.eclipse.sdm.threading.DCDeployThread.run(DCDeployThread.java:118)
    Caused by: com.sap.engine.services.dc.api.ConnectionException: [ERROR CODE DPL.DCAPI.1118]
    NameNotFoundException.The SAP J2EE ENGINE service 'tcbldeploy_controller' is not available
    because of deployment or down engine( service ).
    Reason: Object not found in lookup of
    tcbldeploy_controller.
         at
    com.sap.engine.services.dc.api.session.impl.SessionImpl.createCM(SessionImpl.java:320)
         at
    com.sap.engine.services.dc.api.deploy.impl.DeployProcessorImpl.<init>(DeployProcessorImpl.ja
    va:136)
         at
    com.sap.engine.services.dc.api.deploy.impl.DeployProcessorFactoryImpl.createDeployProcessor(
    DeployProcessorFactoryImpl.java:26)
         at
    com.sap.engine.services.dc.api.impl.ComponentManagerImpl.getDeployProcessor(ComponentManager
    Impl.java:46)
         at
    com.sap.ide.eclipse.deployer.dc.ComponentManagerImpl.getDeployProcessor(ComponentManagerImpl
    .java:58)
         ... 1 more
    Caused by: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object
    not found in lookup of tcbldeploy_controller.
         at
    com.sap.engine.services.jndi.implserver.ServerContextImpl.lookup(ServerContextImpl.java:649)
         at
    com.sap.engine.services.jndi.implserver.ServerContextRedirectableImpl.lookup(ServerContextRe
    directableImpl.java:80)
         at
    com.sap.engine.services.jndi.implserver.ServerContextImplp4_Skel.dispatch(ServerContextImplp
    4_Skel.java:555)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:319)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:200)
         at
    com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136
         at
    com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.pro
    cess(ApplicationSessionMessageListener.java:33)
         at
    com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)

    First check is Java stack is running ?
    make sure J2EE_ADMIN user not locked.
    Ans please check password in secure area. check password in secure store should be correct.
    may be you can try with restart of SAP and DB.
    All the best
    regards
    nag

  • Storing chinese in client odb from java application

    Hi all,
    first i like to thank Greg Rekounas for his wonderful support and contribution....
    This is my server setup.
    os-windows 2000 sp4
    db-oracle 9ir2 (unicode with AL32UTF8 charset)
    lite-oracle10g r2 (with latest patchset)
    nls_lang- AMERICAN_AMERICA.AL32UTF8
    storing and retriving chinese in oracle 9i database from isql*plus works.
    lite configuration.
    1. In $OLITE_HOME\mobile_oc4j\j2ee\mobileserver\applications
    \mobileserver\setup\common\webtogo\webtogo.ora file edited the JAVA_OPTION
    to:
    JAVA_OPTION=-Djava.compiler=NONE -Dfile.encoding=UTF8
    2. In $OLITE_HOME\mobile_oc4j\j2ee\mobileserver\applications
    \mobileserver\setup\dmc\common\win32.inf file, added the following:
    a. In the <file> section, added the following:
    <item>
    <src>/common/win32/olilUTF8.dll</src>
    <des>$APP_DIR$\bin\olilUTF8.dll</des>
    </item>
    b. In the <ini> section, added the following:
    <item name='POLITE.INI' section='All Databases'>
    <item name="DB_CHAR_ENCODING">UTF8</item>
    </item>
    <item name='POLITE.INI' section='SYNC'>
    <item name="DB_ENCODING">UTF8</item>
    </item>
    published the application developed in java using packaging wizard.
    downloaded the client in the pc with the following config:
    windows 2000 (english)
    nls - default.
    installed chinese language support.
    tried to access 9i database from isql*plus and stored & viewed chinese characters sucessfully.
    tried to store a chinese character from java application in the client odb -- failed.
    values are getting inserted from the application but when i view them back it shows & # 2 6 0 8 5 ; (i have included a space in between all 8 characters.
    but when i copy this no and paste in msword it shows 日(chinese character)
    i dont know the exact reason for the above scenerio...................
    Also please help me on this too.......
    why can i store & view chinese characters sucessfully in isql*plus from the client machine while i cannot do the same on client odb from java application even though the lite config are done to support utf8?
    is anything i left out?
    should i do any codes changes in java?(java application is of verision jdk1.4_13)
    Thanks,
    Ashok kumar.G

    Sorry for late replay!! in the SharePoint server both the Claim based and Classic mode is enabled in the server, but still I want to get authenticated via Classic mode just like it happens in SharePoint  2007 and 2010, so do i have to use a different
    set of classes to do that if yes can you please tell me those ?

  • APEX application integration into Java application

    Hello,
    I'm working on a new APEX application and I would like to integrate that application into an existing Java application.
    The integration should be invisible for the end-users. Our application will have the same look and feel as the Java application.
    The existing menu of the Java app will be extended with a new link. This link will then call our application.
    Visually I was thinking about using an Iframe to display the content of the APEX application inside the Java generated xHTML.
    This is however not the biggest issue.
    We are working in a secure context and we thus need to make sure that our APEX application doesn't create a backdoor on the
    security mechanism provided by the Java app.
    Some options have come to mind, but the one that look best is this:
    We keep the java application as the single point of entry for our end-users and make sure that the apex application is "hidden".
    We could do this by means of some re-routing code in the java application so that the incomming requests there are send to the correct server (java or apex).
    Then we will need to capture the response of the APEX application and place it inside the Java generated xHTML. The combined content is then send to the client.
    Or we could place a reverse proxy server that does this for us.
    The goal is thus that we can rely on the existing java application to cover the security and the navigation structure.
    Any ideas on this ?
    How-to's or other options ?
    thanks & regards
    Karel

    In a project I am currently working on we do it using iframes and passsing parameters over a http link.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to let users run your Java application

    Hello,
    I'm writing an application using JBuilder7 and it's wonderful designer: so far it is composed by only 2 class and imports java.awt.* and javax.swing.* (SDK 1.4)
    Now, I've yet to finish it but I was wondering: "how will users be able to use it?"
    I don't want them to install 30+ Mb of SDK so I've looked into the forums and elsewhere and come up with several answers:
    1) Let them install JRE: but it's 10+ Mb and they would need to download it separately from my program.
    2) Let them use somehow their browser's JVM..(should I turn my application into applet for this? I guess so)
    3) Make an .exe: I know there are many programs to make .exe from java but they would make a one-platform-based file.
    Also there were many hints about using .jar files to get things easier.
    Is there a 4th option in which users have to download only a few mbs to use the application?
    And about .jar, how should I use it?
    Thank you very much for all your help :)

    Simply put - the users must download or be supplied the JRE. This must be installed before they can execute your java application.
    As to distributing the application itself - You can jar (Java Archive) your classes into a single file.
    You could as has been suggested create an EXE, but these generally are very large and tend to severely restrict the range of java technologies able to be used (EG Serialization, RMI, Reflection, class loading, ...)
    Java is not intended for little tools that get installed separately - It is intended for larger applications or small applets in which case the download of the JRE is a minor concern.
    Note that applets targeting Java 1.1.7 functionality work fine with most old browsers inbuilt JVMs - Your customers browser may not however have an inbuilt JVM and the user will still need to download the JRE to execute a SWING based applets.
    Talden

  • How to get Portal user from a standalone Java application

    Hi,
    I have a standalone Java application from where I need to fetch the Portal User Information like userid and email id.
    I am using the below line of code
    iUser = UMFactory.getUserFactory().getUserByLogonID("e017939");
    I have included the jar file com.sap.security.api , But it was giving me the below exception
    java.lang.NoClassDefFoundError: com/sap/tc/logging/Location
         at com.sap.security.api.UMFactory.<clinit>(UMFactory.java:55)
         at com.am.wcas.java.mailscheduler.kmaccess.FetchDataFromKM.getiUser(FetchDataFromKM.java:29)
         at com.am.ScheduleEmails.main(ScheduleEmails.java:89)
    and I am getting a pop Up message from the Java Virtual Machine Launcher, saying a Fatal Exception has occured and the Program will exit.
    Then I went throught he SDN threads and they asked me to include the
    logging.jar and com.sap.security.perm.api .
    I Included them, then also, it is giving me Exception
    java.lang.NoClassDefFoundError: com/sap/engine/lib/logging/LoggingHelper
         at com.sap.security.api.UMFactory.<clinit>(UMFactory.java:56)
         at com.am.FetchKMData.main(FetchKMData.java:30)
    Exception in thread "main"
    and I am getting a pop Up message from the Java Virtual Machine Launcher, saying a Fatal Exception has occured and the Program will exit.
    Kindly let me know if it is possible to access the User info using UMFactory in a standalone Java application. If yes kindly let me know where i am going wrong.
    Regards,
    Shilpa B.V

    Hi Shilpa,
    1. Check that you have added com.sap.security.api within the Your Project>Libraries folder (under navigation tab) and also added jars in the build path of the Your Project under project>properties>Build Path.
    2. In case you have a DC instead of Web Dynpro Project then you have to add the com.sap.security.api under Your DC>Used DCs and have compile time and runtime dependency added.
    Here java.lang.NoClassDefFoundError is caused basically due to only build time dependency added and reference to the jar missing at runtime. Rest the code to retrieve the current user id using UME API and getUserByLogOnID("....") method with/without portal environment would not be an issue at all.
    Regards,
    Tushar SInha

  • Web Application and Java Application

    Hello,
    I have a standalone Java application and a web application (JSP/Servlets) that I would like integrate. The standalone app. should send some information to my web app (which is not a problem), but then the user can be at this web app. for a while and then once he sees something he likes here, he can select it which should take him BACK to the standalone application. My question is whether something like this is possible?
    If so, then how do i do it.
    Also the web app and the standalone app run to 2 separate machines and 2 different JVM's.
    Any kind of help will be great.
    Thanks

    Well let me describe the scenario in detail
    We have a standalone java application that is good to search for data across an enterprise database. We also have another application which is web based and uses jsp's and servlets and is good for displaying data in different ways, let's say different kind of graps. Now the user will typically search for something using the standalone application and once he finds what he is looking for, then he might say that he wants to graph the selected data using this web application. Now this part is not too difficult as the standalone app can simply POST the selected information to the web app and the web app can then plot the graph. However, the tricky part is that this web application has the capability to allow the user to select let's say a bar and then get additional info. on that bar. Now to get this additional info. the web app. must contact the standalone app and tell it what bar was selected to get the additional info.
    so my concern is how does the web app contact the standalone app. or even KNOW about this web app. Also, RMI is pretty flaky and i would much rather use web services to accomplish it. If that is the only way to go that is.
    Hope that helps.

Maybe you are looking for

  • How to create a smart folder that only selects from a specific directory?

    I am trying to create a smart folder that lists all my iPhoto original content in the last few months. I want this so that my wife can connect into the smart folder over the LAN when copying specific photos to her PC. I am have trouble working out ho

  • Can't access my Username and forum info

    I have been using the same username for some years. I have logged into the forums using a certain email address and password. Over the years, i have had other Apple IDs, different ones for iTunes store, a different one for Mobile Me now. A different

  • Tons of free space, macbook still slow.

    I freed space by literally deleting everything except my applications. None of them are currently running, and the computer is still functions slow. I no longer have the installation disk. It there a way to reset things ...or something. Updates are a

  • Create an exploded graphic in Photoshop CS4?

    Hi, I am a new photoshop user...  I have a small image that I'd like to add a "tail" to and then add on to another graphic.  The smaller graphic is actually a screenshot of a section of the larger image.  My goal is make it into an exploded view of t

  • How to add web service reference in Bex analyser

    Hi, I would like to get a quick suggestion from you all about adding a new webservice into SAP Business Explorer. As per the screen shot there is already two URL's in existent and further I would like to add few more URL's into it. I would be really