Packages help (linux)
i would like to know in what directory should i put my jar packages that i use in my program?
and also how to instal the mysql connector.. thx in advance
i would like to know in what directory should i put
my jar packages that i use in my program?put it here.
jre_dir/lib/ext/
and also how to instal the mysql connector.. thx in
advancealso here
jre_dir/lib/ext/
=)
Similar Messages
-
Meric -- Another package helper (packer fork)
Hi. Here is Meric. I have made modifications to famous and well written "packer" (thanks to Matthew Bruenig) to fit my needs. So a packer fork "Meric" has born. I decided to share it with community. But remember, i am neither a coder nor a bash expert. So, my modifications may be an ugly hack to packer; but it just works for me. I hope you'll enjoy it. All credits must go Mr. Bruening.
From Meric README:
Meric is a package helper for Arch Linux. It can retrieve packages from official repositories and Arch User Repository (a.k.a. AUR).
Meric is a fork of famous "packer" which is developed by Matthew Bruenig <[email protected]>
Meric is born from the needs of the autor.
Meric has a few differences from packer:
1- Meric has a config file. Users may use it for daily meric tasks instead of using options in commandline. Also makepkg options can be set there. Once options have been set; meric can call makepkg with these options by default.
2- Meric has the ability of remove installed dependencies after package creation. Like "makepkg -r". Not perfect but it works for my needs.
3- Meric can skip checking and installing from specified repositories with "--skip-repo" option. This is useful when you setup your custom repository with AUR packages. Aur helpers, including packer, won't treat those packages as aur packages because it thouhgt that they came from a repo (your custom repo). So those packages always skipped when AUR updates checking phase. This option prevents this for you.( also can be set in meric.conf to make it default behaviour)
4- Meric can use translations. For the sake of keep package and its dependencies minimal; only one text file (in bash script format) is used to hold and provide all translations. See TRANSLATIONS section.
5- Meric can call pacman with a custom pacman.conf file for all pacman related operations. Just place your custom pacman.conf under $HOME/.config/meric/ directory.
Github link: https://github.com/tarakbumba/meric
Aur link: https://aur.archlinux.org/packages.php?ID=59946fschiff wrote:
471,475c604,611
< '--auronly') auronly='1' ;;
< '--devel') devel='1' ;;
< '--skipinteg') MAKEPKGOPTS="--skipinteg" ;;
< '--') shift ; packageargs+=("$@") ; break ;;
< -*) echo "packer: Option \`$1' is not valid." ; exit 5 ;;
> '-a'|'--auronly') auronly='1' ;;
> '--devel') devel='1' ;;
> '--skipinteg') MAKEPKGOPTS+=("--skipinteg") ;;
> '--cleandeps'| '-c') cleandeps='1' ;;
> '--version'| '-v') echo -n "Meric - $VERSION" ;;
> '--skip-repo') skipped_repos="$2" ; skip_repo='1' ; shift ;;
> '--') shift ; packageargs+=("$@") ; break ;;
> -*) echo -e "${COLOR7}$ERROR :$ENDCOLOR $ERROR9" ; exit 5 ;;
MAKEPKGOPTS= is different. Possible bug?
Its the only place where the variable gets set.
234c322
< echo "${PKGURL}$(jshon -Q -e results -e URLPath -u < "$tmpdir/$1.info")"
> echo "${PKGURL}$(jshon -e results -e URLPath -u < "$tmpdir/$1.info")"
-Q option
Thank you for interesting in. MAKEPKGOPTS is indeed different and it is not a bug but a feature to allow use of Makepkg options from meric.conf
But you' re right. Somehow i missed -Q option in pkglink function. Will update git with this. Thanks for your feedback! -
There are plenty of executables, but non of them opened a window when I clicked on them. The package is the latest beta release.
You need to start the firefox script.
*http://kb.mozillazine.org/Installing_Firefox#Linux
Create a new profile exclusively for the 4.0 beta version and create a desktop shortcut with -P "profile" appended to the target to launch that profile.
* http://kb.mozillazine.org/Testing_pre-release_versions
* http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox -
DBMS_CRYPTO package help needed :(
Hello all,
I want to use Oracle's DBMS_CRYPTO package for decrypting some data.
I have one sample program as follows which is not working....the error is shown below.
SQL> DECLARE
2 input_string VARCHAR2 (200) := 'Secret Message';
3 output_string VARCHAR2 (200);
4 encrypted_raw RAW (2000); -- stores encrypted binary text
5 decrypted_raw RAW (2000); -- stores decrypted binary text
6 num_key_bytes NUMBER := 256/8; -- key length 256 bits (32 bytes)
7 key_bytes_raw RAW (32); -- stores 256-bit encryption key
8 encryption_type PLS_INTEGER := -- total encryption type
9 DBMS_CRYPTO.ENCRYPT_AES256
10 + DBMS_CRYPTO.CHAIN_CBC
11 + DBMS_CRYPTO.PAD_PKCS5;
12 BEGIN
13 DBMS_OUTPUT.PUT_LINE ( 'Original string: ' || input_string);
14 key_bytes_raw := DBMS_CRYPTO.RANDOMBYTES (num_key_bytes);
15 encrypted_raw := DBMS_CRYPTO.ENCRYPT
16 (
17 src => UTL_I18N.STRING_TO_RAW (input_string, 'AL32UTF8'),
18 typ => encryption_type,
19 KEY => key_bytes_raw
20 );
21 decrypted_raw := DBMS_CRYPTO.DECRYPT
22 (
23 src => encrypted_raw,
24 typ => encryption_type,
25 KEY => key_bytes_raw
26 );
27 output_string := UTL_I18N.RAW_TO_CHAR (decrypted_raw, 'AL32UTF8');
28 DBMS_OUTPUT.PUT_LINE ('Decrypted string: ' || output_string);
29 END;
30 /
DBMS_CRYPTO.ENCRYPT_AES256
ERROR at line 9:
ORA-06550: line 9, column 2:
PLS-00201: identifier 'DBMS_CRYPTO' must be declared
ORA-06550: line 8, column 23:
PL/SQL: Item ignored
ORA-06550: line 14, column 21:
PLS-00201: identifier 'DBMS_CRYPTO' must be declared
ORA-06550: line 14, column 4:
PL/SQL: Statement ignored
ORA-06550: line 15, column 21:
PLS-00201: identifier 'DBMS_CRYPTO' must be declared
ORA-06550: line 15, column 4:
PL/SQL: Statement ignored
ORA-06550: line 21, column 18:
PLS-00201: identifier 'DBMS_CRYPTO' must be declared
ORA-06550: line 21, column 1:
PL/SQL: Statement ignored
Oracle version is
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production on linux server.
can anybody help me how to resolve this problem?
I mean isnt "DBMS_CRYPTO" Oracle's Standard package?
pls help.Really you should not be using SYSTEM account - you should create your own DBA / Development accounts and use those.
However, what you are missing is to connect as SYS/SYSDBA and...
GRANT EXECUTE ON dbms_crypto TO system; -
Hi I have been struggling with this for the last three days. I have tried multiple searches in the forums but cannot make head nor tail of setting the classpath in linux when compiling a package.
in the following directory "/home/tamtam/Java/Course/Unit4/act4_1"
I have two classes Greeting.java and Main.java
Greeting.java compiles successfully and creates Greeting.class
I cannot compile Main.java which uses the class Greeting.
Both have package act4_1 as the first line in the code.
I know I need to set the classpath but have been unable to do so. Where is the starting directory.
I havenot got a clue where to start.
I get error message
Main.java:15: cannot resolve symbol
symbol : class Greeter
location: class act4_1.Main
Greeter greeter = new Greeter();
Any help would be greatfully appreciated.
tamtamI am completely new to Linux and just started with Java.
Does anyone know a link to a step by step guide.
in C++ say I had two files in the same directory "Greetings.cpp" and "Main.cpp" and there coresponding header files. Main.cpp uses an instance of the class Greeting. I would use include "Greeting.cpp" in Main.cpp so that the class Greeting would be available.
In Java I have two files, Greeting.java and Main.java. Both have package act4_1 at the top of the file.
Main.java
package act4_1;
Activity 4.1
Main.java
Runs Greeting.java
import java.io.*;
public class Main
public static void main(String[] args) throws IOException
Greeter greeter = new Greeter();
greeter.Run();
}Greeting.java
package act4_1;
Activity 4.1
Greeter.java.
import java.io.*;
public class Greeter {
public void Run() throws IOException
System.out.println("Hello from TamTam");
}How exactly do I get Main.java to accept the class Greeter.
The path is as above. -
Where can I find adobe file packager for linux?
Now I need Adobe's file packager to produce .f4f ,.f4m and .f4x files in linux for http dynamic streaming. but I can't find where to download it.
Isn't the packager part of Flash Media Server?
http://help.adobe.com/en_US/HTTPStreaming/1.0/Using/WS9463dbe8dbe45c4c-c126f3b1260533756d- 7ffc.html#WSaeac10ab694095a12a9a3a7d12823cda643-7fff
HTTP live media streaming software | Adobe Media Server 5 Professional
Adobe Media Server Help | Install Adobe Media Server -
Whre can I get these packages for linux?
Hi,
I installed OWB in Linux Server.
Database oracle10g, Workflow server 2.6.3 are installed on Linux server.
Now I want to install OEM in Linux server. While I am trying to install OEM, it is showing that, the prerequisites are not satisfied.
Oracle Grid Control 10g Release 1 (10.1) installs.
Specifically, please ensure the following:
* Availability of gcc-3.2.3, setarch-1.3, pdksh-5.2,
openmotif21-2.1.30, sysstat-4.0.7, gnome-libs-1.4.1.2.90-34.1,
libstdc++-3.2.3, etc.
* Availability of Compat libraries:
compat-libstdc++-devel-7.3-2.96.122,
compat-glibc-7.x-2.2.4.32.5, etc.
* Patch for libcwait.so (Patch no. 3006854)
* Symbolic links for gcc/g++
Finally I checked the packages in my linux server. I found as follows
gcc-3.2.3-20
setarch-1.3-1
package pdksh-5.2 is not installed
package openmotif21-2.1.30 is not installed
package sysstat-4.0.7 is not installed
gnome-libs-1.4.1.2.90-34.1
libstdc++-3.2.3-20
compat-libstdc++-devel-7.3-2.96.122
package compat-glibc-7.x-2.2.4.32.5 is not installed
How to get the components (Not Installed components).
Is there any site that provides this software?
Any help is appreciated.
Thanks and regards
Gowtham Sen.Which version of Linux are you using?
Read this:
http://lists.suse.com/archive/suse-oracle/2004-Jul/0033.html
Maybe it can be useful help.
Also, try to re-open this thread in the OEM Forum (Enterprise Manager
Good luck.
Marcos -
Latest flashplayer package for Linux tar.gz appears to be defective.
Yeah, I know those are strong words, so here's the story:
In the past, the flashplayer package for tar.gz, the only version of flashplayer i know that installs in all Linux distros, has always unzipped into a directory containing two files, one of which is a script. You CD to the directory, run the script, and flashplayer installs.
Well, suddenly , there is no directory, and no script, just a single library file named flashplayer.so
The installation instructions have not changed, however:
"Installation instructions for tar.gz
Click the download link to begin installation. A dialog box will appear asking you where to save the file.
Save the .tar.gz file to your desktop and wait for the file to download completely.
Unpackage the file. A directory called install_flash_player_10_linux will be created.
In terminal, navigate to this directory and type ./flashplayer-installer to run the installer. Click Enter. The installer will instruct you to shut down your browser(s).
Once the installation is complete, the plug-in will be installed in your Mozilla browser. To verify, launch Mozilla and choose Help > About Plug-ins from the browser menu."
The directory is mentioned, and so is the script, but those things aren't in the file anymore. So yeah, something's seriously messed up, and has been for weeks. I'm wondering if someone can maybe tell me if there's a place on the web where I can find the previous version.11.2.202.346 was and is the last version to be developed for Linux. There won't be any more.
-
I having trouble useing packages that I create.. I'm useing Redhat 7.2 java 1.4.
First I've set my $PATH to include /java/bin/ this is how I was able to compile programs all semister long
now I want to make a package and I can accomplish this with the following command...
javac -classpath /home/Ron/ source.javathis will create the package in the com.techport80.keyIO directory as I wanted... but now to use the package is where I'm having trouble
javac -classpath /home/Ron useSource.java will compile it has the import command at the top of the file....
import com.techport80.keyIO.*;now when I try to run the progie
java useSourceI'll get the error
Exception in thread "main" java.lang.NoClassDefFoundError: com/techport80/rwKeyIO/rwKeyIO
at useKeyIO.main(useKeyIO.java:4)if I try to run the progie like...
java -cp /home/Ron useSourceI get the following...
Exception in thread "main" java.lang.NoClassDefFoundError: useKeyIOif I actually set the classpath in the bash_profile the results aren't any different. Am I missing the point of what packages are supposed to do?? Do I need to create a directory structure specificaly for java?? Why can't I find where the other packages I import are stored so that I can keep my packages there. Like javax.swing for example.
Thanks in advance for any help offered..
Ron_WIn Linux I have noticed the same thing when compiling java code that is in a package but not stored in the proper location. You shouls simply set your classpath to the location "you" want java to look for your packages or other 3rd party packages. This is just for your convenience. You can have one directory to store all your sourcecode or you could have ten directories. Setting your classpath will have no affect on how windows users will be able to properly use your code. you "should" be able to compile your code with
javac mycode.javathat has worked for me since the current directory is always considered to be in the classpath?
Its clear that you understand how the packages have to be stored in the file system. So just think of the whole classpath thing as something to do when you install java classes and packages to your system into a new location. I would not place my classes in the / directory of my system. Many people also don't have the permissions to do so, but they can put the files in their home directories and just update their classpath variable to reflect the directory where they placed the packages. I think packages are "supposed" to be used to organize your source code. It should also group like Objects together. Just look at the Java API the whole thing is based on different types of stuff. They shouldn't put the System class with the JFrame class. They have nothing in common, and therefore should be separated. When making packages you should think hard about your naming conventions because you obviously want your package heirarchy to make sense so that you can properly use it. In the end though I think it is up to you whether you even use packages since they arent even required for your application. So did yo get your app running or are you still having problems? -
Deploying software packages to linux
Hello,
Apparantly it is possible to use in SCCM 2012 to do the following things with Linux clients:
-deploy software to linux using packages (not applications)
-install program updates
-install OS updates
Nowhere I can find more about this. I'm currently writing a thesis about SCCM and like to write some more about Linux. I've found about installing sccm agent on linux en running the service on linux, but nothing about deploying packges to linux... Does anyone
have some examples of these 3 things? It would be much appreciated.
kind regardsHi,
In addtion, please refer to the following video:
Supporting Linux, Unix and Mac Clients with System Center 2012 Configuration Manager SP1
http://blogs.technet.com/b/keithmayer/archive/2012/10/30/supporting-linux-unix-and-mac-clients-with-system-center-2012-configuration-manager-sp1.aspx#.UO3hIWbKzq5
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Stored Proc's/Packages Help
Ok all, again, being new to Oracle and trying to do a humble favor for a friend, I've come up with a problem that I'll need help on. Running these steps individually gets me pretty much the result that I'm looking for, minus some basic retooling with TSQL. However, I've tried to format this in the form of either a package/procedure and I just don't believe I'm doing it right. I've been reading the PL-SQL for Dummies, in addition to the latest Oracle 10G PDFs, but as much as I try, I just can't format the package right, even using v_ types and declaring. Below is the code, and even though I've listed tables, this has to be done dynamically and/or processed in memory. I know this may seem simple at best to those of you who understand Oracle, but to me, it's like a square peg in a round hole.
Would appreciate any and all comments and assistance. Thank you kindly for your perusal of this post (code below):
--STEP 1:
create table tbl1 as
SELECT ps.id1
,ps.id2
,ps.tdate
,NVL(ps.udate, SYSDATE + 1 )
,ps.tcode
,decode (y.nmtext,
'name1', 'nm1',
'name2', 'nm2',
'name3','nm3',
'name4','nm4',
'name5','nm5',
'name6','nm6',
'name7','nm7',
'name8','nm8')
,(SELECT COUNT(ps2.id1)
FROM tblhere ps2
WHERE ps2.id1 = ps.id1
AND ps2.id2 = ps.id2
AND ps2.tdate <= TO_DATE('03/01/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
AND NVL(ps2.udate, SYSDATE + 1) >= TO_DATE('02/01/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
GROUP BY ps2.id2) AS o_cnt
,(SELECT COUNT(ps3.id1)
FROM tblhere ps3
WHERE ps3.id1 = ps.id1
AND ps3.tcode = ps.tcode
AND ps3.tdate <= TO_DATE('03/01/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
AND NVL(ps3.udate, SYSDATE + 1) >= TO_DATE('02/01/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
GROUP BY ps3.tcode) AS a_cnt
,y.ntype as ntype
FROM tblhere ps
INNER JOIN tblz y
ON ps.id2 = y.thisid
WHERE ps.tdate <= TO_DATE('03/01/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
AND NVL(ps.udate, SYSDATE + 1 ) >= TO_DATE('02/01/2007 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
AND tcode = 'placedhere'
AND y.ntype='testing'
order by id1, tdate
--STEP 2:
create table overages (
Mynum number,
MyID number)
--STEP 3:
insert into overages
select count(*) as Mynum, id1
from tbl1
group by id1
having count(id1) > 1
order by id1 desc
--STEP 4:
create table tbl2 (
nums number,
cid number,
ogid number,
adate date,
rdate date,
timer number,
mymode varchar2(10 Byte),
place varchar2(50 Byte),
og_cnt number,
mymode_cnt number,
namer varchar2(1 Byte))
--STEP 5:
insert into tbl2
select b.mynum, a.id1, a.id2,
a.tdate, NVL(a.udate, SYSDATE + 1),
a.tcode, a.nmtext, a.o_cnt,
a.a_cnt, a.ntype
from tbl1 a
inner join overages b
on a.id1 = b.myid
order by cid, adate
--STEP 6:
merge into tbl2 a
using (select rwd,
cid,
ogid,
min(rwd) over (partition by cid, adate, rdate) rwd_min,
adate,
rdate,
mymode, place,
from (select cid, rowid rwd,
last_value(d1 ignore nulls) over (partition by cid order by rdate range between unbounded preceding and current row) as adate,
first_value(d2 ignore nulls) over (partition by cid order by rdate range between current row and unbounded following) as rdate
from (select cid,
adate,
rdate,
case when abs(adate-lag(rdate) over (partition by cid order by rdate))<=1
then null else adate end d1,
case when abs(rdate-lead(adate) over (partition by cid order by rdate))<=1
then null else rdate end d2
from tbl2))) b
on (a.rowid=b.rwd)
when matched then update set a.adate=b.adate, a.rdate=b.rdate
delete where b.rwd!=b.rwd_min;In general you should create the empty tables first as an installation step. Then in your PL/SQL code you would just do inserts, updates etc.
Also, a package is defined in two parts:
CREATE OR REPLACE PACKAGE whatever
AS
PROCEDURE p
( p_someparam INTEGER );
FUNCTION q
RETURN BOOLEAN;
END whatever;
CREATE OR REPLACE PACKAGE BODY whatever
AS
PROCEDURE p
( p_someparam INTEGER )
IS
BEGIN
dbms_output.put_line('Hello, World');
END p;
FUNCTION q
RETURN BOOLEAN
IS
BEGIN
RETURN dbms_random.value(0,10) < 5;
END q;
END whatever;
/ -
ITunes and Windows Installer Package - HELP!!!!
I've seen my question, which is also MY problem, that Windows Installer Package will not allow ITunes to download. I've read several posts on possible "fixes" in several forums, and have yet to resolve my problem. Anyone know how I can fix this? I would REALLY appreciate the help.
it says there is a problem with this windows installer package, a DLL required could not be run
With that one, even though you're getting a different error message, try the procedure from the following user tip:
"The administrator has set policies to prevent this installation" error messages when installing iTunes for Windows on Windows Vista and Windows 7 systems -
BT can't find my broadband package - Help/advice n...
Hello
So glad I found this forum – I'm in need of some help before I go mad!
I have been a BT internet customer for nearly 10 years.
The trouble started at the end of July when I tried to add BT sport free (I have Sky). I couldn't do it online, so I went on online chat and they said I didn't have a broadband account with them. After an hour of me trying to convince them that I am a customer, they finally said they couldn't help me other than to suggest I talk to sales to add broadband to my account – I already have BT broadband!
I then emailed the residential customer services team via the complaints route to express my dismay at the poor treatment of a long-term loyal customer and to request that they intervene and sort the situation out for me.
They repeated that I only have landline showing with them and asked whether I had another account number. My internet has always been billed separately to my phone account, but looking through all my documents I couldn't see that I'd ever had an account number for my internet service.
I discovered when I looked at my account in BT Yahoo email, that I was still on the BT Yahoo Anytime Plus service, but there was no account number to be seen anywhere. Like many people on this forum I received occasional emails from BT at the end of 2011 saying that I would be transferred to BT Total Broadband Option 1 at some point, but this obviously never happened.
On reading this forum I discovered that there are a number of people like me who have 'unaligned' accounts where they're still on an old service that is billed separately and not linked to their MyBT account. I also read on this forum that someone had managed to find their separate internet account number by checking their bank statement direct debit info. I did this and managed to find an account number (starting GB followed by 8 numbers) but I've tried to use it online myself and it isn't recognised, so I've emailed the residential services team with this number.
They haven't replied to me yet – it's well past the 72 hours they're supposed to reply in – and I've got a strong feeling they're just going to say they can't find the account number on their system. If they reply at all.
Interestingly, I went onto my BT Yahoo email account page today and my internet product had changed from BT Yahoo Anytime Plus to BT Total Broadband Option 1.
Now, I don't know if my message has triggered some action at BT's end, but if it has they haven't told me. My big concern now is that my BT Yahoo Anytime Plus was unlimited with no contract and it now looks like I've been moved to a product with a tiny 10GB limit. I run an online business so I'm rarely offline and I'd exceed my limit within a few days. I'm worried that I'm already exceeding my usage, and if I hadn't looked I wouldn't even know I'd been moved.
All I want is for BT to recognise and merge my accounts, and then I can upgrade to an unlimited package (which will cost less than what I'm paying now anyway). And then I can also add BT Sport, to which I'm entitled and not able to get because BT's systems are rubbish.
I'd thought about simply cancelling my existing direct debit and ordering a new broadband package, but I really need to keep my email address as I've had it for years and I use it for business.
I've seen that there are lovely mods on this forum who can help, so I'm hoping one can come to my rescue before I pull all my hair out – I've got nowhere so far and it's been more than 6 weeks since my intial contact with BT.
Apologies for the length of this message!
Many Thanks,
Justine
Solved!
Go to Solution.Hello again
Can anybody tell me how long it normally takes for the mods to reply to a contact form please? I submitted an enquiry via RobbieMacs's profile link on 18 September and have not yet received a reply or acknowledgement. Does it normally take a few days to hear back from them?
My problem has also worsened. As I mentioned above, someone has been tinkering with my account because last week I was moved without warning from BT Yahoo Anytime plus service to BT Total Broadband Option 1, without being informed. Then on Friday I received a 'Welcome to BT Broadband' email (I've had BT Broadband for nearly 10 years!), and last night I for the first time ever in nearly 10 years I received a usage warning.
So, not only has my account been moved without telling me, but I've been moved from an unlimited service to a capped service (for the same price) and I'm close to reaching my limiit after a few days usage.
But, despite the behind-the-scenes tinkering, my internet product still hasn't been merged with MyBT account so I cannot access it online to upgrade to an unlimited package, and I cannot call them as they will just tell me they have no record of me having broadband with them (I've been told this too many times over the last few weeks and it drives me crazy everytime - it's as if they think I'm making it up!).
I'm so close to jumping ship to Virgin, and I think if I start incurring extra usage charges because I've been moved on to a product I currently have no control over, it may well be the last straw!
Thanks,
Justine -
Urgent deadline - Please help - Linux serialization problem
Hi -
I have a presentation on Wednesday morning of my program for my dissertation. I developed the whole thing in windows - it all works great... but the demo is on a Linux machine. Fortunately I tested today in Linux. I have a real problem. I want to save out a class instance. This code works fine in Windows:
String project_name = f.getAbsolutePath() + "/" + directory_name + ".oll";
ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(project_name));
out.writeObject(mainCanvas);
out.flush();
out.close();The problem is that in Linux I just don't get anything saved. There is nothing there at all. No file is saved. I cannot work this out and am in a panic. Any help really appreciated.
OllyHi ,
Please try to add this code to u'r prg.
private void writeFile(String s, String s1)
throws IOException
Object obj = null;
FileWriter filewriter = null;
BufferedWriter bufferedwriter = null;
if(sfmsDebug)
System.out.println("Before Writing Received Messages To a File.");
String s2 = System.getProperty("file.separator");
if(System.getProperty("os.name").toUpperCase().indexOf("WIN") !=
-1)
File file = new File("c:" + s2 + s1);
boolean flag = file.createNewFile();
filewriter = new FileWriter("c:" + s2 + s1, true);
bufferedwriter = new BufferedWriter(filewriter);
} else
File file1 = new File("/home/usr2/barcwas1" + s2 + s1);
boolean flag1 = file1.createNewFile();
filewriter = new FileWriter("/home/usr2/barcwas1" + s2 + s1, true);
bufferedwriter = new BufferedWriter(filewriter);
bufferedwriter.write(s, 0, s.length());
bufferedwriter.write("\r\n");
bufferedwriter.close();
filewriter.close();
if(sfmsDebug)
System.out.println("After Writing Received Messages To a File.");
} -
XUTP_FTP FTP Package help
I know this is not an oracle product but i know alot of people here use this.
I have it/use it/love it thanks Chris Poole!!
Wondered if someone could help me with a problem i am faced with.
We put files on a FTP site that others use to download via FTP. I created a program that basically uses the FTP package to interrogate the directory (ftp.list)
insert the entries into a table and download them to the users site.
This works apart from occasionally people will replace a file. I need to somehow pick up on the file size/date stamp change on the file?
Anyone know how/if I can achieve this.. I can download to temp location if FTP unable to do before hand?
ThanksNot sure where Chris Poole's site has gone to, but fortunately, I've got a copy of his XUTL_FTP package lying around for reference.
If you look in the package specification you will see...
FUNCTION modtime (handle IN xutl_ftp.session_handle, filename IN VARCHAR2, tz_offset IN NUMBER DEFAULT NULL, raise_exception IN BOOLEAN DEFAULT TRUE) RETURN DATE;
* Returns the last modified time of a file in as a DATE
* PARAMETERS
* handle handle to the FTP session
* filename the file name (eg 'C:\temp\somefile.csv' or '/tmp/somefile.csv' or 'somefile.csv')
* tz_offset the offset of your timezone wrt GMT (eg 11 or -5)
* raise_exception command not understood exception flagging
* RETURN
* The modified time of the file as a DATE
* EXCEPTIONS (see above)
* ORA-24275 missing or invalid parameter (if filename is null)
* invalid_handle
* transient_error
* permanent_error
* unexpected_response
* NOTES
* The filename is passed as is to the FTP server, unless the filename is null, in which case null is returned
* The command MDTM is not an official FTP command and is not documented in any RFC. However it is supported by
* several servers. Use the raise_exception flag to suppress the exception that would be generated if the command
* is not understood. This does NOT suppress exceptions for other errors (used internally).
* Testing shows that if MDTM is supported the time is returned as GMT.
* Use the tz_offset parameter to return the time adjusted for you. The default is NULL which means no conversion.
* The offset you want to supply would normally be the DB time zone, if it's set.
* You can determine this by running a PL/SQL block that uses XUTL_FTP.MODTIME for a file that
* you can also ls -l in a telnet session. e.g. if somefile.csv shows Mar 23 09:10 in telnet but MODTIME
* returns 2006-03-22 22:10:30 (assuming a NLS_DATE_FORMAT of YYYY-MM-DD HH24:MI:SS)
* then you need to supply an offset of 11 (no need for plus sign).
* XUTL_FTP makes no attempt to guess your TZ relative to the FTP server, as the time zone of the DB
* does not have to be set unless you are dealing with 'timestamps with local timezone' datatypes.
* So unless explicitly set by a DBA during DB creation, the databases time zone will be GMT!
*/
Maybe you are looking for
-
Can I include 2 diff strctures in d same wsdl file in a webservice scenario
Hii all, We are using webservice to webservice scenario in which sender shld b able to send all the new rquest to the target and receive any updations or modifications from the receiver. Few fields are different for request and modification structure
-
MQ adapter in BPEL shows Error while deploying
Hi, I am using SOA Suite 10.1.3.1.0 and Jdeveloper 10.1.3.1.0. I am creating a simple BPEL process to dequeue the message from IBM MQ and to enqueue it in another queue in same queue manager. I have created a bpel process, and I have added the tag fo
-
Why doesn't Wi-Fi turn OFF when USB Ethernet is connected?
When I get into the office, I connect my MacBook Air (2011/Lion) via USB Ethernet (we have Wi-Fi too). When connected through USB Ethernet, my Wi-Fi stays connected as well. Is it possible to have Wi-Fi turn off automatically when connected via USB E
-
1st RMI implementation: where to place the security files?
Hi all! I'm preparing my first implementation of RMI, I'm using the following example: http://java.sun.com/docs/books/tutorial/rmi/index.html At the moment, I have the following questions: where I have to place the security files? (which directory wi
-
URGENT!!!Every time i move a piece of audio on the sequencer logic crashes!
Hi Really hope someone can help me out. Every time i open up my current project, as soon as i move a piece of audio on the main sequencer, logic immediately crashes! As i am at college and use logic for absolutely all my projects i really cannot have