" Javac未被识别为内部或外部命令,可操作程序或批处理文件。"

时间:2015-05-14 15:54:50

标签: java windows

我试图在我的Windows 8操作系统上运行javac命令,但每次我这样做,无论我尝试过哪些目录,都会遇到标题中的错误。

我知道这是一个常见的错误,我在这些链接中尝试了建议,但它仍然不起作用: javac is not recognized as an internal or external command, operable program or batch file http://www.wikihow.com/Install-the-Java-Software-Development-Kit

我不确定这是多么相关,但是我的" Path"的变量值。环境变量目前是这样的:

Creating tables ...
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 371, in handle
return self.handle_noargs(**options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/syncdb.py", line 110, in handle_noargs
emit_post_sync_signal(created_models, verbosity, interactive, db)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/sql.py", line 189, in emit_post_sync_signal
interactive=interactive, db=db)
File "/usr/local/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", line 172, in send
response = receiver(signal=self, sender=sender, **named)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/management/__init__.py", line 35, in create_permissions
ctype = ContentType.objects.get_for_model(klass)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/contenttypes/models.py", line 42, in get_for_model
defaults = {'name': smart_unicode(opts.verbose_name_raw)},
File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 134, in get_or_create
return self.get_query_set().get_or_create(**kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 442, in get_or_create
return self.get(**lookup), False
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 361, in get
num = len(clone)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 85, in __len__
self._result_cache = list(self.iterator())
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 291, in iterator
for row in compiler.results_iter():
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 763, in results_iter
for rows in self.execute_sql(MULTI):
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 818, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", line 40, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in execute
return self.cursor.execute(query, args)
django.db.utils.DatabaseError: column django_content_type.name does not exist
LINE 1: SELECT "django_content_type"."id", "django_content_type"."na...
                                       ^

我还尝试安装最新版本的Java并重新启动了我的电脑;但是,我仍然遇到这个问题。

任何人对此都有任何建议将不胜感激。

1 个答案:

答案 0 :(得分:0)

看起来你的PATH变量是错误的。尝试更新它以指向您的JDK。它几乎看起来像Java在那里3次。

C:\ProgramData\Oracle\Java\javapath

C:\Program Files (x86)\Java\jre7\bin

C:\Program Files\Java\jdk1.6.0\bin;

此链接在适当更新路径方面有很好的演练。

http://docs.oracle.com/javase/7/docs/webnotes/install/windows/jdk-installation-windows.html#path