Running a Java application on the background
How can I run an applet on the background ? (UNIX and Windows)
Thanks!!
Running "in the background" is not really relvent on Windows as CMD[1] does not have this functionallty (that I know of) and you normally execute appliucations in the GUI, unless you are talking about making it a service, running when the user logs off (nohup in UNIX, Windows Services in windows), if thats what you are after, NT JAVA +Service in google.
[1] If you use a diffrent shell, such as Cygwin you can get this functionallity under Windows.
Similar Messages
-
Running a Java app in the background on Windows
I have a Java application that runs constantly on a users computer. (Checking for files to download from a server) I want to have this application run in the background instead of putting a short cut on the Windows task bar. Can anyone direct me to a code sample, tutorial or even just let me know if this is even possible using Java.
Thanks in advance for your help,
Jeff Morgan
http://www.drugtalk.orgIf you create a console app and place it in a executable jar file, the program will run invisably, even if you have println statements. This is cos the jar file does not launch a console window, so no output will be displayed.
Hope that is what you wanted -
Running a java program in the background
I'm designing a network remote control system in java.
I was wondering does anyone know if it is possible to run an application at the log in screen in windows 2000. There is no GUI and no command prompt.
paddyIf you mean can you run it as a windows 2000 service so the user doesn't see it yes you can.
I recommend the following Java Service wrapper program:
http://www.eworksmart.com/JNT/
It's quite simple to set up and will start when the user logs in (so long as the service is set to start automatically).
Hope that helps,
Seigers. -
Think it would be very convenient if we could run the Spotify application in the background. I remember it used to be an option under "Edit>Preferences..." before a certain update removed it... O.o
Updated: 2015-06-21Hello!
With "running in the background" do you mean minimize to system tray?
If so, version 1.0.7 added that option again.
Please check under Menu => Edit => Preferences => Startup and Window Behaviour => Close button should...
Or did you mean something else? -
How do i run a java application in jdk1.3
im trying to run a java application in jdk 1.3. I created it in jbuilder and i was trying to use the applet viewer.
http://java.sun.com/j2se/1.3/docs/tooldocs/win32/appletviewer.html
Jesper -
How can I run a java-application on starting of Windows 2000
How can I run a java-application without any user on starting of Windows 2000?
For example, if the computer is restarted and nobody enter into it yet, my java-application should run anyway.
How can I do that?Hi, you have to put it in a Windows service.
To do this you have a program, Srvany.exe that allow to insert a .exe or .bat program in a Windows service.
For example, i develop a program, TomcatGuardian and i put it in a service because i need to run it in a server without Administrator logged in.
Regards,
Ivan. -
Help required - running a Java program from the command line
Hi,
I have a small non-graphical Java application, packaged into a Jar file. My program relies on classes in another (external) Jar file.
When I run the application from the IDE, everything works fine. However, when I try to run the application from the command line, I keep getting a NoClassDefFoundError for classes in the external jar.
Both the application jar file and the external jar file are in my root directory (C:\).
My command line call is as follows:
java -cp c:MyExternalLib.jar -jar MyApp.jar
Any help greatly appreciated.
Thanks,
Walterhi,
set classpath=%classpath%;c:\myjar.jar;
here i have specified myjar.jar file as an example u give ur location.after setting the classpath run ur java application.
java mypgm
this will solve ur problem
regards,
Ganesh -
Running a Java program without the JRE...
Hi there,
I was wondering whether it is possible to run my java applications on a system that does not have the JRE installed?
Is there a way to compile the java bytecode into an executable - let's say for windows.
Thank youSee:
http://www.bearcave.com/software/java/comp_java.html
Yair. -
Running a java application from a java application
hello ,
please who knows how i can run a java application 'B' from inside another java application 'A' and get the error messages (if any) from the application 'B'how are you executing application B from application A? Please explain the java code you are using?
-
Running a Java application from a Swing GUI
Hi,
I was wondering if there is a simple way to run a Java application from a GUI built with Swing. I would presume there would be, because the Swing GUI is a Java application itself, technically.
So, I want a user to click a button on my GUI, and then have another Java application, which is in the same package with the same classpaths and stuff, run.
Is there a simple way to do this? Do any tutorials exist on this? If someone could give me any advice, or even a simple "yes this is possible, and it is simple" or "this is possible, but difficult" or "no this is not possible" answer, I would appreciate it. If anyone needs more information, I'll be happy to provide it.
Thanks,
DanI don't know if it is possible to run the main method from another Java app by simply calling it...
But you could just copy and paste the stuff from your main method into a new static method called something like runDBQuery and have all the execution run from there.
How does that sound? Is it possible?
What I'm suggeting is:
Original
public class DBQuery{
public static void methodA(){
public static void doQuery(){
methodA();
public static void main(String[] args){
// Your method calls
//Your initializing
doQuery();
}Revised:
public class DBQuery{
public static void methodA(){
public static void doQuery(){
methodA();
public static void doMyQuery(){
// Your method calls
//Your initializing
doQuery();
// No main needed!!
//public static void main(String[] args){
// Your method calls
//doQuery();
//} -
Running a java application in command prompt
hi, I'm new to this forum.
I would like to know what exactly needs to be specified to run a java application in a normal DOS command prompt.
I know it is something like:
javaw -classpath .\class GUI.applicationGUI
where applicationGUI is the main class, right? What else do I need to do, since I have some other non-GUI classes that I need, inside the class folder ?
Thanks for your time.You need to import those classes. And you need to make packages.
In classes 1, 2 and 3 put:
package class;
In class 4 put;
package class.GUI;
Then you need to make the connection:
In classes 1,2 and 3 put:
import class.GUI.*;
In class 4 put:
import class.*;
Compile each directory separately while in the respective directory. javac *.java
Then go back to the directory above the directory "class" and run
java class/GUI/name_of_file_containing_main_method -
Patching/updating Java Applications in the WebLogic environment.
Hi All,
I'd like to get some feedback on our process and hear if there is some better/different
ideas out there on how to handle patching/upgrading java applications in the WebLogic
environment.
Here is our process:
1) We build using ANT our Enterprise application.
2) We deploy our application using InstallAnywhere to drop the structure into
an environment.
If a patch or update is needed, we again build the Patch/Update using ANT, generating
checksums for each file in every ear/war/jar file as well as any supporting files
(.xml, .properties, .sh, etc.) used in the production structure. We then compare
checksums against what is in production and come up with PATCH_(ear/war/jar) files
with only the changed classes and duplicate production structure with the changed
supporting files.
Using ANT scripts and InstallAnywhere, we backup the files to be replaced in production,
overwrite supporting files, extract packages (ear/war/jar), overwrite classes
with new ones, re-package the ear/war/jar files into production environment and
restart the server.
We patch at a class level due to the configuration settings internal to the package
files (ear/war/jar) that we don't want the customer to have to re-configure everytime
we do a partial release.
Right now, the whole process is automated except the creation of the Patch ANT
script that extracts, overwrites updated classes, updates manifests, then re-packages.
Any ideas on improvements or complete re-engineering of our process to help so
we can get closer to 100% automation?
Thanks,
JohnThe chances of two applications running at exactly the same time are miniscule. If they each have a connection to the database, and are both trying to modify the same table, then chances are one will be slightly after the other its changes would be committed last. In the case where one might delete a row just before another tries to access that row, you're going to have some sort of problem. However, those circumstances are pretty rare, and even so, some small amount of exception handling can deal with them gracefully.
-
Is it possible to run a java application within a web browser?
Hello everyone here! I have a question about running a java application within a web browser and I would appreciate it very much if anyone here can give me some answers.
I have a standalone java application written with AWT. Basically this free application lets users to select spectral lines from a big file based on some criteria and plot those selected lines. Yes, it is a very simple application. Now I want to run this application within a web browser so that users don't need to download the application from the ftp site and thus don't need to install in their machine. Is it possible to run this application within browser? If yes, can we get the same plotting function as we run the application separately and where should I start out?
Thanks in advance!
kuilianPlease see the signed applet discussion group for details of how to avoid the applet security restrictions. You can sign the applet, or use the policy file containing {AllPermission} for testing purposes (though not suitable for widespread deployment).
Regards
Matthew -
Can we run a java application using Runtime.exec()?
Can we run a java application using Runtime.exec()?
If yes what should i use "java" or "javaw", and which way?
r.exec("java","xyz.class");The best way to run the java application would be to dynamiically load it within the same JVM. Look thru the class "ClassLoader" and the "Class", "Method" etc...clases.
The problem with exec is that it starts another JVM and moreover you dont have the interface where you can throw the Output directly.(indirectly it can be done by openong InputStreams bala blah............). I found this convenient. I am attaching part of my code for easy refernce.
HIH
ClassLoader cl = null;
Class c = null;
Class cArr[] ;
Method md = null;
Object mArr[];
cl = ClassLoader.getSystemClassLoader();
try{
c = cl.loadClass(progName.substring(0,progName.indexOf(".class")) );
} catch(ClassNotFoundException e) {
System.out.println(e);
cArr = new Class[1] ;
try{
cArr[0] = Class.forName("java.lang.Object");
} catch(ClassNotFoundException e) {
System.out.println(e);
mArr = new Object[1];
try{
md = c.getMethod("processPkt", cArr);
} catch(NoSuchMethodException e) {
System.out.println(e);
} catch(SecurityException e) {
System.out.println(e);
try {
processedPkt = md.invoke( null, mArr) ;
} catch(IllegalAccessException e) {
System.out.println(e);
} catch(IllegalArgumentException e) {
System.out.println(e);
}catch(InvocationTargetException e) {
System.out.println(e);
}catch(NullPointerException e) {
System.out.println(e);
}catch(ExceptionInInitializerError e) {
System.out.println(e);
} -
Pls Help me run bank java application
hi i am having a error running this banking application "Bank_Application_System"
the application is a banking system where customers can withdraw and deposit money and other functions. I downloaded it from [DOWNLOADED BANK JAVA APP|http://www.fullinterview.com/final-year-projects/article/bank_application_system-java-engineering-project-download-15509.html] But when i run it in netbeans it comes up with a error in the class Display2 saying there is a problem with "ResultsModel model;" saying it cannot find symbol also "import java.io.*;" says it is a unused import. Can somone help me pls
package bankapplication2;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import java.io.*;
public class Display2 extends JFrame //implements ActionListener
private JLabel jlabel1;
private JLabel jlabel2;
private JLabel jlabel3;
private JLabel jlabel4;
private JLabel jlabel5;
private JTextField NAME;
private JTextField ACC;
private JTextField DATE;
private JTextField ADD;
private JTextField AGE;
private JTextField BALANCE;
private JButton jbutton;
private JPanel jpanel1;
private JPanel jpanel2;
private JPanel jpanel3;
JLabel command=new JLabel();
JScrollPane resultsPane;
Connection connection;
Statement statement;
ResultsModel model;
// more code and methods pls see link for fullcode
void displaydeposit(String s,int i)
String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
String url = "jdbc:odbc:BankDatabase";
setBounds(100,100,480,120);
setResizable(false);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
JButton OK = new JButton("OK");
JLabel lable=new JLabel("Customer Database");
lable.setToolTipText("Customer Database");
lable.setFont(new Font("SansSerif",Font.BOLD,18));
JPanel lpanel=new JPanel();
lable.setForeground(Color.red);
lpanel.setBackground(Color.orange);
lpanel.add(lable,"Center");
lpanel.setToolTipText("Customer Database");
Container contentPane=getContentPane();
contentPane.add(lpanel,"North");
getContentPane().add(OK,BorderLayout.SOUTH);
try
Class.forName(driver);
connection=DriverManager.getConnection(url);
statement=connection.createStatement();
model=new ResultsModel();
JTable table=new JTable(model);
//table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
resultsPane=new JScrollPane(table);
getContentPane().add(resultsPane,BorderLayout.CENTER);
if(i==1)
model.setResultSet(statement.executeQuery("SELECT * from DepositInfo WHERE Account_Num = '"+s+"'"));
else if(i==2)
model.setResultSet(statement.executeQuery("SELECT * from WithdrawInfo WHERE Account_Num = '"+s+"'"));
OK.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
MainMenu mm = new MainMenu();
mm.menu();
setVisible(false);
catch(ClassNotFoundException cnf)
System.out.println(cnf);
catch(SQLException sql)
System.out.println(sql);
pack();
setVisible(true);
/*private JMenuItem makeMenuItem(String name)
JMenuItem m=new JMenuItem(name);
m.addActionListener(this);
return m;
public void actionPerformed(ActionEvent evt)
String command=evt.getActionCommand();
if(command.equals("OK"))
setVisible(false);
MainMenu mm=new MainMenu();
mm.menu();
}this is the error message when i run the application
init:
deps-clean:
Created dir: C:\Users\Documents\NetBeansProjects\BankApplication2\build
Updating property file: C:\Users\Documents\NetBeansProjects\BankApplication2\build\built-clean.properties
Deleting directory C:\Users\Documents\NetBeansProjects\BankApplication2\build
clean:
init:
deps-jar:
Created dir: C:\Users\\Documents\NetBeansProjects\BankApplication2\build
Updating property file: C:\Users\Documents\NetBeansProjects\BankApplication2\build\built-jar.properties
Created dir: C:\Users\Documents\NetBeansProjects\BankApplication2\build\classes
Created dir: C:\Users\Documents\NetBeansProjects\BankApplication2\build\empty
Compiling 8 source files to C:\Users\Documents\NetBeansProjects\BankApplication2\build\classes
C:\Users\arinze\Documents\NetBeansProjects\BankApplication2\src\bankapplication2\Display2.java:35: cannot find symbol
symbol : class ResultsModel
location: class bankapplication2.Display2
ResultsModel model;
C:\Users\arinze\Documents\NetBeansProjects\BankApplication2\src\bankapplication2\Display2.java:201: cannot find symbol
symbol : class ResultsModel
location: class bankapplication2.Display2
model=new ResultsModel();
2 errors
C:\Users\Documents\NetBeansProjects\BankApplication2\nbproject\build-impl.xml:413: The following error occurred while executing this line:
C:\Users\Documents\NetBeansProjects\BankApplication2\nbproject\build-impl.xml:199: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 2 seconds)
Maybe you are looking for
-
My ipod 4 is stuck in recovery mode after trying to update to 8.0.2
I started to download the new update this morning when it said i did not have enough memory for it, so i deleted a few things and re tried and this time it worked. However once it was done downloading it said i needed to install it, which when i pres
-
Adobe acrobat x pro cannot execute
I have purchased and installed the Adobe Creative Suite 6 Design & Web Premium 2 to 3 months ago, all the program like photoshop cs 6 can execute without problem, recently I found adobe acrobat x pro did not respond at all either I click the pdf file
-
The bottom of the computer gets very hot
I just got this macbook pro MC721ll/a. The bottom of the computer gets very hot as it is sitting on my lap. I have never had a mac before but I don't think it should be doing that. Also, I don't hear any fans running. Is this normal?
-
Cannot find the system preference icon on my Power Book G4
Cannot find the system preference icon on my Power Book G4
-
I've got WSDL file. I want to produce Java sources for that WSDL. When I try to use WebService context menu function - I've got restriction: "SAP Netweaver not Apache Axis" How can I convert WSDL to Java skeleton ??