Solved

Visual J++ Wont Work!

Posted on 2000-04-25
7
286 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum5 challenge 5 84
sites similar to codingbat to improve coding hanson skills 3 49
JUnit 4 @Before and @BeforeClass differences 3 59
MySqlDump not dumping triggers 1 31
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

770 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