Using java IDE
hi i coded my program using jcreator and it compiles and runs well. all .java files are placed in a folder.
Now i used another IDE the JBUILDER, i tried to compile the files but then there seems to be a dependency problem. it gives me an error that package Cluster(my java filename) does not exists. the cluster.java file is in the same folder as my compiling file...
what seems to be the prob?
You apparently misconfigured it when you transferred it. Try deleting the "package Cluster;" statement at the top of the source code fille.
Similar Messages
-
Idea about convert word document to pdf using java api
idea about convert word document to pdf using java api if any one find it mail me at [email protected]
api if any one find it mail me at
[email protected]
What happend to your other mailID :
[email protected] ????
http://forum.java.sun.com/thread.jspa?threadID=639851&
messageID=3756910It received the Spam Of Death. RIP -
I want to create a Ajax based Chating application using java .
hi . I want to create an chating Application , and ajax based chatting application using java as my server side language ..i have some idea about it .. but one thing that i m not understanding is that how i will communicate with other users because each user has its own session so what i will do to send one messge to all the users ???? . i m new to JavaEE and i have chosen this as my semester project .. i need some help regarding this .
First get it working without AJAX.
-
How to save report in PersonalCategory after creating it using java panel?
Hi,
Anybody knows How to save report in PersonalCategory after creating it using java panel?
I dont want to save it in public folder. I want to save report (webi) in user's personal category.
can anybody send me source code?
It will help me a lot.
Thanks in advance
Amol MaliHi teda,
i'm assuming that you have seen my post that i did successfuly save report in user's personal category.
Actually the report is created in webi java panel using RE SDK and is saved in Report Sample Folder then i'm saving it in user's personal category by following code
string query = "Select SI_PERSONAL_CATEGORIES From CI_INFOOBJECTS Where "
+ "SI_INSTANCE=0 And SI_ID=" + reportID;
InfoObjects infoObjects = infoStore.Query(query);
InfoObject infoObject = infoObjects[1];
Webi wreport = (Webi)infoObject;
ObjectRelativeIDs personalIDs = wreport.PersonalCategories;
/personalIDs.Add(Convert.ToInt32(categoryID));
infoStore.Commit(infoObjects);
But the report is presents in the Folder also and in user's personal category also.
I dont want the report to be in the folder (Report Sample) if i saved it in user's personal category.
How can i do that?
any idea.
Please help me.
Thanks in advance
Amol Mali
Edited by: amol mali on Jan 9, 2009 7:55 PM -
Error BEA-000438 - Unable to load performance pack. Using Java I/O instead.
On a Solaris 9 machime, 64 bits architecture, j2sdk1.4.2_08, Weblogic Server 8.1 SP2
when I try to deploy the application, launching java wiht "-d64" option I get :
<Jun 22, 2005 12:12:41 PM CEST> <Error> <Socket> <BEA-000438> <Unable to load performance pack. Using Java I/O instead.
Please ensure that libmuxer library is in
:'/export/home/j2se/j2sdk1.4.2_08/jre/lib/sparcv9/server:/export/home/j2se/j2sdk1.4.2_08/jre/lib/sparcv9:/export/home/Aplics/Apl1/WEB-INF/lib::/usr/local/bea/weblogic81/server/lib/solaris:/usr/local/bea/weblogic81/server/lib/solaris/oci920_8:/usr/lib'
libmuxer exist on /usr/local/bea/weblogic81/server/lib/solaris
Any idea?
ThanksCan you post more details ?
Sergi
Jiffy <[email protected]> wrote:
>error:
> <2004-3-12 %u4E0B%u534815%u65F648%u520654%u79D2 CST> <Error> <Socket>
><BEA-000438> <Unable to load performance pack. Using Java I/O instead.
>Please ensure that wlntio.dll is in: 'D:D:/bea/weblogic81/server/bin'
>>
-
Using java class and variables declared in java file in jsp
hi everyone
i m trying to seperate business logic form web layer. i don't know i am doing in a right way or not.
i wanted to access my own java class and its variables in jsp.
for this i created java file like this
package ris;
import java.sql.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class NewClass{
public static void main(String args[]){
Connection con = null;
ResultSet rs=null;
Statement smt=null;
try{
Class.forName("com.mysql.jdbc.Driver").newInstance();
con=DriverManager.getConnection("jdbc:mysql:///net","root", "anthony111");
smt=con.createStatement();
rs= smt.executeQuery("SELECT * FROM emp");
while(rs.next()){
String str = rs.getString("Name");
}catch( Exception e){
String msg="Exception:"+e.getMessage();
}finally {
try {
if(con != null)
con.close();
} catch(SQLException e) {}
}next i created a jsp where i want to access String str defined in java class above.
<%--
Document : fisrt
Created on : Jul 25, 2009, 3:00:38 PM
Author : REiSHI
--%>
<%@page import="ris.NewClass"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1><%=str%></h1>
</body>
</html>I wanted to print the name field extracted from database by ResultSet.
but it gives error cannot find symbol str.
please help me to find right way to do this.
i am using netbeans ide.Very bad approach
1) Think if your table contains more than one NAMEs then you will get only the last one with your code.
2) Your String is declared as local variable in the method.
3) You have not created any object of NewClass nor called the method in JSP page. Then who will call the method to run sql?
4) Your NewClass contains main method which will not work in web application, it's not standalone desktop application so remove main.
Better create an ArrayList and then call the method of NewClass and then store the data into ArrayList and return the ArrayList.
It should look like
{code:java}
package ris;
import java.sql.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class NewClass{
public static ArrayList getNames(){
Connection con = null;
ResultSet rs=null;
Statement smt=null;
ArrayList nameList = new ArrayList();
try{
Class.forName("com.mysql.jdbc.Driver").newInstance();
con=DriverManager.getConnection("jdbc:mysql:///net","root", "anthony111");
smt=con.createStatement();
rs= smt.executeQuery("SELECT * FROM emp");
while(rs.next()){
nameList.add(rs.getString("Name"));
return nameList;
}catch( Exception e){
String msg="Exception:"+e.getMessage();
</code><code class="jive-code jive-java"><font>return nameList;</code><code class="jive-code jive-java">
}finally {
try {
if(con != null)
con.close();
} catch(SQLException e) {}
</code><code>return nameList;</code>
<code class="jive-code jive-java"> } -
How to read a data from USB port using JAVA
hi all,
i need to know how to read a data from USB port using java. any API are available for java ?.........please give your valuable ideas !!!!!!!!!
Advance Thanks!!You can do this. Please use this link
[http://www.google.co.in/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=uHu&q=java+read+data+from+usb+port&btnG=Search&meta=&aq=f&oq=]
What research did you do of your own? Have you done some testing application and tried yourself?? -
How to populate arrayList values in a Excel cell using java
Hi ,
Iam trying to create Excel sheet using java with Apache-POI api's.I need to display values from an arrayList into Excel cell as drop down.kindly suggest me any idea or share any code if u have any.
Thanks in advance
Regards
RajeshI suggest you use google to find examples.
-
How can I authenticate to a XI server using java via SOAP (SAAJ)
Hi everybody!
I need to connect (SOAP) to a XI server using JAVA
I'm using SAAJ api.The problem is XI server need authentication but I can't found the way to do it! this is a part of code
SOAPConnectionFactory soapConnFactory = SOAPConnectionFactory.newInstance();
SOAPConnection connection = soapConnFactory.createConnection();
URL destination = new URL("https://host:port");
SOAPMessage reply = connection.call(message, destination);
(message is the XML code)
but the application has the following error:
com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection post
GRAVE: SAAJ0009: Fallo en el envío del mensaje
I think, maybe is a authentication problem, because the XI server needs it. But I don't have idea how can I send the user and pass
Any IDea???? please
the libraries are ok imported, I use netweaver to develop-
thanks in advantagehi Leslie,
there are only a few of these errors,
you can try this:
http://www.oxygenxml.com/forum/ftopic1103.html&sid=0abee8c719481a3dd783ff7d5cd84105
are you sure your URL is accessible from your location?
you may also check:
http://www.google.pl/search?hl=pl&q=HttpSOAPConnectionpostSAAJ0009%3A&lr=
Regards,
michal -
Problem Using Java Store Procedure (java class) to connect to sybase
Hi, I'm trying to use a java class to obtain some data from another databse (SYBASE) in another server.. here are the code
package pkg;
import com.sybase.jdbcx.SybDriver;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class clsTest
public clsTest()
public static void main(String[] args)
testConn("");
private static void testConn()
Connection _con= null;
String host = "XXX";
String port= "XXX";
String url = host + ":" + port;
Statement _stmt= null;
int timeout = 10;
boolean needsReconnect = true;
SybDriver sybDriver = null;
try
Class c = Class.forName("com.sybase.jdbc3.jdbc.SybDriver");
sybDriver = (SybDriver) c.newInstance();
DriverManager.registerDriver((Driver) sybDriver);
catch (Exception e)
System.err.print("Unable to load the Sybase JDBC driver. "
+ e.toString());
e.printStackTrace(System.out);
if (needsReconnect)
try
if (_con != null)
_con.close();
url="jdbc:sybase:Tds:BDSERVER:PORT/BD";
System.err.println("Trying to connect to: " + url);
DriverManager.setLoginTimeout(timeout);
con = DriverManager.getConnection(url,"usrquery","mundial");
_stmt = _con.createStatement();
boolean results = _stmt.execute("select count(*) from TABLA");
if (results)
ResultSet rs= _stmt.getResultSet();
rs.next();
System.err.println(rs.getString(1));
_con.close();
catch (SQLException sqle)
System.err.println(sqle.toString() + " Restart connection.");
return;
catch (Exception e)
e.printStackTrace();
System.err.println("Unexpected Exception: " + e.toString());
return;
When I run the proyect using the IDE JDeveloper I have no problem, but when I make de use loadjava I receive these error message
creating : resource META-INF/MANIFEST.MF
loading : resource META-INF/MANIFEST.MF
Error while creating resource META-INF/MANIFEST.MF
ORA-29547: Java system class not available: oracle/aurora/rdbms/Compiler
creating : class pkg/clsTest
loading : class pkg/clsTest
creating : resource jconn3.jar
loading : resource jconn3.jar
Error while creating resource jconn3.jar
ORA-29547: Java system class not available: oracle/aurora/rdbms/Compiler
granting : execute on class pkg/clsTest to public
Error while computing shortname of pkg/clsSybaseLAE
ORA-06550: line 1, column 13:
PLS-00201: identifier 'DBMS_JAVA.SHORTNAME' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
resolving: class pkg/clsTest
errors : class pkg/clsTest
ORA-29521: referenced name java/lang/StringBuffer could not be found
ORA-29521: referenced name java/lang/Class could not be found
ORA-29521: referenced name com/sybase/jdbcx/SybDriver could not be found
ORA-29521: referenced name java/sql/Driver could not be found
ORA-29521: referenced name java/sql/DriverManager could not be found
ORA-29521: referenced name java/lang/System could not be found
ORA-29521: referenced name java/lang/Exception could not be found
ORA-29521: referenced name java/io/PrintStream could not be found
ORA-29521: referenced name java/sql/Connection could not be found
ORA-29521: referenced name java/sql/Statement could not be found
ORA-29521: referenced name java/sql/ResultSet could not be found
ORA-29521: referenced name java/sql/SQLException could not be found
ORA-29521: referenced name java/lang/Object could not be found
ORA-29521: referenced name java/lang/String could not be found
synonym : pkg/clsTest
The following operations failed
resource META-INF/MANIFEST.MF: creation
class pkg/clsTest: resolution
resource jconn3.jar: creation
exiting : Failures occurred during processing
Please some one help me!.. Thank's a lotThanks, you was right, but I have another problem
The following operations failed
class cl/bcch/clsSyBase: resolution
source cl/bcch/clsSyBase: creation (createFailed)
oracle.aurora.server.tools.loadjava.ToolsException: Failures occurred during processing
at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:1057)
at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:124)
at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:53)
at oracle.jdevimpl.deploy.OracleDeployer.deploy(OracleDeployer.java:98)
at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:503)
at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:381)
at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:300)
at oracle.jdevimpl.deploy.StoredProcProfileDt$Action$1.run(StoredProcProfileDt.java:598)
#### Export incomplete. #### 09-01-2008 02:28:39 PM
*** Note ***
One possibility for the database export failure is that the target Database may not support JDK version 1.4. Updating your Project Properties compiler Source & Target to an earlier release could fix this problem.
************ -
How to create and install a toolbar to a browser using java
Hi all,
Can any one guide me about how to create and install toolbar to a browser using java ??
please any one help me about this,i am not getting any idea about this..
Thanks and Regards
Sandesh SI doubt you can. Those browser toolbars are done by implementing to an API provided by the browser. That API, I don't believe, is provided via Java. But of course, that would be entirely up to the browser, not Java.
-
How do I add a TableModelListener using NetBeans IDE 6.0
I added a JTable using the IDE but I need to be able to detect when someone has changed the value in a cell.
From reading I found that I need a TableListener and can use TableChanged and GetValueAt but I can not determine how or where I am suppossed to add that code.
It seems like it should be in the Guarded block because that is the only part of my code where my JTable is in scope.
I tried adding a TableModelListener in the section of code that I can edit...right above main and the section where the IDE adds lines like these....
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
So long story short I still can not determine how to add a Listener to my table.
Is it something I have to edit myself or can the IDE add it? I can only see Mouse and Key Listeners that I can add in the IDE.Hi,
Sorry I don't have a ready answer to your question, which by now you have probably resolved already. One reason you did not receive a timely reply is that this is a Java Studio Enterprise (JSE) forum, and not a NetBeans forum. Although these are two different products, many of the Enterprise features of JSE can be found in the current NetBeans 6.0 product.
The general place to ask NetBeans questions is at [email protected]
Regards,
-Brad Mayer -
Hi All,
I want to use the below java code in my form 6i ..but don't know how????????
related function is also given below..........
Any idea .......Please
Thanks
Harry.....
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.sql.*;
public class MyProgram {
private static Connection con = null;
private static Statement st;
public static ResultSet rs;
public static String s;
/* public void setlable(int n)
rs = st.executeQuery("SELECT number_to_words("+n+") FROM dual");
while (rs.next())
output.setText(rs.getString(1));
public static void main(String[] args) {
try
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@172.19.193.38:1525:ITSTIN", "scott", "tiger");
st = con.createStatement();
}catch(Exception exp){
System.out.println("Error"+exp.toString());
JFrame f = new JFrame("Conver Digit to Words..");
JLabel input = new JLabel("Enter Numeric digits :");
final JLabel output = new JLabel("Please enter value into TestBox.....",JLabel.CENTER);
final JTextField TF1 = new JTextField(90);
final JButton B1 = new JButton("Close");
f.setSize(750, 250);
f.setLocation(300,200);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container contentPane = f.getContentPane();
contentPane.setLayout(null);
contentPane.setBackground(Color.CYAN);
TF1.setLocation(300,25);
TF1.setSize(150,30);
input.setLocation(175,25);
input.setSize(150,30);
input.requestFocus();
output.setLocation(15,100);
output.setSize(650,30);
output.setForeground(Color.RED);
B1.setSize(100,32);
B1.setLocation(620,175);
contentPane.add(TF1);
contentPane.add(input);
contentPane.add(output);
contentPane.add(B1);
f.setVisible(true);
B1.addMouseListener(new MouseAdapter(){
public void mouseClicked(MouseEvent me)
System.exit(0);
TF1.addKeyListener(new KeyAdapter(){
public void keyReleased(KeyEvent event){
if (TF1.getText().equals("") )
output.setText("Please enter value into TestBox.....");
else
try
if (TF1.getText().length()<12)
s = "SELECT initcap(number_to_words("+Long.parseLong(TF1.getText())+")) FROM dual";
rs = st.executeQuery(s); //Function number_to_words exists in scott@itstin created by AMUY-IN
while (rs.next())
output.setText(rs.getString(1));
}catch(Exception e)
System.out.println("Error-2"+e.toString());
================================function===============
CREATE OR REPLACE FUNCTION amuy_con_to_eng(nm2 NUMBER) RETURN VARCHAR2 IS
nm1 NUMBER(10,0) := nm2;
NM VARCHAR2(100):='';
div NUMBER;
BEGIN
WHILE nm1>0 LOOP
IF nm1>=20 THEN
div :=Floor(nm1/10);
NM := NM||' '||base_convert(div*10);
nm1:=Mod(nm1,10);
END IF;
IF nm1>=1 AND nm1<20 THEN
NM := NM||' '||base_convert(nm1);
nm1:=nm1/10;
END IF;
nm1 :=Floor(nm1/10);
END LOOP;
RETURN NM;
END;
CREATE OR REPLACE FUNCTION number_to_words(inm NUMBER) RETURN VARCHAR2 IS
/* Function that converts number's to word's*/
/* Created buy amuy-in */
l_inm NUMBER(35,0);
NM VARCHAR2(1000):='';
div NUMBER;
BEGIN
l_inm := inm;
IF inm<=0 THEN
RETURN 'ZERO';
ELSE
WHILE l_inm>0 LOOP
case when Length(l_inm) >= 1 AND Length(l_inm)<=2
then RETURN NM||' '||sf_num_to_words(l_inm);
when Length(l_inm) = 3
then div :=Floor(l_inm/RPad(1,3,0));
l_inm := Mod(l_inm,RPad(1,3,0));
NM :=NM||' '||sf_num_to_words(div)||' '||'HUNDRED';
when Length(l_inm) >= 4 AND Length(l_inm) <= 5
then div :=Floor(l_inm/RPad(1,4,0));
l_inm := Mod(l_inm,RPad(1,4,0));
NM :=NM||' '||sf_num_to_words(div)||' '||'THOUSAND';
when Length(l_inm) >= 6 AND Length(l_inm) <= 7
then div :=Floor(l_inm/RPad(1,6,0));
l_inm := Mod(l_inm,RPad(1,6,0));
NM :=NM||' '||sf_num_to_words(div)||' '||'LAKH';
when Length(l_inm) >= 8 AND Length(l_inm) <= 9
then div :=Floor(l_inm/RPad(1,8,0));
l_inm := Mod(l_inm,RPad(1,8,0));
NM :=NM||' '||sf_num_to_words(div)||' '||'CRORE';
when Length(l_inm) >= 10 AND Length(l_inm) <= 11
then div :=Floor(l_inm/RPad(1,10,0));
l_inm := Mod(l_inm,RPad(1,10,0));
NM :=NM||' '||sf_num_to_words(div)||' '||'ARAB';
ELSE RETURN 'ERROR {Length of input value should be <12}';
END CASE;
END LOOP;
RETURN NM ;
END IF;
END;
/You cannot use java directly inside forms. You can either create a java-bean to enhance the GUI (as you have some UI-components in your java-code, i guess this would be the direction) or use the java-importer and call server-side-java. Both require that you are running forms in a web-version and not as client-server.
What exactly is your requirement? -
Confused.. trying to stop a flash video using java
Hi, I am trying to put a video on a webpage that uses java to
hide it's visibility.
This layer has a video, and when a person clicks on a link
java hides the layer and it is supposed to stop the video from
playing. I know how to hide the layer, but I am new to flash and I
have not seen a way to use java to turn of the video.
Any ideas? How I can use a simple java function to turn the
video off?
Many thanks for any ideas to solve this.
JoeI'm pretty sure that you mean Javascript and not Java. Have a
look at the ExternalInterface class. There are some examples in the
online help that demonstrate calling a function in a Flash movie
from Javascript in the HTML doc. -
How to create a directory or Folder using java program?
Hi all,
Can any one know, how to create a directory(new folder) in java.
can any give me some idea, on creating a directory using java program dynamically.
thanx in advancehi thanks for your answer,
sorry, actual i know this technique(its my fault i didnt mentioned it)
i am looking for some what different technique.
bye
ram
Maybe you are looking for
-
Flicker appears solely the fault of Premiere Pro CC 2014.2. Tested on different computers. Used as nVidia Quadro and GeForce GTX770. Drivers were different. Everywhere equally evident flicker. Incidentally, it defies logic and may occur at different
-
Support for C 'n' Q with CG-revision Athlon 64
Recently I bought a MSI K8T FSR motherboard and an Athlon 64 3000+, CG-revision. The new system is very stable and fast, the processor seems to be correctly identified, the only problem is Cool and Quiet isn't working. I've installed clean copy's of
-
HT1853 how to reset my ipod touch
i am locked out of my apple ipod and i dont know how to reset it
-
SERIOUS IPOD PROBLEM! SCREEN! :(
My iPod has worked fine so far. 5G, 30GB iPod White. Until today the screen has froze. It has lines that appear on your laptop if you pushed it on the back. Colored lines stretched accross the screen. I tried to reset, but it is the actual screen tha
-
Driver development redirect goes nowhere
The Driver Development site redirect on the top of this form does not take you to a driver development site: http://soldc.sun.com/developer/support/driver/