The Artima Developer Community
Sponsored Link

Java Answers Forum
Can't make my bat file run a class

1 reply on 1 page. Most recent reply: Sep 6, 2002 5:42 AM by Charles Bell

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Leo

Posts: 6
Nickname: dev313
Registered: Aug, 2002

Can't make my bat file run a class Posted: Sep 5, 2002 6:38 PM
Reply to this message Reply
Advertisement
I am using Forte for Java 4.0 Community Edition. I have made a bat file called test.bat and placed it in the same folder as a class file named MyTest.Class. In the bat file I have:

@echo off
java MyTest
cls

This doesn't run my class. I get an error in the main method. Something about NoClassDef or something.

My MyTest class does have a main method in it. All it does is show a JOptionPane dialog.

What could be wrong??

Thanks Everyone,

Leod


Charles Bell

Posts: 519
Nickname: charles
Registered: Feb, 2002

Re: Can't make my bat file run a class Posted: Sep 6, 2002 5:42 AM
Reply to this message Reply
change it to:

@echo off
java -classpath %CLASSPATH%;. MyTest
cls

Flat View: This topic has 1 reply on 1 page
Topic: layouts.. Previous Topic   Next Topic Topic: Java C++ Socket Communication

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use