Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converting shell script to a batch file

 
Svend Rost
Ranch Hand
Posts: 904
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I suspect, that the reason that im getting problems with a program is that
im running part of it as a shell script (in Cygwin), while the rest is run
in dos/windows, which is why I'd like to convert a shell script into a bat file.

This line of "code" get's executed as the last line in the shell script:


but it wont run when I type it in DOS.

Btw.


I need to execute the BlahBlahCompiler, which is located somewhere in
the BlahBlah.jar file located in the BLAH_HOME directory (c:\BlahBlah\),
but im not quite sure how. Im furthermore not sure if I need the -classpath
stuff, or the -Dprogram.name stuff either.

When I run:
java -Dprogram.name=BLAHPROGRAM -classpath "c:\BlahBlah" edu.cmu.cs.X.Y.Z.runtime.BlahBlahCompiler
I get an java.lang.NoClassDefFoundError and then the path that im trying to execute (c:\BlahBlah/edu/cmu/cs/X/Y/Z/runtime/BlahBlahCompiler)

Any help will be appriciated.

/Svend Rost
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The $ signs in there are Unix specific. Windows uses % signs instead.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to General Computing...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64835
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suspect, that the reason that im getting problems with a program is that im running part of it as a shell script (in Cygwin), while the rest is run in dos/windows


I do this all the time. I suspect you may be chasing a red herring.
 
Svend Rost
Ranch Hand
Posts: 904
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:


I do this all the time. I suspect you may be chasing a red herring.


Thanks for replying. Im not quite sure, I understand what you mean with
a red herring.

I found this description of a red herring:
Topic A is under discussion.
Topic B is introduced under the guise of being relevant to topic A (when topic B is actually not relevant to topic A).
Topic A is abandoned.

Are you saying, that my assumption (that it doesn't work 'cause
it's run in dos and unix) is false?

I believe it to be the cause of the problem, because the "unix things" have
to (a) compile a file of rules and then (b) start a program which monitors
the JMS for certain types of data(xml), and then emit some infomation back to
the JMS. AFAIK, it doesn't emit enough information back and I think it's
cause of the compile/run on unix.
[ July 27, 2006: Message edited by: Svend Rost ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic