Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Can I make .class files run like executable .jar files on a Windows platform?

Reply
Thread Tools

Can I make .class files run like executable .jar files on a Windows platform?

 
 
phillipedison1891@yahoo.com
Guest
Posts: n/a
 
      03-09-2005
I have a friend who likes to send his Java creations to me by e-mail in
..class form. One problem, though: When I go to the command prompt and
type in java sampleProgram.class, it gives me a "NoClassDefFoundError".
I don't want to have to recompile the source code with NetBeans. How
can I make the source code run?

 
Reply With Quote
 
 
 
 
Malte
Guest
Posts: n/a
 
      03-09-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> I have a friend who likes to send his Java creations to me by e-mail in
> .class form. One problem, though: When I go to the command prompt and
> type in java sampleProgram.class, it gives me a "NoClassDefFoundError".
> I don't want to have to recompile the source code with NetBeans. How
> can I make the source code run?
>


Try to leave out the .class part.
 
Reply With Quote
 
 
 
 
Collin VanDyck
Guest
Posts: n/a
 
      03-09-2005
You usually will type in

% java sampleProgram

If the file is called sampleProgram.class that he sent you. You should
not append .class to the end of the 'java' command.

 
Reply With Quote
 
Malte
Guest
Posts: n/a
 
      03-09-2005
(E-Mail Removed) wrote:
> I have a friend who likes to send his Java creations to me by e-mail in
> .class form. One problem, though: When I go to the command prompt and
> type in java sampleProgram.class, it gives me a "NoClassDefFoundError".
> I don't want to have to recompile the source code with NetBeans. How
> can I make the source code run?
>


Tell your friend that convention suggests that class names be written
with the first letter capitalized: SampleProgram rather than sampleProgram.

Not that it solves your problem, of course.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create executable from executable with py2exe vedrandekovic@gmail.com Python 0 03-29-2008 12:23 PM
Running an Executable Before Executable JAR Jason Cavett Java 8 05-16-2007 07:14 PM
what is fast dynamically linked executable or statically linked executable ?how to decide? pratap C Programming 20 03-07-2007 04:46 AM
How can I run a c executable in pwd ,while the executable is in some other directory vishsid3@gmail.com C Programming 15 08-21-2006 06:04 AM
Re: Can I make .class files run like executable .jar files on a Windows platform? kamal Java 0 03-10-2005 10:42 AM



Advertisments