Finding javac Problem

  • (2 Pages)
  • +
  • 1
  • 2

16 Replies - 489 Views - Last Post: 27 December 2012 - 01:24 PM Rate Topic: -----

#1 extremeblueness  Icon User is offline

  • D.I.C Head

Reputation: 16
  • View blog
  • Posts: 186
  • Joined: 22-October 12

Finding javac Problem

Posted 27 December 2012 - 08:02 AM

Before now I've always used BlueJ to compile my programs for me. Unfortunately, my applet that I'm building got so massive as to cause five minute lag (right now its 10.15 MB in the .java version). Now I'm finished building my initial code, but can't compile it:

Posted Image

Can anyone help me?

This post has been edited by smohd: 27 December 2012 - 08:18 AM
Reason for edit:: Poll Removed

Is This A Good Question/Topic? 0
  • +

Replies To: Finding javac Problem

#2 GregBrannon  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2197
  • View blog
  • Posts: 5,224
  • Joined: 10-September 10

Re: Finding javac Problem

Posted 27 December 2012 - 08:08 AM

This should not be a poll. I've asked a mod to change it to a normal topic.

There's something wrong with a Java ap that's 10.5 Meg large and causes a 5 min lag to compile or run. Please describe what your applet is supposed to do and show some code.

You also mention a javac problem. Is the problem the size of the .java file? If other than that, please provide details.
Was This Post Helpful? 0
  • +
  • -

#3 smohd  Icon User is offline

  • Critical Section
  • member icon


Reputation: 1817
  • View blog
  • Posts: 4,625
  • Joined: 14-March 10

Re: Finding javac Problem

Posted 27 December 2012 - 08:23 AM

Yap you better describe your question more, I dont get what you are asking for....
And looking at your cmd image, you are trying to access the javac in a wrong way. The simple way is add the javac path in environment variables...Try looking at this tutorial
Was This Post Helpful? 1
  • +
  • -

#4 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7564
  • View blog
  • Posts: 12,691
  • Joined: 19-March 11

Re: Finding javac Problem

Posted 27 December 2012 - 08:24 AM

More details please! What are you trying to do, and what's going wrong?
Was This Post Helpful? 0
  • +
  • -

#5 extremeblueness  Icon User is offline

  • D.I.C Head

Reputation: 16
  • View blog
  • Posts: 186
  • Joined: 22-October 12

Re: Finding javac Problem

Posted 27 December 2012 - 09:24 AM

View PostGregBrannon, on 27 December 2012 - 03:08 PM, said:

This should not be a poll. I've asked a mod to change it to a normal topic.

There's something wrong with a Java ap that's 10.5 Meg large and causes a 5 min lag to compile or run. Please describe what your applet is supposed to do and show some code.

You also mention a javac problem. Is the problem the size of the .java file? If other than that, please provide details.


It had approximately 50,000 lines of code when it was causing lag (now it has 80,000-100,000). That's not my problem. That was me explaining why I moved out of my IDE, BlueJ. My problem is that I'm having trouble with putting the javac command in. I will edit this post after I read the tutorial that smohd posted.


By the way, I need so many lines of code because it has 2401 JPanels (its an RPG with a 7x7 grid, each square having 49 JPanels. I'm extremely new to Swing, so I don't know how to do graphics very well). Also, it has 1280 Strings controlling location and special items.

Edit: I have two problems: One, I'm not sure where I installed JDK. Two, one of the folders in the path I think I need to take has a space in it.

This post has been edited by extremeblueness: 27 December 2012 - 09:30 AM

Was This Post Helpful? 0
  • +
  • -

#6 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7564
  • View blog
  • Posts: 12,691
  • Joined: 19-March 11

Re: Finding javac Problem

Posted 27 December 2012 - 09:28 AM

View Postextremeblueness, on 27 December 2012 - 11:24 AM, said:

It had approximately 50,000 lines of code when it was causing lag (now it has 80,000-100,000). That's not my problem. That was me explaining why I moved out of my IDE, BlueJ. My problem is that I'm having trouble with putting the javac command in. I will edit this post after I read the tutorial that smohd posted.


Good gravy. Yes, that will cause trouble for a simple little IDE like BlueJ.

Sounds to me like you need to troubleshoot the configuration of your JRE.
That tutorial that smohd posted is a good start. Let us know how it goes.
Was This Post Helpful? 0
  • +
  • -

#7 smohd  Icon User is offline

  • Critical Section
  • member icon


Reputation: 1817
  • View blog
  • Posts: 4,625
  • Joined: 14-March 10

Re: Finding javac Problem

Posted 27 December 2012 - 09:33 AM

if you didnt change it doring installation, it will be by default at:
C:\Program Files\Java\jdkx.x.x\bin
x.x wwill be the version of your jdk
Was This Post Helpful? 1
  • +
  • -

#8 extremeblueness  Icon User is offline

  • D.I.C Head

Reputation: 16
  • View blog
  • Posts: 186
  • Joined: 22-October 12

Re: Finding javac Problem

Posted 27 December 2012 - 09:51 AM

Thanks! I was able to find the path.

I still have the problem of spaces, though:

Posted Image


Oh, by the way, your exclamation of "Good gravy." gave me a laugh, Jon.

This post has been edited by extremeblueness: 27 December 2012 - 09:53 AM

Was This Post Helpful? 0
  • +
  • -

#9 g00se  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2651
  • View blog
  • Posts: 11,182
  • Joined: 20-September 08

Re: Finding javac Problem

Posted 27 December 2012 - 10:34 AM

You need to prepend the jdk installation directory bin directory to the PATH variable. Look up Environment Variable in Windows help
Was This Post Helpful? 0
  • +
  • -

#10 extremeblueness  Icon User is offline

  • D.I.C Head

Reputation: 16
  • View blog
  • Posts: 186
  • Joined: 22-October 12

Re: Finding javac Problem

Posted 27 December 2012 - 11:18 AM

Still. Isn't. Working. I tried setting a new System Variable to C:\Program Files\Java\jdk1.7.0_07\bin\javac.exe, then restarting cmd.exe and trying to compile, and setting javac's path to C:\Program Files\Java\jdk1.7.0_07\bin\javac, then restarting cmd.exe and trying to compile:

Posted Image
Was This Post Helpful? 0
  • +
  • -

#11 GregBrannon  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2197
  • View blog
  • Posts: 5,224
  • Joined: 10-September 10

Re: Finding javac Problem

Posted 27 December 2012 - 11:27 AM

Type path<return> at a CMD prompt and post the resulting output. Your command should look like:

C:>path

(Sorry, I'm not a Windows guy, so my prompt may look wrong.)
Was This Post Helpful? 0
  • +
  • -

#12 g00se  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2651
  • View blog
  • Posts: 11,182
  • Joined: 20-September 08

Re: Finding javac Problem

Posted 27 December 2012 - 11:35 AM

echo %PATH%
is what you need

Oh and you should get rid of the environment variable called 'javac' you created. It won't help you

This post has been edited by g00se: 27 December 2012 - 11:44 AM
Reason for edit:: env var

Was This Post Helpful? 0
  • +
  • -

#13 extremeblueness  Icon User is offline

  • D.I.C Head

Reputation: 16
  • View blog
  • Posts: 186
  • Joined: 22-October 12

Re: Finding javac Problem

Posted 27 December 2012 - 11:52 AM

I can't say that I understand your advice clearly. If the path I wanted to take was
C:\Space Example\Java\jdk1.7.0_07\bin\javac, what would I do?


(The ONLY programming languages I know are Java and HTML. Before today I knew NOTHING about cmd. So please take my noobness into account)

This post has been edited by extremeblueness: 27 December 2012 - 11:55 AM

Was This Post Helpful? 0
  • +
  • -

#14 g00se  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2651
  • View blog
  • Posts: 11,182
  • Joined: 20-September 08

Re: Finding javac Problem

Posted 27 December 2012 - 12:14 PM

You'd place
C:\Space Example\Java\jdk1.7.0_07\bin\javac;
before what's already there. Note the semicolon. You need to start a new instance of cmd.exe after changing the PATH
Was This Post Helpful? 0
  • +
  • -

#15 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5182
  • View blog
  • Posts: 26,879
  • Joined: 10-May 07

Re: Finding javac Problem

Posted 27 December 2012 - 12:25 PM

View Postextremeblueness, on 27 December 2012 - 01:52 PM, said:

I can't say that I understand your advice clearly. If the path I wanted to take was
C:\Space Example\Java\jdk1.7.0_07\bin\javac, what would I do?

Click Start, Orb, Circle thing where Start used to be, Right Click "Computer", Select Properties
Click Advanced, Select Environment Variables
Add the location of bin folder of JDK installation for PATH in User Variables and System Variables.

As per the previous posts this should be : C:\Program Files\Java\jdk1.7.07\bin\javac;

Not sure what directions you followed to do your install, but I've only ever installed Java once, & it was step two of those instructions. It's pretty much standard.

Or you can just edit it right on the command prompt :
set PATH="%PATH%;C:\Program Files\Java\jdk1.7.07\bin"

Just to note, this really isn't a Java question, & should be posted under Computer Support. Your issue isn't with the coding language, it's with your system configuration.
Was This Post Helpful? 2
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2