Java beginner, please help!! (oracle jdbc setting)

Hi, I am a java beginner. I can't access remote oracle db from my computer. please help me. I can't figure out the problem.
1.The error------------------------------------------------------------
Exception in thread "main" java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at testdb.main(testdb.java:9)
2.JDBC DRIVER is in----------------------------------------------------
c:\j2sdk1.4.1_02\jdbc\classes12.zip
3.CLASSPATH is --------------------------------------------------------
.;c:\j2sdk1.4.1_02\bin;c:\j2sdk1.4.1_02\jdbc;
4.My program is--------------------------------------------------------
import java.sql.*;
class testdb
public static void main (String args[])
throws SQLException,ClassNotFoundException
Connection conn=
DriverManager.getConnection("jdbc:oracle:thin:@111.31.111.11:1526:ORA81","scott","tiger");
Statement stmt = conn.createStatement();
ResultSet rset=stmt.executeQuery("SELECT EMPNO FROM EMP");
while (rset.next()) {
System.out.println (rset.getString(1));
5. Why can't i connect to db?

Hi...i have the same problem and can't seem to solve it
this is my source code
import java.io.*;
import java.sql.*;
import java.util.*;
public class TextToDatabaseTable {
public static void main (String[] args) {
try {
// connect to db
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@cs-bid:1521:SVRDESK", "lynn", "abc");
catch( Exception e) {
e.printStackTrace();
and this is my error
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at TextToDatabaseTable.main(TextToDatabaseTable.java:12)
and i try the methods above
C:\download\Lynn>java -classpath c:\download\lynn;classes12.zip TextToDatabaseTable
C:\download\Lynn>java TextToDatabaseTable
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at TextToDatabaseTable.main(TextToDatabaseTable.java:12)
i'm using oracle 8i with tomcat on win 2k server.
i dunno what's wrong with it...do i need to set any classpath?
i have TOMCAT_HOME and JAVA_HOME Variables in My Environment Variables.
Do i need to set anything for these variables?
Do i need to download any patches? I'm kinda confused.
Thanks!

Similar Messages

  • Displaying Picture in a Java APPLICATION please help!!

    I have been trying to write a method that Displays a .jpg file when called. However I have not gotten far, every book I have tell you how to display pictures in an applet but not an application. I did find some code that is supposed to be for an application, but It does not compile right. Any help would be apprecidated!
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class PictureIt{
    public void makeImage() {
    //***Image Output Stream
    String imgFile
    = "d:\\temp\\TestImage.jpeg";
    out = new FileOutputStream(imgFile);
    BufferedImage image = null;
    image = (BufferedImage)createImage
    (panelJpeg.size.width, panelJpeg.size.height);
    Graphics g = image.getGraphics();
    panelJpeg.paintAll(g);
    }

    Displaying Picture in a Java APPLICATION please help!!
    Hope this helps.There is going to be two classes compile seperatly first class is what does the drawing
    here it is
    import javax.swing.*;
    import java.awt.*;
    public class draww extends JPanel {
    Image ball;
    int width1 = 100;
    int height1 = 100;
    public draww() {
    super();
    Toolkit kit = Toolkit.getDefaultToolkit();
    ball = kit.getImage("pic1.gif");
    public void paintComponent(Graphics comp) {
    Graphics2D comp2D = (Graphics2D) comp;
    comp2D.drawImage(ball, 20, 20, width1, height1, this);
    sound class is the container JFrame here it is
    import javax.swing.*;
    import java.awt.*;
    public class drawing extends JFrame {
    public drawing() {
    super("draw");
    setSize(400,400);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container pane = getContentPane();
    draww d = new draww();
    pane.add(d);
    setContentPane(pane);
    setVisible(true);
    public static void main(String[] args) {
    drawing drawing1 = new drawing();
    PS Hope this helps and see you around

  • Please, help me to set up wireless Internet connection. M...

             Please, help me to set up wireless Internet connection. My router is WRT54GS. I able to get online when computer is wired direct to VPN internet cable.
    First, I can’t open password request screen on http://192.168.1.1. 
    Second, when "Setup wizard" runs step #6 (“Check the router’s status”), the program asks for the password. Default password “admin” is rejected by the program and I can’t install Linksys software. Just in case I already pressed reset switch on the back of the router but to no avail. 
    Third, I don’t find out my Ethernet Adapter Wireless Network Connection and correct router’s IP address using ipconfig/all command after connecting WRT54GS with my computer. Ethernet adapter: DHCP disabled, subnet mask 255.255.255.0, IP address 10.32.132.193, default gate 10.32.132.1.
    Tell me please: what’s the matter?

    Pensive wrote:
             Please, help me to set up wireless Internet connection. My router is WRT54GS. I able to get online when computer is wired direct to VPN internet cable.
    First, I can’t open password request screen on http://192.168.1.1. 
    Second, when "Setup wizard" runs step #6 (“Check the router’s status”), the program asks for the password. Default password “admin” is rejected by the program and I can’t install Linksys software. Just in case I already pressed reset switch on the back of the router but to no avail. 
    Third, I don’t find out my Ethernet Adapter Wireless Network Connection and correct router’s IP address using ipconfig/all command after connecting WRT54GS with my computer. Ethernet adapter: DHCP disabled, subnet mask 255.255.255.0, IP address 10.32.132.193, default gate 10.32.132.1.
    Tell me please: what’s the matter?
    hi pensive ,
     Seems interesting , first do this -  push the reset button on the back of router .
    push it till 30 seconds , unplug the power cable and plug in the power cable back in After completion of 30 seconds.
    then try to log into , 192.168.1.1 again . with the password "admin".
    see if it reply?
    Else -
    strt>cmd>ipconfig /all - post the result ?
    pe@c3
    Message Edited by meteor on 01-09-2008 05:58 AM
    ~~~Nobudy's Perfect , i try To Be So ! Each n every moment of maH LYF , AND I THINK dat wats make Me "Different" From others....~~~

  • Please help - Scrollable result set in sql server 2000

    Hi can some one please help me. I'm trying to create scrollable result set in sql server 2000, but i just can't get it to work. I've been trying to do this for the past 12 hours. I want to go home, but I can't till I get this going! please help!!! My crap code is as follows:
    package transact;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.JInternalFrame;
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    public class DummyFrame extends Dummy
    protected String name, surname;
    protected Connection conn;
    protected CallableStatement cstatement;
    public DummyFrame()
    createFrame();
    private void createFrame()
    try
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    conn = DriverManager.getConnection(
    "jdbc:microsoft:sqlserver://server:1433;" +
    "user=user;password=pwd;DatabaseName=Northwind");
    catch (Exception e)
    e.getMessage();
    populateFields();
    menuAction();
    show();
    private void menuAction()
    btncontacts.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    getRecords();
    populateFields();
    btncontacts.setText("NEXT");
    btnkeywords.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    // transaction.getRecords();
    nextRecord();
    populateFields();
    btncontacts.setText("NEXT");
    protected void nextRecord()
    try
    // CallableStatement cstatement = null;
    cstatement = conn.prepareCall(
    "{call Employee_Selection}", ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    ResultSet rs = cstatement.executeQuery();
    while (rs.next())
    surname = rs.getString("Lastname");
    cstatement.getMoreResults();
    catch (Exception e)
    e.getMessage();
    protected void getRecords()
    try
    CallableStatement cstatement = null;
    cstatement = conn.prepareCall(
    "{call Employee_Selection}", ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    ResultSet rs = cstatement.executeQuery();
    while (rs.next())
    surname = rs.getString("Lastname");
    name = rs.getString("Firstname");
    rs.first();
    // call stored procedure
    catch (Exception e)
    e.getMessage();
    // populate the fields;
    private void populateFields()
    txtfirstname.setText(name);
    txtsurname.setText(surname);
    }

    ummm ok i think the logic in your code is kinda screwy...
    here is what your should be doing.
    create the gui.
    get the resultset...
    have code that looks like this for nextRecord...
    protected void displayNextRecord(){
      // we do not call next here because we already called it last time
      surname = rs.getString("Lastname");
      name = rs.getString("Firstname");
      populateFields();
      if(!rs.next(){
        btncontacts.setEnabled(false);// i'm not sure what btncontacts is but we want to disable next becuase there are no more records...
    // in your intitalization code you need to do this...
    // you old stuff ending with...
    ResultSet rs = cstatement.executeQuery();
    // the new stuff...
    if(rs.first()){
      displayNextRecord();
    }else{
      btncontacts.setEnabled(false);//the result set is empty
    }ok the real problem you are having is that you are trying to display one record at a time but you are scrolling
    through the entire result set using while(rs.next()... what you
    want to do is create the result set once and scroll through
    it one item at a time with your gui.
    the example method i have given displays the data from the current
    row in your gui. then it advances the result set forward one row if possible. this method assumes that the result set will always
    be positioned on a valid row thus the need for calling
    rs.first() before we originally call displayNextRecord()
    well i hope you find this helpful.

  • Java Import -- please help!!!

    I look into http://otn.oracle.com/sample_code/products/forms/content.html for the demo of Java Importer.
    Does anyone knows where / how can I get the source code?
    According to that demo, the Importer creates functions called new() for each of the constructors in the class.
    For me, after I imported one of the class "successfully",
    I can't see this function new().
    How can I get it? Does anyone has the sample code for the package body?
    Please help!!! Anybody?
    thanks

    Hi Shay,
    Where is this src subdirectory?
    I see other demo (i.e the Oracle 9i forms demos) with source in it, but not Java Importer demo. It only has Viewlet next to it.
    Am I looking into the wrong thing?
    thanks

  • Llist.java? llistnumbernode.java? PLEASE HELP

    I'm programming linked-list. I know how to program, not that well though, but I don't understand how the linked-list works.
    Here's what I got so far:
    import java.util.*;
    ** Author: Yuan-Fang Wang
    ** The skeleton of a singly-linked-list class using interface
    ** DO NOT delete anything or change any parameters or return types
    public class llist {
       int   length; // number of nodes in the list, for am empty list length = 0
       node  head;     // must poinnt to the head (the first element) of the list
       // interface definition of a node
       public interface node {
          public Object getValue();          // get stored KEY value
          public node   getNext();          // get next node
          public void   setNext(node l);     // set next node
          public int    compares(node l);     // compare values
          public String toString();          // for printing
       // constructor for a null list
       public llist() {
            head = null;
            length = 0;
       // constructor using the first node
       public llist(node l) {
                 head = l;
                 length++;
       // truncate the linked list to null
       public void empty() {
         //head.setNext(null);
       // don't change anything here
       public Enumeration getEnum() {
          return new Enumeration () {
          node current = head;
          public boolean hasMoreElements() {
             return (current!=null);
          public Object nextElement() {
             if (current==null) throw new NoSuchElementException("Linkedlist");
             Object value = current;
             current = current.getNext();
             return value;
       // return the number of nodes in the linked-list
       public int getLength() {
            return length;
       // search for a node in the linked-list
       // return its position in the linked list (the first node is 0)
       // return -1 if the node is not found in the linked list
       public int search(node elem) {
          while(head != null){
       // insert a node into the linked list
       // return its position in the linked list (the first node is 0)
       // return -1 if the node already in the linked list (no duplicated insert)
       public int insert(node elem) {
         if(head==null){
              head = elem;
              length++;
              return 0;
         else if(elem<head){
              elem.setNext(head);
              head = elem;
              length++;
              return 0;
         else{
              ptr = head;
              while(ptr != null){
                   if(ptr == elem)     return -1;     //duplicate
                   else if(ptr.getNext() != null
          return -1; // you must change this line to return the true insert result
       // delete a node from the linked list
       // return deleted node if is in the linked list and null otherwise
       public node delete(node elem) {
          return null; // you must change this line to return true delete result
       // return the n-th node of the linked list
       // return null if n is < 0 or larger than or equal to the current length
       public node findNth(int n) {
          return null; // you must change this line to return true findnth result
       // print the list, DO NOT modify this method in anyway
       public void printList() {
          node ptr = head;
          while (ptr!=null) {
          System.out.print(ptr + " ");
          ptr = ptr.getNext();
          System.out.println();
       // utility routine that will be used later, DO NOT modify this method
       node findLast() {
          if (head==null) return null;
          node ptr = head;
          while (ptr.getNext()!=null) {
          ptr = ptr.getNext();
          return ptr;
    }And for llistnumbernode.java
    ** Author: Yuan-Fang Wang
    ** The skeleton of a singly-linked-list node using interface
    ** DO NOT delete anything or change any parameters or return types
    public class llistnumbernode implements llist.node {
       Number element;     // stored element
       llist.node   next;          // next node
       public llistnumbernode (Number elem) {
       // return the KEY value for comparison
       public Object getValue() {
          return null; // you must change this to return true result of getValue()
       // get the next node in the list
       public llist.node getNext() {
          return null; // you must change this to return true result of getNext()
       // set the next node in the list
       public void setNext(llist.node l) {
       // return  1 if this (self) >  node l
       // return  0 if this (self) == node l
       // return -1 if this (self) <  node l
       public int compares(llist.node l) {
          return -1; // you must change this to return true result of compares()
       // DO NOT change this method
       public String toString() {
          return element.toString();
    }Please HELPPPPP

    Will someone please help!!!

  • Hi please help! After setting up a new mail account my wifi button has greyed out. I've tried rebooting it ie turning off and on but no joy. I'm a complete technophobe and have no idea what to do next. I can receive emails but am unable to reply. HELP PLS

    Please can someone help a total technophobe?!!! I have recently set up a new mail account and since I've done that my wifi button has greyed out. Not sure what happened as I had help from my daughter. She doesn't think that she did anything wrong as has been an iPhone user since day one!! She's at work now so I'm totally lost. Please help. Many thanks.

    it's' an issue on 4S..... here same problem, even after restore the firmware.... wifi and bt are lost....

  • URGENT!!! Java Gurus Please Help with adf issue!

    PLEASE SEE MY LATEST POST BELOW TIMO'S RESPONSE. THE REQUIREMENT HAS CHANGED. THAT IS THE ISSUE I AM LOOKING A SOLUTION FOR.
    Hello All,
    We have a requirement where our adf/jsf app needs to pick an EXCEL file from the server where the application is deployed. The sequence is :
    User comes to the page
    Clicks on "Open EXCEL" button
    EXCEL file located in the c:/ of the server opens up.
    How can this be done? I do not see any coding needed because the EXCEL file is being opened as is (and after user views it he closes the file) and the data is not being transferred to the jspx page.
    *We are totally flexible in how this is implemented - ie, using button, link , html etc etc. What ever works!!!!*
    Thanks,
    Edited by: user12054715 on Aug 17, 2010 8:54 PM
    Edited by: user12054715 on Aug 18, 2010 4:11 PM
    Edited by: user12054715 on Aug 18, 2010 4:13 PM

    Hello Timo,
    I am using 10.1.3g so your response is not going to help me.
    However, I have another question that I have already posted on the Forum. Please help me...
    Requirement:
    *1. Java application should be able to write "Hello World" in the excel file, when the user opens it.*
    I CAN DO THIS WITH THE FOLLOWING CODE:
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet("newSheet");
    HSSFRow row = sheet.createRow(1);
    row.createCell(1).setCellValue("HelloWorld!!!!!!!!!");
    *2. A "Write To Excel" button on jsf page opens a dialog asking user to Save or Open the excel file. (user can save the file anywhere on his machine)*
    I CAN DO THIS WITH THE FOLLOWING CODE:
    In jsf:
    <af:commandButton text="Download" action="#{myBackingBean.writeToExcel}" useWindow="true"/>
    In backing bean:
    public static void writeToExcel() throws IOException
    String filename = "workbook.xls";
    // //Setup the output
    String contentType = "application/vnd.ms-excel";
    FacesContext fc = FacesContext.getCurrentInstance();
    HttpServletResponse response = (HttpServletResponse)fc.getExternalContext().getResponse();
    response.setHeader("Content-disposition", "attachment; filename=" + filename);
    response.setContentType(contentType);
    PrintWriter out = response.getWriter();
    BOTTLENECK: When the user opens the excel how do I show "HelloWorld!!!!!!!!!" ?

  • Issue with Java Decompiler, please help

    I'm using Mocha to decompile a *.class file from the standard OAF. I'd like to reuse some logic which Oracle has previously developed. I'd like to decompile DetailDataInputCO.class but Mocha errors out with "Ignoring field attribute Synthetic".
    If anyone has a good decompiler, could you please decompile a class file for me. Please contact me at [email protected] and I can send you the file. It would be greatly appreciated.
    Thanks,
    -Scott

    // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
    // Jad home page: http://www.kpdus.com/jad.html
    // Decompiler options: packimports(3)
    // Source File Name: DetailDataInputCO.java
    package oracle.apps.ap.oie.webui;
    import com.sun.java.util.collections.HashMap;
    import java.io.Serializable;
    import java.util.Vector;
    import oracle.apps.ap.oie.entry.AttendeeRuleUI;
    import oracle.apps.ap.oie.server.DetailAMImpl;
    import oracle.apps.ap.oie.utility.OIEConstants;
    import oracle.apps.ap.oie.utility.OIEUtil;
    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.flexj.*;
    import oracle.apps.fnd.framework.*;
    import oracle.apps.fnd.framework.webui.*;
    import oracle.apps.fnd.framework.webui.beans.*;
    import oracle.apps.fnd.framework.webui.beans.form.OAChoiceBean;
    import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
    import oracle.apps.fnd.framework.webui.beans.layout.*;
    import oracle.apps.fnd.framework.webui.beans.message.*;
    import oracle.apps.fnd.framework.webui.beans.nav.OANavigationBarBean;
    import oracle.apps.fnd.framework.webui.beans.nav.OAPageButtonBarBean;
    import oracle.apps.fnd.framework.webui.beans.table.*;
    import oracle.cabo.ui.*;
    import oracle.cabo.ui.beans.*;
    import oracle.cabo.ui.beans.form.*;
    import oracle.cabo.ui.beans.layout.*;
    import oracle.cabo.ui.beans.message.MessageStyledTextBean;
    import oracle.cabo.ui.beans.message.MessageTextInputBean;
    import oracle.cabo.ui.beans.nav.NavigationBarBean;
    import oracle.cabo.ui.beans.table.ColumnBean;
    import oracle.cabo.ui.beans.table.TableBean;
    import oracle.jbo.domain.Number;
    // Referenced classes of package oracle.apps.ap.oie.webui:
    // ExpensesCO, NavigationUtility
    public class DetailDataInputCO extends OAControllerImpl
    public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    if(oapagecontext.isLoggingEnabled(2))
    oapagecontext.writeDiagnostics(this, "start processRequest", 2);
    boolean flag = false;
    super.processRequest(oapagecontext, oawebbean);
    OAApplicationModule oaapplicationmodule = oapagecontext.getRootApplicationModule();
    OAApplicationModule oaapplicationmodule1 = oapagecontext.getApplicationModule(oawebbean);
    String s = (String)oaapplicationmodule.invokeMethod("getMultipleCurrenciesFlag");
    String s1 = (String)oapagecontext.getTransactionValue("ApWebTaxEnable");
    String s2 = (String)oapagecontext.getTransactionValue("PaymentCurrencyCode");
    String s3 = (String)oapagecontext.getTransactionValue("ApWebDescFlexName");
    String s4 = (String)oapagecontext.getTransactionValue("CCPage");
    boolean flag2 = s4 == null || s4.equals("Y");
    boolean flag3 = ((String)oapagecontext.getTransactionValue("IsProjectEnabled")).equals("Y") || ((String)oapagecontext.getTransactionValue("IsProjectEnabled")).equals("R");
    String s5 = (String)oapagecontext.getTransactionValue("ApWebEnableGrantsAccounting");
    boolean flag4 = flag3 && s5 != null && s5.equals("Y");
    boolean flag5 = ((Boolean)oaapplicationmodule.invokeMethod("isVATEnabled")).booleanValue();
    String _tmp = (String)oapagecontext.getTransactionValue("ApWebEnableLineLevelAccounting");
    oapagecontext.getParameter("ButtonLink");
    String s6 = "N";
    oracle.apps.ap.oie.setup.OIESetup.Setup setup = (oracle.apps.ap.oie.setup.OIESetup.Setup)oaapplicationmodule.invokeMethod("getSetup");
    OADescriptiveFlexBean oadescriptiveflexbean = null;
    OAStackLayoutBean oastacklayoutbean = (OAStackLayoutBean)createWebBean(oapagecontext, "STACK_LAYOUT");
    oawebbean.addIndexedChild(oastacklayoutbean);
    OATableLayoutBean oatablelayoutbean = (OATableLayoutBean)createWebBean(oapagecontext, "TABLE_LAYOUT");
    oastacklayoutbean.addIndexedChild(oatablelayoutbean);
    oatablelayoutbean.setWidth("100%");
    OASpacerRowBean oaspacerrowbean = (OASpacerRowBean)createWebBean(oapagecontext, "SPACER_ROW");
    if(flag5)
    OARowLayoutBean oarowlayoutbean = (OARowLayoutBean)createWebBean(oapagecontext, "ROW_LAYOUT");
    oatablelayoutbean.addRowLayout(oarowlayoutbean);
    OACellFormatBean oacellformatbean = (OACellFormatBean)createWebBean(oapagecontext, "CELL_FORMAT");
    oarowlayoutbean.addIndexedChild(oacellformatbean);
    OARawTextBean oarawtextbean = (OARawTextBean)createWebBean(oapagecontext, "RAW_TEXT");
    oacellformatbean.addIndexedChild(oarawtextbean);
    oacellformatbean.setHAlign("start");
    oacellformatbean.setColumnSpan(2);
    oarawtextbean.setText(oapagecontext.getMessage("SQLAP", "OIE_MERCHANT_HEADING", new MessageToken[0]));
    oarawtextbean.setStyleClass("OraInstructionText");
    oatablelayoutbean.addIndexedChild(oaspacerrowbean);
    OARowLayoutBean oarowlayoutbean1 = (OARowLayoutBean)createWebBean(oapagecontext, "ROW_LAYOUT");
    oatablelayoutbean.addRowLayout(oarowlayoutbean1);
    OACellFormatBean oacellformatbean1 = (OACellFormatBean)createWebBean(oapagecontext, "CELL_FORMAT");
    oarowlayoutbean1.addIndexedChild(oacellformatbean1);
    OATableLayoutBean oatablelayoutbean1 = (OATableLayoutBean)createWebBean(oapagecontext, oawebbean, "DRRequiredIconText");
    oacellformatbean1.addIndexedChild(oatablelayoutbean1);
    oatablelayoutbean.addIndexedChild(oaspacerrowbean);
    OARowLayoutBean oarowlayoutbean2 = (OARowLayoutBean)createWebBean(oapagecontext, "ROW_LAYOUT");
    oatablelayoutbean.addRowLayout(oarowlayoutbean2);
    OACellFormatBean oacellformatbean2 = (OACellFormatBean)createWebBean(oapagecontext, "CELL_FORMAT");
    OACellFormatBean oacellformatbean3 = (OACellFormatBean)createWebBean(oapagecontext, "CELL_FORMAT");
    oarowlayoutbean2.addIndexedChild(oacellformatbean2);
    oarowlayoutbean2.addIndexedChild(oacellformatbean3);
    OATableLayoutBean oatablelayoutbean2 = (OATableLayoutBean)createWebBean(oapagecontext, "TABLE_LAYOUT");
    OATableLayoutBean oatablelayoutbean3 = (OATableLayoutBean)createWebBean(oapagecontext, "TABLE_LAYOUT");
    oacellformatbean2.addIndexedChild(oatablelayoutbean2);
    oacellformatbean2.setVAlign("top");
    oacellformatbean3.addIndexedChild(oatablelayoutbean3);
    oacellformatbean3.setVAlign("top");
    oatablelayoutbean2.addIndexedChild(createWebBean(oapagecontext, oawebbean, "DetailStartDate"));
    oatablelayoutbean2.addIndexedChild(oaspacerrowbean);
    oatablelayoutbean2.addIndexedChild(createWebBean(oapagecontext, oawebbean, "DetailDailyRate"));
    oatablelayoutbean2.addIndexedChild(oaspacerrowbean);
    oatablelayoutbean2.addIndexedChild(createWebBean(oapagecontext, oawebbean, "DetailDays"));
    oatablelayoutbean2.addIndexedChild(oaspacerrowbean);
    if(flag2)
    OAMessageStyledTextBean oamessagestyledtextbean = (OAMessageStyledTextBean)createWebBean(oapagecontext, oawebbean, "DetailDisplayReceiptAmount");
    oatablelayoutbean2.addIndexedChild(oamessagestyledtextbean);
    oatablelayoutbean2.addIndexedChild(oaspacerrowbean);
    oamessagestyledtextbean.setText(oamessagestyledtextbean.getText(oapagecontext) != null ? oamessagestyledtextbean.getText(oapagecontext) + " " : "");
    if(oamessagestyledtextbean.getText(oapagecontext) != null && !oamessagestyledtextbean.getText(oapagecontext).equals(""))
    OAStyledTextBean oastyledtextbean = (OAStyledTextBean)createWebBean(oapagecontext, "TEXT");
    oastyledtextbean.setViewUsageName("OneReceiptBasedVO");
    oastyledtextbean.setViewAttributeName("ReceiptCurrencyCode");
    oastyledtextbean.setCSSClass("OraDataText");
    oamessagestyledtextbean.setEnd(oastyledtextbean);
    } else
    OAMessageTextInputBean oamessagetextinputbean = (OAMessageTextInputBean)createWebBean(oapagecontext, oawebbean, "DetailReceiptAmount");
    oatablelayoutbean2.addIndexedChild(oamessagetextinputbean);
    oatablelayoutbean2.addIndexedChild(oaspacerrowbean);
    if(s.equals("N"))
    OAStyledTextBean oastyledtextbean1 = (OAStyledTextBean)createWebBean(oapagecontext, "TEXT");
    oastyledtextbean1.setViewUsageName("OneReceiptBasedVO");
    oastyledtextbean1.setViewAttributeName("ReceiptCurrencyCode");
    oastyledtextbean1.setCSSClass("OraDataText");
    oamessagetextinputbean.setEnd(oastyledtextbean1);
    } else
    OAChoiceBean oachoicebean = (OAChoiceBean)createWebBean(oapagecontext, "POPLIST", null, "CurrencyPopList");
    oachoicebean.setViewUsageName("OneReceiptBasedVO");
    oachoicebean.setViewAttributeName("ReceiptCurrencyCode");
    oachoicebean.setPickListViewObjectDefinitionName("oracle.apps.ap.oie.server.CurrenciesVO");
    oachoicebean.setListValueAttribute("CurrencyCode");
    oachoicebean.setListDisplayAttribute("CurrencyCodeName");
    OAStaticStyledTextBean oastaticstyledtextbean = (OAStaticStyledTextBean)createWebBean(oapagecontext, oawebbean, "Currency");
    oachoicebean.setShortDesc(oastaticstyledtextbean.getLabel());
    oamessagetextinputbean.setEnd(oachoicebean);
    if(flag2 || s.equals("N"))
    OAMessageStyledTextBean oamessagestyledtextbean1 = (OAMessageStyledTextBean)createWebBean(oapagecontext, oawebbean, "DetailDisplayExchRate");
    oatablelayoutbean2.addIndexedChild(oamessagestyledtextbean1);
    oatablelayoutbean2.addIndexedChild(oaspacerrowbean);
    } else
    OAMessageTextInputBean oamessagetextinputbean1 = (OAMessageTextInputBean)createWebBean(oapagecontext, oawebbean, "DetailExchRate");
    oatablelayoutbean2.addIndexedChild(oamessagetextinputbean1);
    oatablelayoutbean2.addIndexedChild(oaspacerrowbean);
    oamessagetextinputbean1.setRequired("yes");
    OAMessageStyledTextBean oamessagestyledtextbean2 = (OAMessageStyledTextBean)createWebBean(oapagecontext, oawebbean, "DetailReimbursAmt");
    oatablelayoutbean2.addIndexedChild(oamessagestyledtextbean2);
    if(oamessagestyledtextbean2.getText(oapagecontext) != null)
    oamessagestyledtextbean2.setText(oamessagestyledtextbean2.getText(oapagecontext) + " " + s2);
    oatablelayoutbean2.addIndexedChild(oaspacerrowbean);
    OAMessageCheckBoxBean oamessagecheckboxbean = (OAMessageCheckBoxBean)createWebBean(oapagecontext, oawebbean, "DetailReceiptMissing");
    oatablelayoutbean2.addIndexedChild(oamessagecheckboxbean);
    oatablelayoutbean2.addIndexedChild(oaspacerrowbean);
    Integer integer = (Integer)oaapplicationmodule.invokeMethod("getNumberOfTaxCodes");
    String s7 = (String)oaapplicationmodule1.invokeMethod("getTaxCodeUpdateable");
    OAWebBeanDataAttribute oawebbeandataattribute;
    if(s7 == null || s7.equals("Y"))
    oawebbeandataattribute = (OAWebBeanDataAttribute)createWebBean(oapagecontext, oawebbean, "DetailTaxCode");
    else
    oawebbeandataattribute = (OAWebBeanDataAttribute)createWebBean(oapagecontext, oawebbean, "DetailTaxCodeDisplay");
    OAMessageCheckBoxBean oamessagecheckboxbean1 = (OAMessageCheckBoxBean)createWebBean(oapagecontext, oawebbean, "DetailAmtInclTax");
    if(s1 != null && s1.equals("Y") && integer.intValue() > 0)
    oatablelayoutbean2.addIndexedChild(oamessagecheckboxbean1);
    oatablelayoutbean2.addIndexedChild(oaspacerrowbean);
    oatablelayoutbean2.addIndexedChild(oawebbeandataattribute);
    oatablelayoutbean2.addIndexedChild(oaspacerrowbean);
    String s8 = (String)oaapplicationmodule1.invokeMethod("getExpTypeWebPrompt");
    Object obj = null;
    Object obj1 = null;
    Boolean boolean1 = (Boolean)oaapplicationmodule1.invokeMethod("isExpTypeInPoplist");
    if(flag4 && !boolean1.booleanValue())
    oaapplicationmodule1.invokeMethod("resetWebParameterId");
    String s11 = (String)oaapplicationmodule1.invokeMethod("getAwardNumber");
    MessageToken amessagetoken[] = {
    new MessageToken("EXP_TYPE", s8), new MessageToken("AWARD_NUM", s11 != null ? s11 : "")
    OAException oaexception = new OAException("SQLAP", "OIE_DEFAULT_EXPENDITURE_TYPE", amessagetoken, (byte)1, null);
    oaexception.setApplicationModule(oaapplicationmodule1);
    oapagecontext.putDialogMessage(oaexception);
    OAMessageLovInputBean oamessagelovinputbean = (OAMessageLovInputBean)createWebBean(oapagecontext, oawebbean, "DetailProjectNumber");
    OAMessageLovInputBean oamessagelovinputbean1 = (OAMessageLovInputBean)createWebBean(oapagecontext, oawebbean, "DetailTaskNumber");
    if(flag3)
    oatablelayoutbean3.addIndexedChild(oamessagelovinputbean);
    oatablelayoutbean3.addIndexedChild(oaspacerrowbean);
    oatablelayoutbean3.addIndexedChild(oamessagelovinputbean1);
    oatablelayoutbean3.addIndexedChild(oaspacerrowbean);
    String s12 = (String)oaapplicationmodule1.invokeMethod("getProjectNumber");
    if(s12 != null)
    oamessagelovinputbean1.setRequired("yes");
    else
    oamessagelovinputbean1.setRequired("no");
    if(flag4)
    OAMessageLovInputBean oamessagelovinputbean2 = (OAMessageLovInputBean)createWebBean(oapagecontext, oawebbean, "DetailAwardNumber");
    oatablelayoutbean3.addIndexedChild(oamessagelovinputbean2);
    oatablelayoutbean3.addIndexedChild(oaspacerrowbean);
    oatablelayoutbean3.addIndexedChild(createWebBean(oapagecontext, oawebbean, "RBWebParam"));
    if(s3 != null && ("Y".equals(s3) || "B".equals(s3)))
    oadescriptiveflexbean = (OADescriptiveFlexBean)createWebBean(oapagecontext, oawebbean, "DetailFlex");
    oatablelayoutbean3.addIndexedChild(oadescriptiveflexbean);
    oatablelayoutbean3.addIndexedChild(oaspacerrowbean);
    if(flag4)
    OAStyledTextBean oastyledtextbean2 = (OAStyledTextBean)createWebBean(oapagecontext, "TEXT");
    oatablelayoutbean3.addIndexedChild(oastyledtextbean2);
    String s9 = oapagecontext.getMessage("SQLAP", "OIE_EXPENDITURE_TYPE_TIP", null);
    oastyledtextbean2.setText(oapagecontext, s9);
    oastyledtextbean2.setStyleClass("OraInlineInfoText");
    OAWebBeanDataAttribute oawebbeandataattribute1 = null;
    if(oapagecontext.getParameter("_FORMEVENT") == null || !oapagecontext.getParameter("_FORMEVENT").startsWith("FLEX_CONTEXT_CHANGED"))
    if(!boolean1.booleanValue() && s8 != null)
    oadescriptiveflexbean.setFlexContext(oapagecontext, null);
    Serializable aserializable[] = {
    null
    oapagecontext.getApplicationModule(oawebbean).invokeMethod("onChangeExpenseDFFContext", aserializable);
    } else
    oadescriptiveflexbean.setFlexContext(oapagecontext, s8);
    oadescriptiveflexbean.processFlex(oapagecontext);
    oawebbeandataattribute1 = (OAWebBeanDataAttribute)oadescriptiveflexbean.getIndexedChild(null, 0);
    oadescriptiveflexbean.setFlexTableRendered(false);
    oatablelayoutbean3.addIndexedChild(oawebbeandataattribute1);
    oatablelayoutbean3.addIndexedChild(oaspacerrowbean);
    if(!boolean1.booleanValue() && s8 != null)
    oawebbeandataattribute1.setRequired("no");
    else
    oawebbeandataattribute1.setRequired("yes");
    DescriptiveFlexfield descriptiveflexfield = (DescriptiveFlexfield)oadescriptiveflexbean.getAttributeValue(OAWebBeanConstants.FLEXFIELD_REFERENCE);
    int i = descriptiveflexfield.indexOfContextSegment();
    if(oapagecontext.getParameter("_FORMEVENT") != null && oapagecontext.getParameter("_FORMEVENT").startsWith("FLEX_CONTEXT_CHANGED"))
    String s14 = descriptiveflexfield.getSegment(i).getValue().getDisplay();
    Serializable aserializable2[] = {
    s14
    oapagecontext.getApplicationModule(oawebbean).invokeMethod("onChangeExpenseDFFContext", aserializable2);
    } else
    OAMessageChoiceBean oamessagechoicebean = (OAMessageChoiceBean)createWebBean(oapagecontext, oawebbean, "DetailExpType");
    oatablelayoutbean3.addIndexedChild(oamessagechoicebean);
    oatablelayoutbean3.addIndexedChild(oaspacerrowbean);
    oamessagechoicebean.setPickListViewUsageName("DetailExpenseTypesVO");
    if(flag4)
    OAStyledTextBean oastyledtextbean3 = (OAStyledTextBean)createWebBean(oapagecontext, "TEXT");
    oatablelayoutbean3.addIndexedChild(oastyledtextbean3);
    String s10 = oapagecontext.getMessage("SQLAP", "OIE_EXPENDITURE_TYPE_TIP", null);
    oastyledtextbean3.setText(oapagecontext, s10);
    oastyledtextbean3.setStyleClass("OraInlineInfoText");
    if(flag3)
    String s13 = (String)oaapplicationmodule1.invokeMethod("getExpenditureType");
    boolean flag7 = ((String)oapagecontext.getTransactionValue("IsProjectEnabled")).equals("R") && s13 != null;
    if(flag7)
    oamessagelovinputbean.setRequired("yes");
    oamessagelovinputbean1.setRequired("yes");
    boolean flag6 = ((Boolean)oaapplicationmodule1.invokeMethod("isLocationSchedule")).booleanValue();
    boolean flag8 = flag5 || flag6;
    if(setup.getReceiptBasedLocation() != null)
    flag8 = setup.getReceiptBasedLocation().booleanValue() || flag8;
    if(flag8)
    if(flag6 || flag5)
    OAMessageLovInputBean oamessagelovinputbean3 = (OAMessageLovInputBean)createWebBean(oapagecontext, oawebbean, "LocationName");
    oatablelayoutbean3.addIndexedChild(oamessagelovinputbean3);
    oamessagelovinputbean3.setRequired("yes");
    oatablelayoutbean3.addIndexedChild(createWebBean(oapagecontext, oawebbean, "LocationId"));
    } else
    OAMessageTextInputBean oamessagetextinputbean2 = (OAMessageTextInputBean)createWebBean(oapagecontext, oawebbean, "RBLocation");
    oatablelayoutbean3.addIndexedChild(oamessagetextinputbean2);
    oatablelayoutbean3.addIndexedChild(oaspacerrowbean);
    if(flag2)
    OAMessageStyledTextBean oamessagestyledtextbean3 = (OAMessageStyledTextBean)createWebBean(oapagecontext, oawebbean, "TransactionLocation");
    oatablelayoutbean3.addIndexedChild(oamessagestyledtextbean3);
    oatablelayoutbean3.addIndexedChild(oaspacerrowbean);
    Object obj2 = null;
    Object obj3 = null;
    String s17 = null;
    if((OAMessageTextInputBean)oawebbean.findIndexedChildRecursive("RBLocation") != null)
    OAMessageTextInputBean oamessagetextinputbean5 = (OAMessageTextInputBean)oawebbean.findIndexedChildRecursive("RBLocation");
    s17 = (String)oamessagetextinputbean5.getValue(oapagecontext);
    } else
    if((OAMessageLovInputBean)oawebbean.findIndexedChildRecursive("LocationName") != null)
    OAMessageLovInputBean oamessagelovinputbean4 = (OAMessageLovInputBean)oawebbean.findIndexedChildRecursive("LocationName");
    s17 = (String)oamessagelovinputbean4.getValue(oapagecontext);
    OAMessageStyledTextBean oamessagestyledtextbean5 = (OAMessageStyledTextBean)oawebbean.findIndexedChildRecursive("TransactionLocation");
    String s19 = (String)oaapplicationmodule1.invokeMethod("getTransactionLocation");
    if(s19 != null && !s19.equalsIgnoreCase(s17))
    oamessagestyledtextbean5.setValue(oapagecontext, s19);
    oamessagestyledtextbean3.setRendered(true);
    boolean flag1 = true;
    } else
    oamessagestyledtextbean3.setRendered(false);
    if(flag2)
    OAMessageStyledTextBean oamessagestyledtextbean4 = (OAMessageStyledTextBean)createWebBean(oapagecontext, oawebbean, "DetailDisplayMerchantName");
    oatablelayoutbean3.addIndexedChild(oamessagestyledtextbean4);
    oatablelayoutbean3.addIndexedChild(oaspacerrowbean);
    } else
    OAMessageTextInputBean oamessagetextinputbean3 = (OAMessageTextInputBean)createWebBean(oapagecontext, oawebbean, "DetailMerchantName");
    Serializable aserializable1[] = {
    getLocationId(oapagecontext, oawebbean)
    Class aclass[] = {
    oracle.jbo.domain.Number.class
    if(((Boolean)oaapplicationmodule1.invokeMethod("isMerchantRequired", aserializable1, aclass)).booleanValue())
    oamessagetextinputbean3.setRequired("yes");
    oatablelayoutbean3.addIndexedChild(oamessagetextinputbean3);
    oatablelayoutbean3.addIndexedChild(oaspacerrowbean);
    }

  • Please help, oracle 8i on windows xp?

    Can oracle 8i run on windows xp?
    When I tried to run setup, it did abolutely nothing. I can't find any information on oracle's web site about this and the only relevant forum post that I found was by someone that was having the exact same problem, but no one answered him.
    Thanks in advance,
    Joey

    Hi all,
    I'm trying to install Oracle 8i on Windows-xp
    Professional. it gets installed but runs only once.
    that means its fails to run once I shut down the
    system and restart & shows the message-"oracle not
    found" or "tns server is not found". Can anybody
    please help me? Thanks in advance.When attempting to install obsolete software on modern operating systems, one must expect problems. I've found that Oracle tends to survive well when installed on a supported platform which is upgraded, but there are usually issues when attempting a fresh install on a newer platform.
    Your problem states "Oracle Not Found". Therefore your OS services know that they should be attempting to connect to an Oracle database but the database is 'not found'. Further, it says that the TNS Server is not found. TNS is Oracle's term for 'on the network'.
    Is there a business reason that requires you to run obsolete software? If the database software MUST be obsolete, what is the logic behind upgrading the operating system? (In other words - why only upgrade one?)
    You need to check the following things:
    1) You have a static IP address and host name, and are NOT using DHCP;
    (look at or post the result of command line "ipconfig /all")
    2) Check whether the Oracle database service and the listener service are running;
    (Under "Start > Settings > Control Panel > Administration Tools > Service" or command line services.msc)
    3) Tell us how well the listener is running;
    (Command line "lsnrctl status")

  • How to program this in java? Please help

    How to program this in java?
    please explain steps, it has to come out like this:
    example
    input: 3b1w3b
    output:
    BBBWBBB

    import java.io.*;
    public class Test {
    static java.io.PrintStream o = java.lang.System.out;
    public static void main(String[] args)throws Exception {      
         BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));
         System.out.print("Enter plot for printing: ");
         String s = BR.readLine();
         char[] cs = s.toLowerCase().toCharArray();
         for(int i=0, j=0; i < cs.length-0x1; i+=0x2, j=0)
              while(j++ < (int)(cs[i]-0x30))
                   o.print((char)(cs[i+0x1]-0x20));
    I tried changeing it to this so I can enter my own string, but I want to change it some more so that it can enter multiple input separated by space, so that it can form a sort of picture line by line. I tried using tolkenizer but I get errors. I dont know how to use tolkenizer properly can anyone please TEACH. you dont have to tell how or give me the code if you dont want to. yes I know Im a noob and I dont know java as good as everyone here, If everyone thinks I don't deserve help then DON'T help, I'm just trying to learn programming

  • Please help: unable to set preferences for planning from workspace.

    Hi Experts,
    unable to set preferences for planning from workspace.(file--->preferences----->planning), when doing this task prompts " An Error occured" preferences works fine with other components IR, FR, WEB ANALYSIS.problem is only with the planning.
    1) i restarted the workspace and planning services but even then the same issue.
    Please help me out on this issue.
    Thanks.

    Hi,
    Do you get the same problem if you access planning directly ? http://<planningmachine>:8300/HyperionPlanning/
    Just trying to understand if it related directly to planning and maybe you will get a different error message.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • PLEASE HELP - error Jdbc/jsp

    Hello
    I have a jsp file myfile.jsp?id=...
    This file was working fine before. I was ready from my testing and i needed to clean my access database's data so i deleted some records manually and copied database again onto live through ftp.
    After this step, myfile.jsp?id=.. was giving me errors only on certain ids for eg. it worked fine myfile.jsp?id=3, but did not work fine for myfile.jsp?id=6 giving this error:
    The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NullPointerException
         org.apache.jsp.viewprofile_jsp._jspService(viewprofile_jsp.java:320)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    I tried an id which does not exist in database and it worked fine ie. jsp page was executing the html message that i composed for unexisting ids.
    I also checked the records' data and these all look fine and appropriately filled.
    PLEASE HELP - any ideas?
    Thanks lodes
    sabcarina

    You could try adding logging statements or SOPs in the JSP. It would help you locate the line where the exception is occuring.

  • Java VM Please help, Cannot remove and cannot Reinstall.

    hello, I hope somebody can help me out here, I'm at my wits end. First of all I have xp pro file system NTFS, I have AOL DSL Broad band. I have attempted to get my Java Download DAYS ago and something went terribly wrong.
    After the download I noticed that my java VM was not working so I attempted to remove it.
    The program uninstalled but not totally. In My add remove software it says this: JAVA 2 RUNTIME ENVIROMENT, SE v1.4.1_01 size 88kb.
    It has the regular change/remove but when pushed it uninstalls Then asks this: DO YOU WANT TO COMPLETELY REMOVE THE SELECTED APPLICATION AND ALL OF IT'S COMPONENTS? AND INSTEAD OF ASKING YES OR NOW IT HAS ON THE BUTTONS "OK" AND "CANCEL tHEN IF YOU SELECT OK IT ACTS AS IF IT IS UNINSTALLING BUT THEN IT STAYS RIGHT WHERE IS WAS.
    With this being this way the download program will still do the download, But then states that there is already one in there, Then prompts to Would you like to uninstal this? ad then uninstals it but the same results happen, no working copy is installed.
    If I try this: START RUN COMMAND Then type in jview te computer says "view is not recognised as an internal or external command,operable program or batch file."
    If i go to the java cup in control panel, open it it reads " The system cannot find the registry key specified.: Hkey_local_machiene\software\javasoft\javaplugin\1.4.1_01"
    From what I have described, cansomebody please help me to get a working a copy of java VM in my system? Please. My whole Buisness centers around placeing items for sale on Ebay and I cannot do this with out the VM. I really need help fast.
    I can be emailed or imed, imeverlast is also my aol name. Please hurry if you know that answer to this problem. Thanks a Million! ;)
    MD

    If you want, I can fix you with remote assistance. Just ask. [email protected] (remove the leading )

  • Java native -- please help

    class HelloWorld {
    private native void print();
    public static void main(String[] args) {
    new HelloWorld().print();
    static {
    System.loadLibrary("HelloWorld");
    //this is .h file
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <C:\java\jdk1.5.0_06\include\jni.h>
    /* Header for class HelloWorld */
    #ifndef IncludedHelloWorld
    #define IncludedHelloWorld
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class: HelloWorld
    * Method: print
    * Signature: ()V
    JNIEXPORT void JNICALL Java_HelloWorld_print
    (JNIEnv *, jobject);
    #ifdef __cplusplus
    #endif
    #endif
    //this is .h file end
    // C File starts
    #include "C:\java\jdk1.5.0_06\include\jni.h"
    #include <stdio.h>
    #include "HelloWorld.h"
    JNIEXPORT void JNICALL
    Java_HelloWorld_print(JNIEnv *env, jobject obj)
    printf("Hello World!\n");
    return;
    //C file ends
    I have used following commands to create dll
    cl -I"C:\Program Files\Microsoft Visual Studio 8\VC\include" -I"C:\java\include\win32"
    -I"C:\java\jdk1.5.0_06\include\win32" -I"C:\Program Files\Microsoft SDKs\Windows\v6.0\Include" HelloWorld.c
    -FeHelloWorld.dll -LDd -MD -link -libpath:"C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\LIB"
    -libpath:"C:\Program Files\Microsoft Visual Studio 8\VC\lib"
    At runtime I get error the " an atempt has made to load a C library in correcty" and then error
    "A dynamic link library (DLL) initialization routine failed"
    please help me ASAP.
    thanks in advance.

    class HelloWorld {
    private native void print();
    public static void main(String[] args) {
    new HelloWorld().print();
    static {
    System.loadLibrary("HelloWorld");
    //this is .h file
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <C:\java\jdk1.5.0_06\include\jni.h>
    /* Header for class HelloWorld */
    #ifndef IncludedHelloWorld
    #define IncludedHelloWorld
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class: HelloWorld
    * Method: print
    * Signature: ()V
    JNIEXPORT void JNICALL Java_HelloWorld_print
    (JNIEnv *, jobject);
    #ifdef __cplusplus
    #endif
    #endif
    //this is .h file end
    // C File starts
    #include "C:\java\jdk1.5.0_06\include\jni.h"
    #include <stdio.h>
    #include "HelloWorld.h"
    JNIEXPORT void JNICALL
    Java_HelloWorld_print(JNIEnv *env, jobject obj)
    printf("Hello World!\n");
    return;
    //C file ends
    I have used following commands to create dll
    cl -I"C:\Program Files\Microsoft Visual Studio 8\VC\include" -I"C:\java\include\win32"
    -I"C:\java\jdk1.5.0_06\include\win32" -I"C:\Program Files\Microsoft SDKs\Windows\v6.0\Include" HelloWorld.c
    -FeHelloWorld.dll -LDd -MD -link -libpath:"C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\LIB"
    -libpath:"C:\Program Files\Microsoft Visual Studio 8\VC\lib"
    At runtime I get error the " an atempt has made to load a C library in correcty" and then error
    "A dynamic link library (DLL) initialization routine failed"
    please help me ASAP.
    thanks in advance.

Maybe you are looking for