Java Ways to Compile & Run Java files.
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Java Ways to Compile & Run Java files.
Hello,
My question is what are the different ways to compile & run .java files using textpad.
Normally I go to cmd and type in javac *file name* to compile etc.. But Are there any other ways to do this? Like on elcipse all you do is click compile & run. Does textpad have this features?
My question is what are the different ways to compile & run .java files using textpad.
Normally I go to cmd and type in javac *file name* to compile etc.. But Are there any other ways to do this? Like on elcipse all you do is click compile & run. Does textpad have this features?
- talleyrand
- Posts: 624
- Joined: Mon Jul 21, 2003 6:56 pm
- Location: Kansas City, MO, USA
- Contact:
There are Tools available from within TextPad that hook applications that exist on your computer.
Depending on the order of operations, java installed before TextPad, the tools for java may already be set up.
To verify, look under the Tools menu. If you do not see Java, javac, etc listed, you will need to add them.
Adding tools is available via Configure, Preferences, Tools. For Java, there is a special options "Java SDK Commands." Click that and the magic takes place.
Let us know if this doesn't clear up your issue.
Depending on the order of operations, java installed before TextPad, the tools for java may already be set up.
To verify, look under the Tools menu. If you do not see Java, javac, etc listed, you will need to add them.
Adding tools is available via Configure, Preferences, Tools. For Java, there is a special options "Java SDK Commands." Click that and the magic takes place.
Let us know if this doesn't clear up your issue.
I choose to fight with a sack of angry cats.
- Nicholas Jordan
- Posts: 124
- Joined: Mon Dec 20, 2004 12:33 am
- Location: Central Texas ISO Latin-1
- Contact:
What I do, when I am in the command line mindset is just go to tools/run and give the full path to javac, or whatever tool you wish to use.
The next line has a label "Paramaters" ,... you just put the entire rest of the command-line there .... be though it may that the window is small compared to a command line like:
which may well be more suited to a file rather than done from within the run command within textpad .... many compilers will have options for stuff like this being specified on the command line tool ~ for Java, I often use a command line option that allows one to specifiy a file in which one lists all the file one wishes built are listed,... one per line.
That file on my current Java project looks like:
Which I guess would fit on the command line,... but it just gets a little cramped for my split a second into five parts coding style.
Others may vary in their use of the cmd window.
//eof
The next line has a label "Paramaters" ,... you just put the entire rest of the command-line there .... be though it may that the window is small compared to a command line like:
Code: Select all
sc sample.cpp -mn -C -WA -S -3 -a8 -c -gf -D_CONSOLE=1 -osample.obj
link /CO /NOI /DE /NOPACKF /XN /NT /ENTRY:mainCRTStartup /BAS:4194304 /A:512 @sample.LNK
ren .\$SCW$.EXE sample.EXE
.\sample.EXE built
Lines Processed: 341 Errors: 0 Warnings: 0
Successful build
That file on my current Java project looks like:
Code: Select all
Alice.java
WordCount.java
Backpropagation.java
BufferedTextInputStream.java
Clarice.java
Day.java
Format.java
geneticAlgorithms.java
Grace.java
harvest.java
hiddenMarkovModels.java
intelligentAgents.java
internationalHarvester.java
learningClassifierSystems.java
MatchesLooking.java
particleSwarmOptimization.java
RandomIntGenerator.java
reinforcementLearning.java
silverFish.java
simulatedAnnealing.java
teaParty.java
TextIO.java
TextReader.java
UserException.java
Others may vary in their use of the cmd window.
//eof
Last edited by Nicholas Jordan on Sat Jun 09, 2007 1:16 am, edited 1 time in total.
- Nicholas Jordan
- Posts: 124
- Joined: Mon Dec 20, 2004 12:33 am
- Location: Central Texas ISO Latin-1
- Contact:
This is the way to do it, Mr. Feng, as your question is originally worded. My advice is to let the special options - Java SDK Commands be the way you try to achieve, as this is the Like on elcipse all you do is click compile way of doing it from within Textpad.talleyrand wrote:....Depending on the order of operations, java installed before TextPad, the tools for java may already be set up.
To verify, look under the Tools menu. If you do not see Java, javac, etc listed, you will need to add them.
Adding tools is available via Configure, Preferences, Tools. For Java, there is a special options "Java SDK Commands." Click that and the magic takes place.
set up SDK command in Textpad
I have textpad version 4. I'm trying to configure to be able to compile JAVA program I have but I can't open the "Tools" when I click on the "+" under preferences. I installed JAVA SDK before I install Textpad. Anything wrong? I'm using company's network.
Also I have problem at home when I try to compile JAVA program using Textpad' compile and it always said - Can't find System files (I don't have exaclty the same words since I am not even can't get Textpad to work like I have at home. Any suggesting for this?
Also I have problem at home when I try to compile JAVA program using Textpad' compile and it always said - Can't find System files (I don't have exaclty the same words since I am not even can't get Textpad to work like I have at home. Any suggesting for this?
- Nicholas Jordan
- Posts: 124
- Joined: Mon Dec 20, 2004 12:33 am
- Location: Central Texas ISO Latin-1
- Contact:
Re: set up SDK command in Textpad
Something is wrong there, and I cannot be of any assistance - except to ask if by using company's network you mean to say that the Textpad installation is on another computer and you are running textpad over the network. If so, there are likely issues there.huanalee wrote:I have textpad version 4. I'm trying to configure to be able to compile JAVA program I have but I can't open the "Tools" when I click on the "+" under preferences. I installed JAVA SDK before I install Textpad. Anything wrong? I'm using company's network.
There are so many overrides and overlays that have been implemented in the new operating systems that I really wish for a reversion to 4.7.2 and Win9X - at least the thing ran. Additionally, if it is a company machine owned by the company ~ there are likely shell hooks to prevent problems from occuring and this is typical of cannot find system files error messages.huanalee wrote:Also I have problem at home when I try to compile JAVA program using Textpad' compile and it always said - Can't find System files (I don't have exaclty the same words since I am not even can't get Textpad to work like I have at home. Any suggesting for this?
I will have to defer to textpad's help, but is there anything else you can tell me about the failure ?
-
- Posts: 2
- Joined: Mon Sep 10, 2007 4:57 pm
Trouble with Java and TextPad
Right now I have TextPad 5.0 and for Java I have J2SE Runtime Environment 5.0 Update 11, Java(TM) 6 Update 2, and jre-1_5_0_12-windows-i586. With all of these things that I have my TextPad won't allow me to compile and run any Java Program. I am in a class right now where we have to write, compile, and run Java Programs so I really need to get this to work. On other computers i know you go to Tools, External Tools, and then a drop down menu appears that says either "Compile Java" or "Run Java Application" but neither of these choices are available to me. Please help! Thank you so much!
p.s. I also tried doing that Configure, Tools, but there wasn't any special options for Java SDK or anything. Do I have the correct Java program installed? Any assistance would be appreciated.
p.s. I also tried doing that Configure, Tools, but there wasn't any special options for Java SDK or anything. Do I have the correct Java program installed? Any assistance would be appreciated.
Last edited by leitnerca04 on Tue Sep 11, 2007 3:49 pm, edited 1 time in total.
-
- Posts: 2
- Joined: Mon Sep 10, 2007 4:57 pm
Do you know where I can go to download a JDK? My professor said I needed that as well, but I must have downloaded the wrong thing. Can you tell me exactly what and where I can find this? Thanks
p.s. I downloaded jdk-6u2-windows-i586-p, which i thought was a JDK version of Java, but nothing is working still. I have tried to restart my computer and nothing is listed in TextPad under Tools, External Tools still. I need to be able to compile and run a java application. Help
p.s. I downloaded jdk-6u2-windows-i586-p, which i thought was a JDK version of Java, but nothing is working still. I have tried to restart my computer and nothing is listed in TextPad under Tools, External Tools still. I need to be able to compile and run a java application. Help
- Nicholas Jordan
- Posts: 124
- Joined: Mon Dec 20, 2004 12:33 am
- Location: Central Texas ISO Latin-1
- Contact:
You did not really download the wrong thing. It takes awhile to get things sorted out and when I downloaded the JDK, it installed the runtime also.leitnerca04 wrote:Do you know where I can go to download a JDK? My professor said I needed that as well, but I must have downloaded the wrong thing. Can you tell me exactly what and where I can find this?
The runtiime is called a Java Virtual Machine, and makes the translation between java compiled code and the machine the code is running on.
I looked at JavaWorld, it appears that jdk-6u2-windows-i586-p is the Java Development Kit, version 6.0 or so which is the current "latest software"p.s. I downloaded jdk-6u2-windows-i586-p, which i thought was a JDK version of Java, but nothing is working still. I have tried to restart my computer and nothing is listed in TextPad under Tools, External Tools still. I need to be able to compile and run a java application.
You have to have some kind of editor: What editor did your prof specifiy ?
I just made a hardlink in my build directory to the javac (java compiler) but expect slow going while you get it going.
You will hear a lot about environment variables and so on, but I just use Textpad .... it seems to understand that stuff much better than posters.