How to throw a program with two threads?
Hello to everybody!
I'm using jdk 1.1.8 and I need to throw a program, and while this is running., i would show an image,
I have tried with 2 threads, but the image only is shown when the program is thrown, but not while,
Thanks in advance,
Silvia
Have you done something like:
a) create a Window with your Panel and image on it, display the Window
b) fork off a thread that launches your app
c) when the thread is finished launching the app, kill the splash window
Window splash= new YourSplashWindow(...);
splash.show(); // display your splash screen
YourLauncherRunnable launch = new YourLauncherRunnable(splash);
new Thread(launch).start(); // start a new thread to launch your app
// loop until the launcher thread tells the window to die
while(!splash.shouldStop())
Thread.sleep(100);
// kill the window
splash.dispose();
class YourSplashWindow extends Window
public boolean shouldStop() {return Stop;}
boolean Stop = false;
public YourSplashWindow()
// set up the window here...
setBounds(...); // sets pos and size
public void killWindow()
Stop = true;
class YourLauncherRunnable implements Runnable
YourSplashWindow Win = null;
public YourLauncherRunnable(YourSplashWindow w)
Win = w;
public void run()
// do your launching here....
// done launching the program, kill the splash window
Win.killWindow();
}
Similar Messages
-
Submit a program with two variants
Hi all,
There is one program which needs to run everyday with two different variants
( For this i need to have two jobs ).
Now, i need to write a new program which submits the above program with two variants. How do i do it?
Thanks
Abhijith HYou don't need two jobs, you can have 1 job with two steps, each step would call the progam with the different variant.
If you want to write a program which submits the program twice with two different variants, you can use the SUBMIT statement. Here VARIANT1 is the name of a variant.
SUBMIT ZREPORT01
USING SELECTION-SET 'VARIANT1'
AND RETURN.
Regards,
Rich Heilman -
How to open labview program with Quit Labview function inside?
Hi Any idea how to open labview program with Quit Labview function inside?
I forgot to add and set the condition of the type for this program.
If the program is an application, it would close straight away.
If it is still labview work, it will go straight to editing program without closing.
So I need to recover, open it and make some changes.
Clement
Solved!
Go to Solution.Put the VI in a project and open it from there, then it shouldn't autorun. You can use App.kind property of application to decide whether to close or not.
/Y
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV -
How do you close programs with new iOS7? Old way doesn't seem to work!
How do you close programs with new iOS7? Old way doesn't seem to work!
After double tap home button, swipe up on the app card that appears above the icon.
-
How can i build table with two user name columne ?
How can I build view with two columns for user name ( one create and the other
Can change also )
And to display full name ( the user name is the key but not display ) ?Hi,
Creating View
From initial screen of data dictionary(T.Code: SE11), enter the name of object i.e. view.
Select view radio button and click on the push button.
Dialog box is displayed for types of views.
Select the view type.
On the next screen, you have to pass following parameters.
Short text
In the table box you need to enter the table names, which are to be related.
In join table box you need to join the two tables.
Click on the TABFIELD. System displays the dialog box for all the table fields and user can select the fields from this screen. These fields are displayed in the view fields box.
Save and Activate: When the view is activated, view is automatically created in the underlying database system. As long as the table exists in the database, the view also exists (Unless you delete it).
Regards,
Bhaskar -
IPhone Developer Program with two brand
Hi
i need to subscribe to iPhone Developer Program with two different company but with only one Apple id for example:
[email protected] is a developer that works and publich application for company A and company B.
Is it possible to buy with the same Apple id two enrollment?
thanks in advance.Yes. Your Apple ID can be linked to more than one iPhone Developer account. If it is, then the website will prompt you to choose which one you want to sign in to when you enter your Apple ID and password.
-
How to manage one library with two accounts
how to manage one library with two accounts
you can only be logged into one account at a time on the iTunes store. However, you can authorize your computer for both accounts, making your computer work with both. In the menu bar just click [Store > Authorize Computer]
-
How to compare the programs in two different systems
Hi,
I have two systems say A & B and i have the program say 'Z_TESTPROG'.
How to compare the program in two different systems.
Regards,
VenkatHi,
Check the version in Utilities -> version -> version management in both servers is one option.
Another one is using SE39 transaction.
Regards
Manasa -
How do you disable "Run with Multiple Threads" in a standalone EXE
I have a program written in Labview 6.1. After moving to a different hardware platform, my program has started crashing at the same point every time it is run. I eventually found out that the cause of the crash is the fact that the new hardware has a dual core processor. I confirmed this by disabling "Run with multiple threads" and now the program works fine. What I need to know now is how to disable the same setting in a built EXE file, since as far as I know the "Run with multple threads" setting only affects execution in the Labview Dev environment.
Thanks for any help,
DaveGreg McKaskle once posted that using a non-reentrant (VI is NOT re-entrant) wrapper VI to make the calls to the dll will prevent simultaneous execution of the dll.
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction -
How to connect one database in two threads?
Dear All,
If anyone can tell me how to connect one database concurrently?
I tried the following idea:
1.create a Hashtable to keep database objects(those databases have been opened)
2.Before openning(connecting) a database:first step is to check the hashtable.
If the the database object is in the hashtable, this object will be returned.
If the datatbase object is not in the hastable, open the database and store this opened database object into the hashtable.
I failed the test of this implementation. My test is:Create two threads (extend java Thread class).In each of these two threads, try to open the same database.Just like the following:
MyThread thread1 = new MyThread();
MyThread thread2 = new MyThread();
thread1.start();
thread2.start();
I guessed the database object in the hashtable would be returned in the second thread.Unfortunatly, I only got an exception which meant the database couldn't be opened twice.It looks like the second thread happened before the opened database object stored into the hashtable.
I cannot figure out if my design is wrong or my test application is wrong.
I really appriatiate your attentions!!!
Luum not sure i follow exactly but in your code add the word synchronise to it and this means only 1 tread can access it at any 1 time.
So your could have a class which is a singleton so it only opens the dbase once and then all other access share your connection.
so
public class foo{
foo INSTANCE = new foo();
private foo(){} //private constructor
then all your methods use foo's internal dbase connection. Am i making sense -
HT202213 how to sync an ipad with two libraries
How do I share my itunes library between 2 devices? Dragging the music over to the device isn't doing the trick...
Not quite sure this is what you are after, if not you'll need to explain further.
Sync iPod/iPad/iPhone with two computers
Although it isn't possible to sync an Apple device with two different libraries it is possible to sync with the same logical library from multiple computers. Each library has an internal ID and when iTunes connects to your iPod/iPad/iPhone it compares the local ID with the one the device normally syncs with. If they are the same you can go ahead and sync...
I have my library cloned to a small 1Tb USB drive which I can take between home & work. At either location I use SyncToy 2.1 to update the local copy with the external drive. Mac users should be able to find similar tools. I can open either of the local libraries or the one on the external drive and update the media content of my iPhone. The slight exception is Photos which normally connects to a specific folder on a specific machine, although that can easily be remapped to the current library if you create a "Photos" folder inside the iTunes Media folder so that syncing the iTunes folders keeps this up to date as well. I periodically sweep my library for new files & orphans with iTunes Folder Watch just in case I make changes at one location but then overwrite the library with a newer copy from the other. Again Mac users should be able to find similar tools.
As long as your media is organised within an iTunes Music or Tunes Media folder, in turn held inside the main iTunes folder that has your library files (whether or not you let iTunes keep the media folder organised) each library can access items at the same relative path from the library folder so the library can be at different drives/paths on different machines. This solution ensures I always have adequate backups of my library and I can update my devices whenever I can connect to the same build of iTunes.
When working with an iPhone earlier builds of iTunes would remove any file not physically present in the local library, even if there was an entry for it, making manual management practically redundant on the iPhone. This behaviour has been changed but it will still only permit manual management with a library that has the correct internal ID. If you don't want to sync your library between machines on a regular basis just copy the iTunes Library.itl file from the current "home" machine to any other you want to use, then clean out the library entires and import the local content you have on that box.
tt2 -
How can i control graph with two inputs?
Hi,
i would like to ask you about the graph with two inputs
Normally, if i just give one input, they generate the graph with this input(y) vs time(x).
But now i would like to get the graph with my two inputs in x axis and y axis .
i want to control both of two axis. How could i do for it ?
i attached the file that i try to use "Build XY graph" to control both x and y axis with random number .
It can run but i don't know how come the graph show nothing. .
Actually , it have to show something like wavefrom continuously. am i right?
Could you tell me a way to solve it ?
>>>
what i want to get is ..
in Graph,
for x axis , ditance (always increases)
for y axis , vibration (vary)
>>>
Thank you so much for your time . I am looking forward your kindly reply.
With Respect,
Su
Attachments:
using Build XY graph.vi 59 KBHi NI9233,
Mind me to interrupt, I am just helping Mike to explain what he meant to you, refer to the graph:
Picture 1:
Double click on Build XY Graph, uncheck the clear data on each call
Picture 2 and 3:
Change your formula node into +1 Basic Function in Functions Pallette.
Hope that helps!
PS: I am sorry for the size of the image, seems I made a mistakes when I saved the picture.
Sincerely,
Krisna Wisnu
Message Edited by Krisna Wisnu on 11-19-2008 08:19 PM
Sincerely,
Krisna Wisnu
Attachments:
Clear Graph on Each Call.PNG 46 KB
+1.PNG 30 KB
+1_2.PNG 21 KB -
How to call a procedure with two arguments
Hi,
I have a procedure with two arguments, ie. myprocedure(p1 in number,p2 in number) to display a blob image.
how can I call out this blob image in url.
I tried http://127.0.0.1:7777/pls/apex/SCHEMA.myprocedure?p1=1&p2=2 , but it don't work..
Thanks
vincentVincent,
As long as you have been granted the ability to execute the procedure and there are no spaces in the url and you have not misspelled the parameter names then this looks right.
Here is a link to a procedure to download a file which takes two parameters.
http://mywebsite.com/pls/htmldev/schema.package.function.download_file?p_session_id=1221970786026206&p_seq_id=724
Cheers,
Tyson Jouglet -
How to replace one char with two chars in email address policy?
I very much like to replace the 'ß' char in the surname with 'sz'. However, applying filter '%rßsz%[email protected]' on 'Preußig' leaves me with '[email protected]'.
So, how do I replace one char with two chars in email address policy?As far as I know, your only solution is to manually create such addresses instead of using e-mail address policy.
Ed Crowley MVP "There are seldom good technological solutions to behavioral problems." -
How to Run std program with a specific variant for specific user?
Hi guys
We have a std program which will be run by different users in the company. Now the requirement is to make sure that each user runs the report with a specific varaint. Can we control this if yes how?
one options we thought about was to create a transaction in SE93 and define the program to run with a predefined varaint and assign the new custom tcode to the user profile. But we have many different users and we will end up with creating many transactions which we would like to avoid. Is there any other option to control the std program such that each user can run the program only with a pre-defined varaint and the one which only the user is suppoed to run. thanks in advance.We have a std program which will be run by different users in the company. Now the requirement is to make sure that each user runs the report with a specific varaint. Can we control this if yes how
you can do this..
You can create a Custom table
userid keyfield
program keyfield
variant keyfield
programdesc
Make the table Maintaintable(usnig table maintenance )
Now create another Program
It takes input of the Program name( using selection screen)
LOGIC
in side that place a logic ,
Based on the user name and program name Get the variant name from above table
Now Submit the program with the variant you have selected above.
Use Variant Addition when you use SUBMIT
So now program executed based on user variant.
Now you create a Transaction for this program.
When use Runs the Transaction , user needs to input the Program name which he wants to execute.
and Output will be shown based on the variants
Regards
Vijay Babu Dudla
Maybe you are looking for
-
Help with Dreamweaver CS5 spry menus. Submenus are not showing.
Hello. I am working on a new website, and added 2 vertical spry menus to the page (left hand side under SEARCH). All of my submenus were working properly except for the fact that I couldn't see the entire list once it dropped down past the container
-
3rd gen ATV, music on a Seagate GoFlexHome drive. How can I get music to play thru ATV
Would rather not also add all the music to itunes on my MacBook Air. The ATV easily recognized the photos stored on the GoFlexHome and those are already coming up on the ATV - no place to add the directory for the goflex folder since the ATV also do
-
How to view history status of a Network activity of a WBS element
Hi, Which transaction can I use to view history of a Network Activity on a WBS element? I want to know when were changes made on an activity, e.g. when it was REL or TECO etc, and by whom. Thanks. PS_PS01
-
Database Problems on RH6.2/Oracle 8.1.5
I've created a database, but get the following error when trying to connect with sqlplus: ERROR: ORA-00600: internal error code, arguments: [12803], [], [], [], [], [], [], [] Any ideas?
-
Hi friends Can any one tell me the usefullness and functionalities of a company and company code. Regards Balu