Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Visual J++ Wont Work!

Posted on 2000-04-25
7
287 Views
Last Modified: 2008-03-17
I have installed Visual J++ on my machine which is running Windows NT.

Whenever I try to run or compile a project I get the following error:

"Solution Package

Solution update failed, some files may not be updated - detailed information is listed in the task window. To continue & launch debug process, click ok. To stop the process click cancel. "

If I click cancel nothing happens.

Now if I choose OK I get:

"ERROR: Could not execute class 1 the system cannot find the file specified"

Then im forced to click OK and nothing happens.

I have a feeling it has something to do with the classpath, I set up Visual J++ on a Win98 machine with no problems.

Any help would be greatly appreciated,

thanks




0
Comment
Question by:colin_cool
  • 4
  • 2
7 Comments
 

Expert Comment

by:Le_Ron
ID: 2750524
Hi Colin,
first of all, you should take a look to the task window as said in the message. Maybe you'll find a more complete description of the problem(s).
I also used MSJ++ under WinNT and i also had some troubles with the classpath. Unfortunately, this is still not clear for me but what i know may help you:
You have some directories in the winnt\java directory: 'classes', 'packages' and 'trustlib' where - i guess - all your packages have to be. This is the default location checked by the JVC (the compiler). An interresting command is the clspack. e.g. 'clspack -auto' creates a 'classes.zip' file in the winnt\java\classes directory that contains all Java packages currently installed by the packages manager.
You also have the 'classpath' environment variable and the the registry values for the classpath and the packages.
I hope this helps you understanding a bit more how it works. Everything goes well on my computer now, but i changed so many things that i am not able to say exactly what has to be where.

Maybe you'll find answers at : http://msdn.microsoft.com/library/periodic/period98/vji0798c.htm
0
 

Expert Comment

by:Tarif
ID: 2752164
Make sure that the name of the class containing your "main method" matches the <classename.java> in the project explorer.  Also check if you have no syntax errors in task list.
0
 

Author Comment

by:colin_cool
ID: 2757448
Thanks for the help guys.

Le Ron: Thanks for all that info, it gave me a better understanding of how things work ;-)

Tarif: Thanks for the tip, the class containing the main method does match the classname in the project explorer. The class name is Class1 and in the explorer window it is the same.

This is the most basic project you can create, it just has one java file, i have tried various java files all which compile under JDK.

I think I have isolated this problem a bit more.

What I did was to compile the class1.java file using the JDK to get the Class1.class file in the Visual J++ project directory.

Then, when I ran the project in Visual J++ it worked - I think this rules out the classpath being the problem, as once the .CLASS file is there it can find it.

Therefore, It looks like there is a problem actually generating the .CLASS file (that is what the 'solution update' message is saying)

The problem is that I can see absolutely no way of troubleshooting this, all the debug windows are empty, there is nothing in the task list window, the first error message occurs immediately. The way I see it the error: 'solution update failed' is simply saying 'i cannot create the .CLASS file for some reason' then the 2nd error:  "ERROR: Could not execute class 1 the system cannot find the file specified" is saying 'the class file has not been created so i can't find it'

If I just try to build, rather than execute the project I only get the first error.
 
I notice when I go to project properties, there are various flags etc...you can set at the execute stage and you can pick the executable to use (WJView), and the location of the CLASS file, this can be run from the command prompt for instance with various flags -this is no help since the .CLASS file can't be created.

In the compile stage It doesn't appear to be using an executable???? I would like to compile from the dos prompt with some flags set for debugging.etc.. but I can't see how to do this.

Any further suggestions on troubleshooting this would be much appreciated, its driving me crazy! ;-P

Thanks.
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:colin_cool
ID: 2757459
Adjusted points from 50 to 85
0
 

Accepted Solution

by:
Le_Ron earned 100 total points
ID: 2759142
Hi Colin,

of course, your project has to be configured with the good parameters (which file should be run, ...) and maybe you should take a look at the classpath tab, it may be useful to check whether all directories are OK.

I also found an answered question in the MSDN, maybe it could help :

Whenever I attempt to compile a program, a "Solution Update Failed" message appears in Visual J++ 6.0. However, there are no tasks in the Task List. Why can't I compile anything?

Answer:

You might have an incorrect version of the file Comcat.dll installed on your computer.

There are two versions of this DLL:

Version 4.71: 22 KB (CORRECT version)
Version 5.00: 6 KB (INCORRECT version)
If you are running Windows NT and you find Comcat.dll version 5.0 on your system, do the following:


Unregister Comcat.dll version 5.0. To do this, on the Start menu, click Run, and type regsvr32 /u Comcat.dll.


Delete or rename the incorrect Comcat.dll file.


Copy Comcat.dll 4.71 version from the Visual J++ 6.0 CD to your [windir]/system[32] directory.

NOTE: You will find the correct version on the CD in the \Common\Ide\Ide98\Redist directory.


Register version 4.71.To do this, on the Start menu, click Run, and type regsvr32 Comcat.dll.


In the Control Panel, click Add/Remove Programs, select Microsoft Visual J++ 6.0, and click Reinstall to "repeat the last installation to restore missing files and settings".


0
 

Author Comment

by:colin_cool
ID: 2768056
Adjusted points from 85 to 100
0
 

Author Comment

by:colin_cool
ID: 2768057
Le Ron: you are a LEGEND!

Thanks matey, that worked! ;-))

Who would have thought a file so small could cause such a headache?? hehe

Thanks again for the help..much appreciated! your the best.



0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
servlet doXXX methods 3 62
Convert from a json string array to a Java object 3 53
Java program running SQL query 5 37
running on tomcat not jboss eap 7.0 3 18
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question