nabou diack

Greenhorn
+ Follow
since Oct 17, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by nabou diack

I found a way . thanks
17 years ago
Hi I'm trying to open a file located on my server. My server's name is omni
this works when i want to open a file located on my computer :
Runtime.getRuntime().exec("cmd /c start c:"+File.separator+"sdiack"+File.separator+"java"+File.separator+"timesheetserver"+File.separator+"feuilledetemps.html");}
this does not work when i try to open a file located on server omni :
Runtime.getRuntime().exec("cmd /c start omni:"+File.separator+"test"+File.separator+"files"+File.separator+"dir1"+File.separator+"file1.html");}

Please help! thanks
17 years ago
thanks I'll try that
17 years ago
here is the error message i'm getting
java.security.AccessControlException: access denied (java.io.FilePermission Omni
net1\iManager\factures\facturefrancaise.html write)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:273)
at java.security.AccessController.checkPermission(AccessController.java:
404)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkWrite(SecurityManager.java:978)
at java.io.File.createNewFile(File.java:827)
at accountServer.getFactureGeneree(accountserver.java:2232)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:42)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:28)
at java.lang.reflect.Method.invoke(Method.java:327)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:264)
at sun.rmi.transport.Transport$1.run(Transport.java:151)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:147)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
63)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
.java:704)
at java.lang.Thread.run(Thread.java:539)
17 years ago
hi
I'm having troubles with file permissions in my java.policy
i'm trying to write in a a file named fac.html located in my server.
my server's name is omni and the file is in the directory bills . I tried the following but none of it works. can you help? thanks a lot
java .policy
i tried this
grant codeBase "file://omni:/bills/*" {
permission java.io.FilePermission "<<ALL FILES>>", "write";
};
i also tried this:
grant
{permission java.io.FilePermission "//Omni//bills//fac.html", "read,write,execute";
}
17 years ago
i was using sdk 1.4 but i didn't work.
17 years ago
thanks for your reply. I tried to use replace as you said
String mystring = ch1.replace ("\r\n", "<br>");
but I get this error message:
facturationclient.java:105: replace(char,char) in java.lang.String cannot be applied to (java.lang.String,java.lang.String)
String mystring = ch1.replace ("\r\n", "<br>");
17 years ago
Hi I would like to replace \r \n by <br> in a string . How do I do that ? I tried using replace but it only works when you want to replace a single character. Thanks for your help
17 years ago
Hi I had an rmi application which was working well on access and i'm trying to make it run on sql server but I'm having lots of troubles.
I have granted all the rigrts to the tables but when I try to connect from another computer than the server I get this error:
select permission denied on object "table"
When I'm on the server I get the following errors:
Invalid descriptor index
and
Connection is busy witn results for another hstmt.
Can anyone please help?
Thanks
hi I would like to know how to increment a date received from an access database by 6 more days. thanks
hi can someone tell me how to open a file named for instance "c:/test.html" by clicking on a button in a java application
thanks.
hi can someone tell me how to open a file named for instance "c:/test.html" by clicking on a button in a java application
thanks.
17 years ago
Hi do you know how to solve the invalid cursor state error I am getting on this code.
I am actually trying to do a query inside another query. thanks for your help
public synchronized Vector getafacturer( Remote handle) throws java.rmi.RemoteException
{
try{
Statement st2 = initTransaction(handle);

if(st2 != null)
{
clientInfos client = getClientInfosFromHandle(handle);
if( (client.classLevel == ADMINISTRATOR) | | (client.classLevel == SUPERVISOR) )
{
String query1, query2;
//Vector list2 = new Vector();
Vector afacturerlist2 = new Vector();


/* query1 = " SELECT * FROM ListeProjet";*/

query2= " SELECT NoProjet, Expr1 FROM heurestravaillees";

System.out.println("SQL: " + query2);
ResultSet rs2 = st2.executeQuery(query2);
//infos.heurestravaillees= rs2.getDouble("Expr1");
//ajoute les factures a la liste
while(rs2.next())
{
afacturerinfos infos = new afacturerinfos();

infos.noprojet = rs2.getString("NoProjet");
Long noproj = new Long (infos.noprojet);
//System.out.println(noproj);
infos.heurestravaillees= rs2.getDouble("Expr1");

query1 = "SELECT DISTINCT Facture.NoProjet, Sum(FactureDetail.HeuresFacture) AS Sumhf " +
"FROM Facture INNER JOIN FactureDetail ON Facture.NoFacture = FactureDetail.NoFacture " +
"WHERE Facture.NoProjet =" +noproj+
" GROUP BY Facture.NoProjet";

System.out.println("SQL: " + query1);
ResultSet rs3 = st2.executeQuery(query1);
infos.heuresfacturees= rs3.getDouble("Sumhf");

afacturerlist2.addElement(infos);
}
return afacturerlist2;
}
}
}
catch (Exception e){e.printStackTrace();}
return null;
}