Autostart java application at system start / logon

Hello
I wonder if there is a class dealing with autostart of programs?
My problem:
I'd like to have my application started when the user logs on the computer. The user shall be able to choose if he wants this (register autostart) or not (remove autostart) from within the java application.
Further, the solution should work on Windows as well as on KDE, Gnome, ...
(On windows a key in HKCU/Software/Microsoft/Windows/CurrentVersion/Run would have to be created, KDE needs a file in ~/.kde/Autostart)
Is there such a class or approach; or am I on my own?
Thanks!
Christian Weiske

no there can be no way to come up with a
multiplatform solution, that's a platform-specific
problemI thought if things like Preferences (files on *nix, registry on Windows) are available, a solution for autostart could be there :/                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Start Java application at system start up linux/unix

    Hi,
    I am working on a application, which needs to run as a background process in linux/unix without the intervention of the user.
    Please give me the details procedure how to make it as background process.
    thanks

    you can make any process a background process by adding an amperstand
    for example:
    java -cp $MyClassPath myAppClass &
    If you want to run it automatically at startup
    you'll have to write a little script which is executed at startup
    and contains a line as above.
    The scripts exectuted at startup are usually located at
    /etc/init.d
    You can use one of those scripts as starting point for your own script.

  • Sun Java Application Server 9 Start Up Woes

    Hi,
    I was asked to install the netbeans 5.5 IDE (which comes with Java Application Server 9 bundled with it) and basically learn how to develop using JMS. After installing everything and following the JavaEE tutorial, I began to set everything up. I get hung during the Sun Java Application Server 9 start up.
    It attempts to bind to my host name. After a week of research as to the cause, i discovered that the problem is that the server gets my host name from DNS and uses that as its bind location. The software running at my place of business prevents me from making connections such as these with anything but localhost connections.
    I descovered this when I read on here from another topic that i should try and start the server after disabling my network card. This method works in that the server starts up, no longer using my host name as the host but rather using localhost. Now this in no way fixes my problem.
    I was wondering if there were any workarounds that would force the application server or netbeans or whatever to use localhost isntead of doing a host name lookup?
    The error I got was a NoRouteToHostException, and when I disabled my network card that error went away, the error changed to UnknownHostException, but the server started up and I was then able to go to the admin page and deploy applications (but not run)
    P.S. I was going to post the output of the server start ups, but the size is crazy long, if you have a way for me to remove the stack trace I would be glad to give it a try.
    -SonOfThor
    Message was edited by:
    SonOfThor
    Linux Fedora Core, by the way.

    I switched to ActiveMQ and it works perfectly.
    The issue had to do with Netbeans, no matter how many config files i changed, always used my computername.host.com:8686 instead of localhost:8686.
    ActiveMQ starts and runs beautifully because it binds to localhost:8686.
    I dont know what the problem was, Ive read lots of solutions saying its firewall or a firewall like process. I'm running bare bones Linux Fedora Core with no extra programs. I insured my firewall was turned off before even posting this. I spoke with my IT guys and they said that the firewall thats set up here at work does not block port binds.
    My conclusion: IDEs are more of a pain then they want you to believe, im going back to terminal commands.

  • NW04S Java  application remians in "starting apps" phase.

    Dear all,
    I installed a java Application server voor a NWDI instance. However after stopping and starting the instance after what appeared to be a hung server. I am no longer able to logon via de Visual Administrator.The logon process runs to 99% then stalls.
    When I restart the Java application server both the SDM and the Dispatcher are started correctly. However the Server remains in the status Starting apps for hours.
    The following entry appears about every 10-15 minutes In the dev_server0 log: [Unloading class sun.reflect.GeneratedConstructorAccessor57]
    In the DefaultTrace.0.trc I get the follwoing entry:
    #1.5 #000BCD52CAAB000000000016000019800004387AB09D685F#1187999507111#System.err##System.err#######Thread[Thread-1,5,main]##0#0#Error##Plain###com.sap.engine.frame.core.configuration.ConfigurationLockedException: Cannot lock Configuration; it is already locked.
         at com.sap.engine.core.configuration.impl.ServerEnvironment.addLock(ServerEnvironment.java:316)
         at com.sap.engine.core.configuration.impl.ServerEnvironment.addLock(ServerEnvironment.java:340)
         at com.sap.engine.core.configuration.impl.cache.ConfigurationCache.openConfiguration(ConfigurationCache.java:756)
         at com.sap.engine.core.configuration.impl.ConfigurationHandlerImpl.openConfiguration(ConfigurationHandlerImpl.java:734)
         at com.sap.engine.core.configuration.impl.ConfigurationHandlerImpl.openConfiguration(ConfigurationHandlerImpl.java:693)
         at com.sap.engine.core.cache.impl.spi.storage.DBStorage.<init>(DBStorage.java:64)
         at com.sap.engine.core.cache.impl.CacheManagerImpl.init(CacheManagerImpl.java:223)
         at com.sap.engine.core.Framework.loadSingleManager(Framework.java:577)
         at com.sap.engine.core.Framework.loadManagers(Framework.java:255)
         at com.sap.engine.core.Framework.start(Framework.java:189)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.boot.FrameThread.run(FrameThread.java:61)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: com.sap.engine.frame.core.locking.LockException: Cannot lock [2007082501514709500000NLCC12045....................7395550, ! , 94d735ee/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@, X]; it is in use by another owner. The lock collision occurred with user <internal>.
         at com.sap.engine.core.locking.impl3.LockingManagerImpl.lockInternal(LockingManagerImpl.java:257)
         at com.sap.engine.core.locking.AbstractLockingManagerImpl.lock(AbstractLockingManagerImpl.java:421)
         at com.sap.engine.core.locking.AbstractLockingManagerImpl.lock(AbstractLockingManagerImpl.java:441)
         at com.sap.engine.core.locking.ServerInternalLockingImpl.lock(ServerInternalLockingImpl.java:42)
         at com.sap.engine.core.configuration.impl.ServerEnvironment.addLock(ServerEnvironment.java:312)
         ... 15 more
    It looks as if the system is still holding a lock from a previous session, but I don't know how to release this.
    Can anyone me to resolve this issue.
    Many thanks,
    Owen.

    rkandy  
    If you had noticed correctly this question was posted and answered by me.
    The answer I posted here has also been confirmed by SAP.
    I posted the answer to help others who might face similar issues. There is therefore no need to add other solutions which may confuse other administrators who may have a real professional need to resolve similar problems.
    Furthermore I do not think that a SAP Technical Consultant would wait 4 hours before concluding that there might me something wrong with a Java installation which seem to hang the phase "starting apps".
    I am not asking for any points I just hope my answer will help others with similar problems.
    If anyone has been able to resolve similar issues on the basis of the solution provided here, then please update this message accordingly. Otherwise open an OSS message.
    Regards,
    Owen.

  • How can i run java application at system startup just liks as services

    How we can run java application at the time of system
    starts up just like as services.

    Hi,
    At first you have to create an exe of the class file.
    for that go to the site www.duckware.com/java2exe.html
    Click on the j2exe23c.exe(75k) download it and install in ur system. convert the class file to windows exe.
    The put the exe in the startup folder in windows.
    If ur not able to find that folder search for it and put that exe in that folder.

  • Java application won't start anymore

    Hi,
    I am using a Java Application (Protege) that was running just fine last week but today it just won’t start!
    When click-on it jumps about 3 time in the dock and stop. I was able to run the connected .jar file but most of the features are not available this way.
    I have not done anything special since last week beside Safari update (1.3.2.).
    Any help is greatly appreciated.
    Regards,
    Adrien
    iBook G4 (1Ghz)   Mac OS X (10.3.9)  

    Did you update Quicktime to 7.0.4? See if the following discussion seems relevant. There's a solution in the fourth message (reverting to Quicktime 7.0.1).
    http://discussions.apple.com/thread.jspa?messageID=1500443
    If that's the fix, the problem may be due to Protege using an outdated JavaApplicationLauncher. See
    http://www.opensubscriber.com/message/[email protected]/3072264.html
    --Davipo
    iMac G5   Mac OS X (10.3.9)  

  • How to make Java Application a System Service.!

    Hi,
    I am developing an application in Java, which I wolud like to run as a System service in Windows or as a Background process in Unix/Linux.
    I am using JDK 1.3.1.
    Can anybody help me with this?
    Thank you,
    Manish.

    Thank you Timo.
    BTW Do you know how do I do it for Unix/Linux platform?
    Regards,
    Manish.

  • The Sun Java Application Server 8.1 could not start anymore

    Very incredible I was working fine from may days with Stydio Creator 2
    but yesterday I run the project and it does not work anymore, please can you suggest something:
    The Sun Java Application Server 8.1 could not start.
    from the Output console:
    C:\Sun\Creator2\SunAppServer8\bin\asadmin.bat start-domain --domaindir C:\Sun\Creator2\SunAppServer8\domains\ creator
    Failed to start server localhost:4848
    Deployment error: Failed to start server localhost:4848. See the server log file for details.
    Exception=Deployment error: Failed to start server localhost:4848. See the server log file for details.
    Deployment error: Failed to start server localhost:4848. See the server log file for details.
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:198)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:75)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:234)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:242)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:125)
    Caused by: Failed to start server localhost:4848
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:152)
    ... 10 more
    and in the log file:
    [#|2006-02-24T11:49:51.296+0100|WARNING|sun-appserver-pe8.1_02|
    javax.enterprise.system.core|_ThreadID=25;|CORE5061: Exception :
    com.sun.appserv.server.ServerLifecycleException: [C4073]: A JMS destination limit was reached.
    Too many Subscribers/Receivers for Queue :
    temporary_destination://queue/192.168.0.159/3376/2 user=admin, broker=127.0.0.1:27676(2403)
         at com.sun.enterprise.jms.JmsProviderLifecycle.onTermination(JmsProviderLifecycle.java:476)
         at com.sun.enterprise.server.ApplicationServer.onTermination(ApplicationServer.java:454)
         at com.sun.enterprise.server.Shutdown.startShutdown(Shutdown.java:42)
         at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeShutdownEventListener(AdminEventMulticaster.java:1445)
         at com.sun.enterprise.admin.event.AdminEventMulticaster.handleShutdownEvent(AdminEventMulticaster.java:1434)
         at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:443)
         at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:139)
         at com.sun.enterprise.admin.server.core.channel.AdminChannelServer.sendNotification(AdminChannelServer.java:90)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
         at sun.rmi.transport.Transport$1.run(Transport.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:595)
    thanks

    I just had the same problem this morning. I believe the app server starts and if you browser directly to your app you'd get it, but the connection between the appserver and the IDE is somehow lost. An easier solution than completely reinstalling for me was to delete the .Creator folder in my home directory (C;|Documents and Setting\<username>\.Creator) and restart Creator

  • Java Apps don't start automaticaly after system restart

    Hi,
    Since a few days ago when restarting Java application servers of SAP
    Portal, the applications deployed don't start for itselfs.
    When starting the instance, the memory stops to increase at 500mb. The
    only way to start the applications is by the manual way in:
    Server -> Services -> Deploy -> Runtime -> Application -> Start
    Application.
    After starting the applications manually the instance starts fine.
    I already increased some values in global configuration:
    From:
    InitialThreadCount = 40
    MaxThreadCount = 150
    MinThreadCount = 40
    To:
    InitialThreadCount = 80
    MaxThreadCount = 200
    MinThreadCount = 80
    After the restart the applications are not starting automaticaly yet.
    I have 4 instances. The first two instances are starting fine, but the problem is happening with the other 2 instances.
    Is there any reason for this type of behavior?
    Thanks for the help
    Pedro Nunes

    Hello Vyara,
    thanks for your reply.
    This kind of problem happens since 3 weeks ago and the stack of this system (SP09) remain unchangeble since 07.04.2008.
    The strange behavior is that the Server 1 and 2 are starting all the apps fine, but this problem is only happens in server 3 and 4.
    Can you help please?
    Thanks

  • SMC 4: Java Application Classes on Solaris 10 system

    Dear all,
    after installing SMC 4.0 without any errors I try to start the Console on the
    Solaris 10 platform by running "es-start -c &".
    After put in the Login Information SMC shows this message:
    An error occurred loading Java application classes.
    Verify installation of the Server components.
    Any idea what's wrong here?
    THX, Rainer

    @bobby
    =======
    1. Could not start the Web interface: Connection was refused when attempting to contact hostname:8080
    2. The /var/opt/SUNWsymon/install/setup_hostname.. file says:
    Could not start Java server
    Could not start Grouping service
    3. I used then "es-stop -A followed by "es-start -A" and checked via "svcs -a" the services:
    online 16:01:33 svc:/system/webconsole:console
    online 16:16:32 svc:/application/management/sunmcwebserver:default
    online 16:16:43 svc:/application/management/sunmcdatabase:default
    online 16:16:59 svc:/application/management/sunmctrap:default
    online 16:17:01 svc:/application/management/sunmccfgserver:default
    online 16:17:03 svc:/application/management/sunmcevent:default
    online 16:17:09 svc:/application/management/sunmcagent:default
    online 16:17:13 svc:/application/management/sunmctopology:default
    online 16:17:52 svc:/application/management/sunmcmetadata:default
    online* 16:18:15 svc:/application/management/sunmcjavaserver:default
    Nevertheless no chance to login.
    Rainer

  • Starting and stopping applications via a Java-application on Windows/Unix

    Hello,
    I want to start java and other applications via a java application.
    This java application should start several different applications on windows and
    on unix systems and take care of their current state (e.g. running/not running).
    For all applications to be started there are .sh-scripts for unix and .bat-scripts
    for windows. In the scripts there could be a java call, e.g. "java someApplication",
    or some executables could be called. These scripts set the applications' environment etc.
    and start the application finally.
    My java application calls these scripts via the ProcessBuilder API, which is working fine.
    But there is the following problem: on windows, when executing a script that starts
    some other application, the ProcessBuilder gives me process-handle to the started
    process. If calling destroy() on this handle, only the cmd.exe gets killed which
    started the application. The application itself is running on. This is undesired behaviour
    since I want to be able to control the started applications, at least start and stop it which
    is impossible that way.
    On unix, it is working when using
    "exec java someApplication"
    instead of just
    "java someApplication"
    in the .sh-scripts. The exec command substitutes the shell process with the underlying
    process started in the script, so everything is working as expected on unix.
    But how could I get this working on windows systems? Is there any equivalent to the exec
    command on unix? Any suggestions appreciated.
    If something's unclear in my description, please let me know.

    Yes - after looking at this option - I think that's the direction I am going to go. It probably makes sense to give my JMS topics and my BPEL server their own OC4J instances anyway - for a number of reasons.
    Lon

  • Prevent start of java application

    Hello,
    We have stumbled into the following unfortunate situation:
    Developement deployed a custombuild java application into the JAVA Webas.
    After that the system will no longer start.
    The developer then deleted the application jar files from the OS, causing the following error when we restart the Webas:
    com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (503) Service Unavailable. The requested URL was:"http://TIL-HOSAP-62:50000/UMEGroupsWS/Config1?
    Re- / undeploying the application failed.
    Starting the Webas now hangs in the "starting applications" phase with the mentioned error message.
    The application is no longer listed in Visual admin --> services\deploy\applications
    Can we make a setting somewhere preventing the application from getting started so that we can at least start the Webas?
    Or does anyone perhaps know of a manual undeployment method?
    Regards,
    Sander

    Hi Nitin,
    Unfortunately your response did not help me forward. I did find a deploy service parameter that supposedly allows you to prevent apps from starting:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/0e/fb29feebc73248a3d097a229a5d548/frameset.htm
    However I have tried three different ways of specifying the application name without succes.
    Sander

  • How to start a java application as windows 2000 service?

    Hi all,
    I'm trying to start / stop a java application as a windows 2000 service. But nothing appens (I can see the screen that rapidly display the java help prompt and then disappear)
    I've a working directory i.e C:\MyDir and it contains instsrv.exe, srvany.exe and my application jar MyApp.jar
    I'm using instsrv.exe to register a java application as a service ( C:\MyDir\instsrv MyApp C:\MyDir\srvany.exe )
    I've added a key in registry by running regedit
    The key is under the tree HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyApp
    the key value is Parameters
    in the key I've added a string value "Application" with the value "C:\j2sdk1.4.2_01\bin\java.exe"
    and a string value "AppParameters" with the value "-classpath C:\MyDir\MyApp.jar main" where main is the name of the main class application.
    This seems to run correctly with Windows NT 4.0
    But doesn't work with Windows 2000.
    Can anyone help me?? pls.
    Thanks.
    Max

    I'm replying to myself .... ;-) ahah
    All we need for this purpose is JavaService, at link
    http://www.alexandriasc.com/software/JavaService/index.html

  • Start or stop the multiple java application from Netweaver Administrator

    Hi All,
    In NWA->Operations Management->Systems->Start & Stop... the procedure for how to start and stop the Java Applications is well explained on the following link:
    http://help.sap.com/saphelp_nwpi711/helpdata/en/45/1e7eb303577524e10000000a114a6b/content.htm
    The problem is that I want to Start or stop the multiple java application on all instances simultaneously with the application state not persisted. But I am not getting the way to select more than 1 rows in the table so that these applications can be started in a single click. Is there any way out or any alternative?
    Each time the CE 7.1EHP1 server is restarted there are around 800 applications that are shown as stopped. I have to start each manually one by one which is an hectic task. Please help.
    Thanks.
    Rajat

    FYI ***
    The fix was in there were several ora init parms that were set incorrectly:
    aq_tm_processes value is 0 Should be >= 1
    job_queue_processes value is 0 Should be >= 10
    enqueue_resources value is 2392 Should be = 3000
    java_pool_size          value should be >= 20MB

  • Start java application from java program

    My problem is the following:
    I start a java application A that allows you to select a couple of .java files.
    After having choosen them, the application adds some additional information to these .java files (that means some more lines of code � we call it �infecting� the java files).
    After the files have been infected, I want to start the application B implemented by these choosen and infected .java-files (without a new start of the Java Virtual Machine)
    For doing so, we use the following method whichs works quite fine:
    public static void ExecuteWithInvoke(String path, String classname)
         try
              new URLClassLoader(new URL[] {new File(path).toURL()})
                   .loadClass(classname).getMethod("main",
                   new Class[] { String[].class }).invoke(null,
                   new Object[] { new String[] {} });
         catch (Exception e)
         {e.printStackTrace();}
    The only problem that occurs:
    When the application B is launched, the �old� version of the choosen .java files is used and not the current, already infected version of these files. (I guess because the �old� .class files are used.)
    I solved this problem by finishing the program A after the infecting and restart my application B manually. In this case the infected .java files are used (I guess the new Start of the Java Virtual Machine solves my problem by reloading the �new� .class files)
    How can I reach to start my application with the mentioned method but with the infected .java files and without having a new start of the JVM ??
    Can anybody help me?
    Thanks in advance
    Sorry for my English, it�s a long time since I quit school

    Hello,
    my problem of reloading classes is still unsolved although you tried to help me!
    Therefore I posted a little program to illustrate our difficulty.
    It would be nice if somebody could have a look at this program.
    We have a file Testdatei.java whose only method is the main method.
    I get the class object of this file and with the help of Reflection the declared methods.
    Evereything works fine so far.
    Then I change the content of this file by adding an additional method a() (see change() for this).
    Now I delete the old class file and I compile Testdatei.java again (see compileJava()) and once more I get the class object for this changed file. Afterwards I get the declared methods for this class via reflection.
    But instead of showing now the methods main() and a() Reflection still only shows the method main().
    I guess the changed class has not been reloaded!!
    package testpackage;
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.lang.reflect.Method;
    import java.net.URL;
    import java.net.URLClassLoader;
    import com.sun.tools.javac.Main;
    public class LoadClass
         private File f;
         private Class c = null;
         private Object o;
         public LoadClass()
              f = new File("C:/AAJ/src/testpackage/Testdatei.java");
              try
                   o = neuesExemplar(f.getPath(), "testpackage.Testdatei");
                   c = o.getClass();
                   System.out.println("Class " + c.getName() + " found.");
              catch (Exception e)
              {e.printStackTrace();}
              Method [] method = c.getDeclaredMethods();
              for (int i=0; i<method.length; i++)
                   System.out.println(method.getName());
              change();          
              compileJava(f.getPath());
              File fileToDelete = new File("bin/testpackage/Testdatei.class");
              System.out.println(fileToDelete.delete());
              Class cla = null;
              try
                   Object o = neuesExemplar(f.getPath(), "testpackage.Testdatei");
                   cla = o.getClass();
                   System.out.println("Class " + cla.getName() + " found.");
              catch (Exception e)
              {e.printStackTrace();}
              Method [] methods = cla.getDeclaredMethods();
              for (int i=0; i<methods.length; i++)
                   System.out.println(methods[i].getName());
         private int compileJava(String javaFile)
         String[] args = {"-d", "C:/AAJ/bin/", "-classpath", System.getProperty("java.class.path"), javaFile};
         return Main.compile(args);
         public static void main(String[] args)
              new LoadClass();
         private Object neuesExemplar(String pfad, String klassename) throws Exception
         URL url = new File(pfad).toURL();
         URLClassLoader cl = new URLClassLoader( new URL[]{ url });
         Class c = cl.loadClass(klassename);
         return c.newInstance();
         private void change()
              FileWriter fw;
              BufferedWriter bw;
              try
                   fw = new FileWriter(f);
                   bw = new BufferedWriter(fw);               
                   bw.write("package testpackage;");
                   bw.newLine();
                   bw.newLine();
                   bw.write("public class Testdatei");
                   bw.newLine();
                   bw.write("{");
                   bw.newLine();
                   bw.write("public static void main (String [] args)");
                   bw.newLine();
                   bw.write("{");
                   bw.write("System.out.println(4);");
                   bw.newLine();
                   bw.write("}");
                   bw.newLine();
                   bw.newLine();
                   bw.write("private void a ()");
                   bw.newLine();
                   bw.write("{");
                   bw.newLine();
                   bw.write("System.out.println(55);");
                   bw.newLine();
                   bw.write("}");
                   bw.newLine();
                   bw.write("}");
                   bw.close();
                   fw.close();               
              catch (IOException e)
              {e.printStackTrace();}                                             
    I�m using eclipse 3.1.0. Is it possible that it�s a bug in eclipse that eclipse holds the old class file in memory from the beginning and always refers to this one and not to the new compiled one?
    Thanks a lot
    Simon

Maybe you are looking for