want to start a java programwithout using dos

Acer / ASPIRE
March 24, 2011 at 04:34:09
Specs: Windows 7, 2.1/4gb
hi

I can't run bat files (dos commands) on my machine due to a network restriction. I need to start this particular program another way. is there any other way to start this java program without using dos?

code:

@echo off
@start bin\javaw -classpath lib\classes.zip;-Dsun.java2d.noddraw=true -jar at3.jar


kind regards
Chaft



See More: want to start a java programwithout using dos

Report •

#1
March 24, 2011 at 04:36:38
Talk to the person who set the network restriction. If you try to do things that are forbidden by company policy you may find yourself looking for another job.

Report •

#2
March 24, 2011 at 05:02:34
I am the IT admin, however the restriction is there for a reason. I don't want students to have access to dos, but I can't seem to make an exception that works so would rather not load the java program via dos.

Report •

#3
March 24, 2011 at 05:49:00
As an IT admin I'm sure that you realize that there is no such thing as DOS on a Windows machine. That aside, you don't say how you want the program to run. Is it to be run manually by the user, automatically at start up, or scheduled?

What's wrong with just creating a shortcut with the appropriate java command line as its target? Perhaps I misunderstand your requirements.


Report •

Related Solutions

#4
March 24, 2011 at 06:38:41
To clarify I don't allow dos commands to be run by students, which is the issue.
the bat file i have runs the following code:

@echo off
@start bin\javaw -classpath lib\classes.zip;-Dsun.java2d.noddraw=true -jar at3.jar

which when ran tries to open the command prompt, but as I've disabled access to the command prompt they get a message informing that the command prompt is disabled.

I've tried to converting the bat file to an executable file but it still tries to open the comand prompt. With the software (maths program) there isn't a file that loads up the program that doesn't use the command prompt to load the program.

I want users to manually click on the program shortcut to load it. But as there is only a bat file it won't work. I don't know how to make the java program load without using dos, does java have a way of loading it's files without resorting to using dos to make it work?

I don't know much about java programs but I assumed it wouldn't necessarily need a bat file to make it work .


Report •

#5
March 24, 2011 at 08:39:53
Just create a shortcut with

bin\javaw -classpath lib\classes.zip;-Dsun.java2d.noddraw=true -jar at3.jar

as the target. As long as the Java program doesn't try to write to, or read from, the console it shouldn't open a command prompt. You'll need to use the full pathname to the javaw executable instead of "bin\javaw".

Once again - Windows does not have DOS; it does have a command prompt.


Report •

#6
March 24, 2011 at 08:52:51
Windows does not have DOS; it does have a command prompt.

I think ijack you are flogging a dead horse there. Someone once tried to tell me that the command prompt in Linux was DOS. A complete and total misconception of what DOS actually is.

Stuart


Report •

Ask Question