compiling jdk1.4

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
saxenaanshul
Posts: 2
Joined: Wed Jan 21, 2004 10:54 am

compiling jdk1.4

Post by saxenaanshul »

hi plz guide me as to how u can compile jdk1.4 program codes in textpad.
i am encountering this problem becoz some of the reserved words in jdk1.4 like "assert" are not being recognized in textpad.
if this is not possible then plz guide as to what tool should be used in order to compile it
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Not sure if I understand you, but setting up the JDK is explained here:
http://textpad.com/support/faq/java.html
Also I found this using search for "assert"
http://textpad.com/forum/viewtopic.php?t=4668
but there's no feedback on it so I'm not sure about that one.
HTH
Then I open up and see
the person fumbling here is me
a different way to be
saxenaanshul
Posts: 2
Joined: Wed Jan 21, 2004 10:54 am

Post by saxenaanshul »

hi,
i know abt installing textpad for jdk.
i wanted to know whether textpad can be used to compile jdk1.4 codes which has new reserved words like "assert".if yes then how
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Via Google I found:
To enable assertions one must set source="1.4", "1.5" or later in <javac> when the source is being compiled, and that the code must contain assert statements to be tested.
and also http://leepoint.net/notes-java/20langua ... usage.html
And since this is a compiler option use

Code: Select all

javac -source 1.4 MyProg.java
So, referring to my first reply, add -source 1.4 to your parameters in Textpad.
To run your programs you must also enable it

Code: Select all

java -enableassertions MyProg
Add -enableassertions to your parameters in Textpad.
Then I open up and see
the person fumbling here is me
a different way to be
Post Reply