Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Writing compiler output to a file?  (Read 996 times)
0 Members and 1 Guest are viewing this topic.
Offline nickdotjava

Junior Member




I have fallen to the dark side.  I'm using DX9


« Posted 2004-07-19 01:33:09 »

Is there a way to write compiler output to a file?

Thanks.

-Nick

-Nick

"Oh ya, that's trivial.  I should have it done in an hour."
Offline crystalsquid

Junior Member




... Boing ...


« Reply #1 - Posted 2004-07-19 08:26:02 »

Not sure what you mean - normal compilation (javac) writes to a file - the output class file! Cheesy

If you want to see the bytecode generated for a class, use 'javap'. Simply go to the directory with the '.class' files in and type (for DOS):

1  
javap -c myClass >bob.txt


This will create a file 'bob.txt' with the bytecode for the class.

If you want to see what is being used by the VM when running (the results of the JIT compiler) then the only way I know of is use a 'proper' C/C++ debugger (like Visual Studio) and use it to pause the app thats running to get at the assembly instructions. No debug info though Sad

- Dom
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #2 - Posted 2004-07-19 08:42:53 »

...or do you mean "store the text that javac outputs to screen to a file"? In that case, you need to divert stdout and/or stderr (depending on what info you want to save).

...or are you calling javac from within a java program and attempting to capture stdout + stderr?

malloc will be first against the wall when the revolution comes...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline nickdotjava

Junior Member




I have fallen to the dark side.  I'm using DX9


« Reply #3 - Posted 2004-07-19 22:41:57 »

Whenever you compile something, you get some sort of output, whether it is errors, or successful compilation.  I want to somehow capture that.

-Nick

-Nick

"Oh ya, that's trivial.  I should have it done in an hour."
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #4 - Posted 2004-07-19 22:47:50 »

Quote
Whenever you compile something, you get some sort of output, whether it is errors, or successful compilation.  I want to somehow capture that.

-Nick


Well that's the first thing I said.

Depends on your OS, but do a google for "redirecting stdout". Usual syntax is approximately equal to:

javac [blah blah blah] > filename.txt


malloc will be first against the wall when the revolution comes...
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (12 views)
2014-04-15 18:08:23

BurntPizza (10 views)
2014-04-15 03:46:01

UprightPath (24 views)
2014-04-14 17:39:50

UprightPath (10 views)
2014-04-14 17:35:47

Porlus (27 views)
2014-04-14 15:48:38

tom_mai78101 (49 views)
2014-04-10 04:04:31

BurntPizza (107 views)
2014-04-08 23:06:04

tom_mai78101 (207 views)
2014-04-05 13:34:39

trollwarrior1 (176 views)
2014-04-04 12:06:45

CJLetsGame (182 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!