Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Help system on Live-CDROMs
Help system on Live-CDROMs [message #290239] Mon, 22 August 2005 06:50 Go to next message
Eclipse UserFriend
Originally posted by: eclipse.vnws.com

Hi there,

I make 2 live-CDROMs of docs using help system. Each can auto-run by a
batch file like this:
---------------------------
@echo off
set PATH=%PATH%;.\jre\bin
set CLASSPATH=.\jre\lib
md c:\temp
attrib +h c:\temp

start jre\bin\javaw -classpath
..\plugins\org.eclipse.help.base_3.0.1\helpbase.jar
org.eclipse.help.standalone.Help -command shutdown

start jre\bin\javaw -classpath
..\plugins\org.eclipse.help.base_3.0.1\helpbase.jar
org.eclipse.help.standalone.Help -command displayHelp -data c:\temp
---------------------------

When I insert the first CDROM and run it. The help system displays well,
but then I reject it and insert the second, the help system displays the
contents of the first, not of the second.

I think the command:
---------------------------
start jre\bin\javaw -classpath
..\plugins\org.eclipse.help.base_3.0.1\helpbase.jar
org.eclipse.help.standalone.Help -command shutdown
---------------------------
to shutdown the previous Help system (on the first CDROM) does not
work. I run it manualy many times but the javaw.exe process still remain
in the Windows Task Manager.

Google the Internet, I found an utility to kill running process at
http://www.beyondlogic.org/solutions/processutil/processutil .htm. Using
this freeware, I modify the batch file:
---------------------------
@echo off
set PATH=%PATH%;.\jre\bin
set CLASSPATH=.\jre\lib
md c:\temp
attrib +h c:\temp

process -k eclipse.exe
process -k javaw.exe

start jre\bin\javaw -classpath
..\plugins\org.eclipse.help.base_3.0.1\helpbase.jar
org.eclipse.help.standalone.Help -command shutdown

start jre\bin\javaw -classpath
..\plugins\org.eclipse.help.base_3.0.1\helpbase.jar
org.eclipse.help.standalone.Help -command displayHelp -data c:\temp
---------------------------

Of cource this method works for the two CDROMs. But I think this is a
bad way. All eclipse and java processes are killed :)

Is there another way to shutdown the current running help system
completely without killing eclipse and java processes ? I means when I
insert the second CDROM, the batch file on it will shutdown completely
the help system of the first CDROM which currently running without
making any chance to other Java processes.

Thank you, and sorry for my English !
Tan Nhu
Re: Help system on Live-CDROMs [message #290246 is a reply to message #290239] Mon, 22 August 2005 12:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

There's information on the help system in the Eclipse help docs:

http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse. platform.doc.isv/reference/misc/help_standalone.html

In particular:

"The org.eclipse.help.standalone.Help class has a main method that you can use to launch stand-alone help from a command line. The command line arguments syntax is:

-command start | shutdown | (displayHelp [href]) [-eclipsehome eclipseInstallPath] [-data instanceArea] [-host helpServerHost] [-port helpServerPort] [-dir rtl] [platform options] [-vmargs JavaVMarguments]"

To shut it down therefore you would need:

java -classpath ...\eclipse\plugins\org.eclipse.help.base_3.1.0.jar org.eclipse.help.standalone.Help -command shutdown

By the way, creating a directory called 'temp' and then hiding it is an extremely bad thing for a CD-Rom script to do. I've got a 'temp' directory already that I use for temporary things, and if it suddenly disappeared after running your script (the attrib +h makes it hidden, for those that don't know) then I would be seriously frustrated with your demo.

It would be much better to use the system-defined temporary area, which (from Java) you can get from System.getProperties("java.io.tmpdir"). Furthermore that's portable across operating systems, whereas I'm expecting you've got a hard-coded reference to "C:\Temp" somewhere in your plugin hierarchy ...
Re: Help system on Live-CDROMs [message #290336 is a reply to message #290246] Wed, 24 August 2005 06:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.vnws.com

Alex, in my case, I got problem when I insert the second CDROM, the bat
ch command to shutdown help system which run by the first CDROM does not
effect.

I mean the batch script on the second CDROM will remove completely all
processes run by the first CDROM. And then, run its processes to display
its contents.

This command:
java -classpath ...\eclipse\plugins\org.eclipse.help.base_3.0.1.jar
org.eclipse.help.standalone.Help -command shutdown

does not make the help system shutdown.

Regards,
Tan Nhu

Alex Blewitt wrote:
> There's information on the help system in the Eclipse help docs:
>
> http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse. platform.doc.isv/reference/misc/help_standalone.html
>
> In particular:
>
> "The org.eclipse.help.standalone.Help class has a main method that you can use to launch stand-alone help from a command line. The command line arguments syntax is:
>
> -command start | shutdown | (displayHelp [href]) [-eclipsehome eclipseInstallPath] [-data instanceArea] [-host helpServerHost] [-port helpServerPort] [-dir rtl] [platform options] [-vmargs JavaVMarguments]"
>
> To shut it down therefore you would need:
>
> java -classpath ...\eclipse\plugins\org.eclipse.help.base_3.1.0.jar org.eclipse.help.standalone.Help -command shutdown
>
> By the way, creating a directory called 'temp' and then hiding it is an extremely bad thing for a CD-Rom script to do. I've got a 'temp' directory already that I use for temporary things, and if it suddenly disappeared after running your script (the attrib +h makes it hidden, for those that don't know) then I would be seriously frustrated with your demo.
>
> It would be much better to use the system-defined temporary area, which (from Java) you can get from System.getProperties("java.io.tmpdir"). Furthermore that's portable across operating systems, whereas I'm expecting you've got a hard-coded reference to "C:\Temp" somewhere in your plugin hierarchy ...
Re: Help system on Live-CDROMs [message #290343 is a reply to message #290336] Wed, 24 August 2005 11:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

> Alex, in my case, I got problem when I insert the
> second CDROM, the bat
> ch command to shutdown help system which run by the
> first CDROM does not
> effect.

Sorry, my misunderstanding.

If you're doing:

o Insert CD 1
o Run help system
o Remove CD 1
o Insert CD 2
o Attempt to stop help system

then the problem might be more to do with Windows than Eclipse. The help system might have 'frozen' since all its code has suddenly disappeared underneath its feet, and not be able to shutdown (for example, not being able to load the necessary shutdown classes).

Can you try copying the batch files to a local hard drive, then start and stop the help system? If that works fine, then I'd look to the fact the CD is being ejected prior to the help system shutting down as being the cause of the problem.

If that doesn't work, and the help system really isn't shutting down locally either, let me know what system/specs you are on and I'll try to reproduce it here.
Re: Help system on Live-CDROMs [message #290530 is a reply to message #290336] Fri, 26 August 2005 06:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.vnws.com

Alex,

I try to run it locally from hard disk. And get stuck again.

Let me show you what I did:

1. Copy an Eclipse instance from C:\eclipse to C:\Live-CD\CD1
2. Copy CD1's help plugins to C:\Live-CD\CD1\plugins
3. Make a runcd.bat in C:\Live-CD\CD1 with:
---------------------------
@echo off
set PATH=%PATH%;.\jre\bin
set CLASSPATH=.\jre\lib
md c:\temp
attrib +h c:\temp

start jre\bin\javaw -classpath
...\plugins\org.eclipse.help.base_3.0.1\helpbase.jar
org.eclipse.help.standalone.Help -command shutdown

start jre\bin\javaw -classpath
...\plugins\org.eclipse.help.base_3.0.1\helpbase.jar
org.eclipse.help.standalone.Help -command displayHelp -data c:\temp
---------------------------
4. Copy an Eclipse instance from C:\eclipse to C:\Live-CD\CD2
5. Copy CD2's help plugins to C:\Live-CD\CD2\plugins
6. Make a runcd.bat in C:\Live-CD\CD2, the same content with runcd.bat
in C:\Live-CD\CD1

7. Run runcd.bat in C:\Live-CD\CD1
8. Run runcd.bat in C:\Live-CD\CD2

Check results:
- Step #7: the help system displays contents of CD1: OK
- Step #8: instead of displaying contents of CD2, the help system
displays contents of CD1.

Base system:
- IBM NetVista w 2.4Hz CPU, 512M of RAM
- Windows XP SP2
- JDK 1.5
- Eclipse 3.0.1 (I have my language package on this version)

That's all I did

Regards,
Tan Nhu
Re: Help system on Live-CDROMs [message #290768 is a reply to message #290530] Wed, 31 August 2005 16:42 Go to previous message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

I'm not sure why you're using the 'start' on the front. That will run it in the background, and as a result, will be attempting to start and stop it at the same time.

Get rid of the 'start', and put 'pause' in the script between the stop and start methods. Then verify that the eclipse help has really been shut down before you unpause (by pressing a key) and then starting up again.

It looks like the 'start' could be the source of the problems; but if the Eclipse shuts down OK and then restarts, but still shows the old information, then it could be a caching issue instead.

Can you give that a try and verify that the help system is shutting down successfully before it is being restarted?

By the way, you need to get rid of the 'attrib +h' from your script.
Previous Topic:using eclipse on a MAC
Next Topic:Conditional conext menu in fragment plugin
Goto Forum:
  


Current Time: Sat Apr 27 05:01:43 GMT 2024

Powered by FUDForum. Page generated in 0.03345 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top