Where to put datafiles
Hello everyone,
im writing a tool atm which needs some xsltemplates and for gui some jpg files.
my question: where to put datafiles?
atm i have the files in a seperate directory. my programm folder looks like this:
startscript.bat
startscript.sh
data <- directory
jar <- directory
is this an usual solution? is there the possibility to put the datafiles together with my class files into one jar? i think it would be much more clean to get all files (except of the startscript of course) to one jar file.
whats your opinion?
mfg
dominik
I normally put the images in an 'images' directory and the files in a 'dat' directory. It is then just a matter of getting the URL of the resource as
java.net.URL url = OneOfYourClasses.class.getClassLoader().getResource(path to your resourse);
For images, the 'path to your resource' for file fred.gif in the imaages directory would then be 'images/fred.gif' . Similarly for your data files.
An image can then be loaded using
ImageIcon imageIcon = new ImageIcon(url);
and a file opened with
url.openStream() .
Similar Messages
-
Where i Put my swing application jar file in jboss
Hi experts...
I develope swing application and convert it into jar file....I know jnlp deployment using tomcat..In tomcat i
put my appcation.jar in webapps/root folder...This is not similar in jboss..I dont know where i put my applcation.jar in jboss.If any body know the idea please let me know..Hi
You have to put your jar file in
server/default/deploy
Regards
M Fazal Ur Rehman -
Hey guys,
I just bought a new iPhone but i can't restore my backup files beacuse it keeps saying "itunes could not restore backup because the password was incorrect" but I really don't know where to put the password to restore it. I really have some files that are meaningful for me so I really need help. Any suggestions anyone?Select your iDevice in the iTunes.
Choose the Summary screen (tab) and scroll to the bottom of the screen.
Then un-select Encrypt iPhone backup.
iTunes will then prompt you to “Enter the password to unlock your iPhone backup”, enter the password you set originally. -
My computer (Macbook) was working fine this am. I left it for an hour and then came back and the screen was black (always does that as the screensaver hardly ever works). I moved the mouse to wake it up and everything was normal. I went to adjust the volume and the screen went blank and the main page with the box where I put my password in when I first start my comp appeared. I put my password in and everything was normal again. I opened a window in Safari and before it loaded completely the same thing happened, the screen went blank and went back to the password box. Does anyone know why this is happening? I don't have an external hard drive or any blank flash drives so I can't back anything up right now and am afraid I'm going to lose everything. Thank you
Sounds like hardware failure, called boot loop. Call Apple and or go on apple.com and make Genius Bar appointment to have your iphone reviewed by a Tech. Provided you iphone shows no physical or liquid damage they will take care of you, or if you have Apple Care Plus
Genius Bar Rerservation : http://www.apple.com/retail/geniusbar/ -
I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it. All of the files are going into the same zip file but I want them visually in the space that I put them and not at the bottom of the snap to grid folder location they are looking like. I am trying to drag and drop files in groups so that I can group them for now, but image files always do their own "sort by" when I drag them from my web pages. Links don't do it though. I tried resetting the folder, and deleting the DS files. No luck.
You keep asking variants on this same question. You've had replies in all your other threads. If you can't find them, go here and click where it says Activity:
Thomas Cannon Jr. -
Where to put javascript code?
Hello,
I am trying to set some columns in a list as "read-only" and is using the following code:
<script type=”text/javascript”>
function SetReadOnly()
var elements=document.getElementById(’4_ctl00_ctl00_TextField’);
elements.readOnly=true;
_spBodyOnLoadFunctionNames.push(“SetReadOnly()”);
</script>
But I am not sure where to put the code in. Should I put it in the space in Content Editor Web Part,
or through a link to a txt file, or in "Edit HTML"? I've tried them but none works.
Thanks a lot!
PatrickYou can try this:
1) Open your Sharepoint List. Go to List edit view.
2) On right side of Ribbon you will find "Form Web Parts" option as shown in figure.
3) Choose your List form which you want to edit.
4) Now you can add web part in new window.
5) Add Content Editor Web part.
6) In content editor web part add the path of your "txt" file in which you have written your script, for eg.
<!DOCTYPE html>
<html>
<body>
<script type=”text/javascript”>
function SetReadOnly()
var elements=document.getElementById('4_ctl00_ctl00_TextField');
elements.readOnly=true;
_spBodyOnLoadFunctionNames.push("SetReadOnly()");
</script>
</body>
</html>
I haven't tried this method so I am not sure but hope it works...:D
***If my post is answer for your query please mark as answer***
***If my answer is helpful please vote*** -
I am not sure where to put this but I would like individual tones for all my email accounts
Wonderful suggestion.
You can give Apple feedback here > http://www.apple.com/feedback/
Hop that helps -
All of a sudden yesterday I can no longer click the star twice to tell it where to put the bookmark, and even when I click it once it doesn't save the bookmark anywhere. Also many of my toolbar bookmarks are now suddenly missing. I've tried to restore bookmarks and it says it's unable to perform that function. Help!
You can check for problems with the <b>places.sqlite</b> database file in the Firefox profile folder.
*http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
*https://support.mozilla.org/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file
*Places Maintenance: https://addons.mozilla.org/firefox/addon/places-maintenance/ -
Where to put the commit in the FORALL BULK COLLECT LOOP
Hi,
Have the following LOOP code using FORALL and bulk collect, but didnt know where to put the
'commit' :
open f_viewed;
LOOP
fetch f_viewed bulk collect into f_viewed_rec LIMIT 2000;
forall i in 1..f_viewed_rec.count
insert into jwoodman.jw_job_history_112300
values f_viewed_rec(i);
--commit; [Can I put this 'commit' here? - Jenny]
EXIT when f_viewed%NOTFOUND;
END LOOP;
commit;
Thanks,
- Jennymc**** wrote:
Bulk collect normally used with large data sets. If you have less dataset such as 1000-2000 records then you canot get such a performance improvent using bulk collect.(Please see oracle documents for this)
When you update records Oracle acquire exclusive lock for that. So if you use commit inside the loop then it will process number of records defined by limit parameter at ones and then commit those changes.
That will release all locks acquired by Oracle and also teh memory used to keep those uncommited transactions.
If you use commit outside the loop,
Just assume that you insert 100,000 records, all those records will store in oracle memory and it will affect all other users performance as well.
Further more if you update 100,000 records then it will hold exclusive lock for all 100,000 records addtion to the usage of the oracle memory.
I am using this for telco application which we process over 30 million complex records (one row has 234 columns).
When we work with large data sets we do not depends with the oracle basic rollback function. because when you keep records without commit itb uses oracle memory and badly slowdown all other processes.Hi mc****,
What a load of dangerous and inaccurate rubbish to be telling a new Oracle developer. Commit processing should be driven by the logical unit of a transaction. This should hold true whether that transaction involves a few rows or millions. If, and only if, the transaction is so large that it affects the size constraints of the database resources, in particular, rollback or redo space, then you can consider breaking that transaction up to smaller transactions.
Why is frequent committing undesirable I hear you ask?
First of all it is hugely wasteful of rollback or redo space. This is because while the database is capable of locking at a row level, redo is written at a block level, which means that if you update, delete or insert a million rows and commit after each individual statement, then that is a million blocks that need to go into redo. As many of these rows will be in the same block, if you instead do these as one transaction, then the same block in redo can be transacted upon, making the operation more efficient. True, locks will be held for longer, but if this is new data being done in batches then users will rarely be inconvenienced. If locking is a problem then I would suggest that you should be looking at how you are doing your processing.
Secondly, committing brings into play one of the major serialization points in the database, log sync. When a transaction is committed, the log buffer needs to be written to disc. This occurs serially for multiple commits. Each commit has to wait until the commit before has completed. This becomes even more of a bottleneck if you are using Data Guard in SYNC mode, as the commit cycle does not complete until the remote log is notified as written.
This then brings us two rules of thumb that will always lead a developer in the right direction.
1. Commit as infrequently as possible, usually at the logical unit of a transaction
2. When building transactions, first of all seek to do it using straight SQL (CTAS, insert select, update where etc). If this can't be easily achieved, then use PL/SQL bulk operations.
Regards
Andre -
JSP--where to put my client keystore?
I have my webservice working. I also have my java client working. Now i'm trying
to create a web client using JSP to access the web service. This will need the
message-based security. The java client works fine because I can specify the directory
of the keystore. But I don't know where to put the keystore in my JSP client.
Anybody has some suggestions? BTW i'm using tomcat 4.1.
many thanks.Hi,
Here's a pointer to the doc on how to setup a keystore using WLS 8.1
http://e-docs.bea.com/wls/docs81/webserv/security.html
For Tomcat, I don't know...
Bruce
BTW, you might take a quick look at this, it may be of some value.
http://dev2dev.bea.com/resourcelibrary/whitepapers/whitepaper_tomcat_migration.jsp
Yan wrote:
>
I have my webservice working. I also have my java client working. Now i'm trying
to create a web client using JSP to access the web service. This will need the
message-based security. The java client works fine because I can specify the directory
of the keystore. But I don't know where to put the keystore in my JSP client.
Anybody has some suggestions? BTW i'm using tomcat 4.1.
many thanks. -
10g UIX Where to put ResourceBundle?
I'm looking at putting all my Strings in a ResourceBundle for my UIX pages. I've read the documentation for Internationalization, but I think the piece that I'm missing is where to put the properties file. Say I've got a file called 'strings.properties', and my provider looks like this:
<provider>
<data name="bundle" >
<bundle class="strings.properties" />
</data>
</provider>Then where in the JDev project do I need to have the file in order for it to get deployed properly and found by the UIX framework at runtime?
Also, just to be sure I'm not going crazy, I know that the documentation and even the bundle tag say to specify a Class, and I just noticed that the ResourceBundle javadoc also says that the 'baseName' parameter to the static 'getBundle' method should be a 'fully qualified class name', but I've always just given it a filename of a properties file before. So I'm assuming that the 'class' parameter to the bundle tag can be a properties filename -- is this correct?Whoops! Of course, the argument to the bundle class attribute should just be 'strings'.
After some experimentation, I discovered that if I put the properties file at the root of the 'src' directory in my JDev project, then it gets transferred to the 'classes' output directory when I compile. This works for running my project in the Embedded OC4J. I haven't tried deploying it to any other app server yet. Is this the right place? -
JUnit, where to put my unit test
Hi all,
I have a question regarding unit test.
I am working on a project which has multiple packages. I need to unit test every package using JUnit. One question I have is where to put my unit test. The options are:
1. Write unit test as a separate package. This makes the code clear but only the public functions get tested or I have to make all functions public.
2. Write unit test in the same package of the code to be tested. This makes writing test easier but putting test and code together makes the structure dirty.
Please let me know your opinion and tell me how do you normally do this?
Many thanks,
Regards,
KevinIt sounds like you're probably a beginner, so this might be overkill, but here goes anyway: You might want to investigate Maven, which defines a standard directory structure that includes a test tree separate from the production tree, but yet still in the same overall folder. The beauty of this design is that you can keep both production & test code together in source control, IDE projects, etc. but they don't interfere with each other.
Even if you don't use Maven now, you might want to consider using their standard directory structure, as it is has stood the test of time, & would facilitate using Maven if you ever decide to in the future. -
SInce i installed Lion, my desktop icons are lining up like regimented Windows icons!
how do i get them to stay where i put them, like they used to do?
thanks!
ellenIn that case, there may be a problem with your Finder preferences or window settings.
Try removing these files, then restarting:
~/Library/Preferences/com.apple.finder.plist
~/Desktop/.DS_Store
Let me know if you're not sure how to do that. -
Where to put files in using runtime.exec(run.exe)?
I try to use the following program in EJB to call my EXE program in the J2EE server:
runtime.exec("c:\\j2ee\\public\\exe\\run.exe temp.txt");
In the execution of mill_turn.exe, it will open several files for read and write.
So where to put the file temp.txt and other files the run.exe need to read?
Looks like the J2EE server can not find them?
Thanks!I got it in Java SE1.4.
File dir=new File("c:\\j2ee\\public_html\\Mill_turn\\exe\\");
Process proc = rt.exec(cmd,null,dir);Use above codes, I really got the right output from my external program for the first time. But , after that, the output keeps same when I change the filename in the following code:
cmd="c:\\..\\run.exe temp.prt"
to
cmd="c:\\..\\run.exe Abc1.prt" , which must have different output.
The codes for calling external program are implemented in the SessionBean of J2EE. -
How do I get Firefox to ask me where to put a file I wish to download
When I download a file, Firefox puts it somewhere. I want to be able to tell it where to put that file each and every time.
Options > General - Downloads = '''Always ask me where to save files'''
Maybe you are looking for
-
I seem to be having trouble sending a PDF edited document as an email attachment?
IT seems to send but then never arrives. Im using trial version of Adobe Acrobat Pro XI.
-
Need to start process without SAP_BPM_SuperAdmin
We would like to give a class of users the ability to launch BPM processes without giving them SAP_BPM_SuperAdmin. The problem with doing that, is that they could access NWA and change the process repository, if they found there way there. Is there a
-
CRM Pricing procedure for warranties
Hello Experts CRM 5.0 In CRM 5.0, I am evaluating implementing service plus sales orders with warranties covering some of the service items. Currently we have pricing procedure created in ECC and replicated into CRM. If I want CRM to determine warran
-
I am new to Motion- I replaced video is a motion template and the video renders out blurry, on screen and on my tv monitor -please help.
-
Regarding mass upload of contents in KM using WEBDAV
hi all, plz do help me out with mass upload of contents in KM using WEBDAV . its urgent