• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Run project java with javac

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'dont get to run my java project with javac ...
Someone can help me ???
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
javac compiles your java source code into bytecode. to run your program, you would then run it with the java command.

for example:

javac MyClass.java


to compile, and then

java MyClass


to run
 
Rogerio Lima
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK ... But, it's impossible, I write this code but don't run ...
What I need to do for this run ???
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by "don't run"? What -exactly- are the commands you're using for compiling and running? What happens - are there any error messages?
 
fred rosenberger
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it is not impossible. people write and run java programs every day.

Does your code compile? what is the EXACT output when you type

javac <YourClassName>.java

There are dozens of reasons why this may not work, but nobody can help you unless you tell us the problem. There may not even BE a problem here - it may be when you try an run the code. In either case, the info it prints is critical in solving the issue.

If you expect someone to help you SOLVE the problem, you have to tell us what the problem IS.
 
Rogerio Lima
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok guys ... I was whith a problem for compile my projects in java with compiler javac ... Now I resolved this problem ... I installed the JDK incorrect ... I already installed the correcty ... Thanks a lot for your help ... I sorry for I didn't exatly my problem ... Regards everybody ...
 
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic